diff options
author | Chris Lattner <sabre@nondot.org> | 2010-09-21 04:46:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-09-21 04:46:39 +0000 |
commit | 93a95ae8a9d8eb19dc0d90281473be2fb1c05a17 (patch) | |
tree | d87e0e086e8459314307f38ae6f58c104962d83e /include | |
parent | 59db5496f4fc2ef6111569e542f8b65480ef14c1 (diff) | |
download | external_llvm-93a95ae8a9d8eb19dc0d90281473be2fb1c05a17.zip external_llvm-93a95ae8a9d8eb19dc0d90281473be2fb1c05a17.tar.gz external_llvm-93a95ae8a9d8eb19dc0d90281473be2fb1c05a17.tar.bz2 |
force clients of MachineFunction::getMachineMemOperand to provide a
MachinePointerInfo, propagating the type out a level of API. Remove
the old MachineFunction::getMachineMemOperand impl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 7 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineMemOperand.h | 5 |
2 files changed, 4 insertions, 8 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index f50b48f..6789884 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -369,13 +369,6 @@ public: /// getMachineMemOperand - Allocate a new MachineMemOperand. /// MachineMemOperands are owned by the MachineFunction and need not be /// explicitly deallocated. - MachineMemOperand *getMachineMemOperand(const Value *v, unsigned f, - int64_t o, uint64_t s, - unsigned base_alignment); - - /// getMachineMemOperand - Allocate a new MachineMemOperand. - /// MachineMemOperands are owned by the MachineFunction and need not be - /// explicitly deallocated. MachineMemOperand *getMachineMemOperand(MachinePointerInfo PtrInfo, unsigned f, uint64_t s, unsigned base_alignment); diff --git a/include/llvm/CodeGen/MachineMemOperand.h b/include/llvm/CodeGen/MachineMemOperand.h index 0386c19..0804f46 100644 --- a/include/llvm/CodeGen/MachineMemOperand.h +++ b/include/llvm/CodeGen/MachineMemOperand.h @@ -37,7 +37,8 @@ struct MachinePointerInfo { /// Offset - This is an offset from the base Value*. int64_t Offset; - MachinePointerInfo(const Value *v, int64_t offset) : V(v), Offset(offset) {} + explicit MachinePointerInfo(const Value *v, int64_t offset = 0) + : V(v), Offset(offset) {} }; @@ -74,6 +75,8 @@ public: MachineMemOperand(MachinePointerInfo PtrInfo, unsigned flags, uint64_t s, unsigned base_alignment); + const MachinePointerInfo &getPointerInfo() const { return PtrInfo; } + /// getValue - Return the base address of the memory access. This may either /// be a normal LLVM IR Value, or one of the special values used in CodeGen. /// Special values are those obtained via |