CodeGen: Fix missing const
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 8 Jun 2021 21:10:51 +0000 (17:10 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 11 Jun 2021 17:45:24 +0000 (13:45 -0400)
llvm/include/llvm/CodeGen/MachineFunction.h
llvm/lib/CodeGen/MachineFunction.cpp

index 639077e..01e3bc0 100644 (file)
@@ -877,7 +877,7 @@ public:
   /// MachineMemOperands are owned by the MachineFunction and need not be
   /// explicitly deallocated.
   MachineMemOperand *getMachineMemOperand(const MachineMemOperand *MMO,
-                                          MachinePointerInfo &PtrInfo,
+                                          const MachinePointerInfo &PtrInfo,
                                           uint64_t Size);
 
   /// Allocate a new MachineMemOperand by copying an existing one,
index 0140738..ee3c8ba 100644 (file)
@@ -438,7 +438,7 @@ MachineMemOperand *MachineFunction::getMachineMemOperand(
 }
 
 MachineMemOperand *MachineFunction::getMachineMemOperand(
-    const MachineMemOperand *MMO, MachinePointerInfo &PtrInfo, uint64_t Size) {
+    const MachineMemOperand *MMO, const MachinePointerInfo &PtrInfo, uint64_t Size) {
   return new (Allocator) MachineMemOperand(
       PtrInfo, MMO->getFlags(), Size, MMO->getBaseAlign(), AAMDNodes(), nullptr,
       MMO->getSyncScopeID(), MMO->getOrdering(), MMO->getFailureOrdering());