[llvm] 93f3c7c - CodeGen: Fix missing const

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 11 10:45:37 PDT 2021


Author: Matt Arsenault
Date: 2021-06-11T13:45:24-04:00
New Revision: 93f3c7cc3efc4911af2a7848fbae339ebbc5c3a0

URL: https://github.com/llvm/llvm-project/commit/93f3c7cc3efc4911af2a7848fbae339ebbc5c3a0
DIFF: https://github.com/llvm/llvm-project/commit/93f3c7cc3efc4911af2a7848fbae339ebbc5c3a0.diff

LOG: CodeGen: Fix missing const

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/MachineFunction.h
    llvm/lib/CodeGen/MachineFunction.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h
index 639077e762ef..01e3bc03255c 100644
--- a/llvm/include/llvm/CodeGen/MachineFunction.h
+++ b/llvm/include/llvm/CodeGen/MachineFunction.h
@@ -877,7 +877,7 @@ class MachineFunction {
   /// 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,

diff  --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 014073862d0d..ee3c8ba41082 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -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());


        


More information about the llvm-commits mailing list