diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-06-17 20:41:25 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-06-17 20:41:25 +0000 |
commit | d10fa8b1caf010fe4943ae5526c2c3b921339f72 (patch) | |
tree | 2ce25013aca5dbd5bd2b6b0b89d981cc05b5917e /include/llvm/CodeGen/MachineConstantPool.h | |
parent | 99ccd5d5ef01881b3464b6e6a5b13b9d2c77387e (diff) | |
download | external_llvm-d10fa8b1caf010fe4943ae5526c2c3b921339f72.tar.gz external_llvm-d10fa8b1caf010fe4943ae5526c2c3b921339f72.tar.bz2 external_llvm-d10fa8b1caf010fe4943ae5526c2c3b921339f72.zip |
Directly access objects which may change during compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184121 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineConstantPool.h')
-rw-r--r-- | include/llvm/CodeGen/MachineConstantPool.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineConstantPool.h b/include/llvm/CodeGen/MachineConstantPool.h index 8ed215d75b..912ce89662 100644 --- a/include/llvm/CodeGen/MachineConstantPool.h +++ b/include/llvm/CodeGen/MachineConstantPool.h @@ -132,15 +132,17 @@ public: /// address of the function constant pool values. /// @brief The machine constant pool. class MachineConstantPool { - const DataLayout *TD; ///< The machine's DataLayout. - unsigned PoolAlignment; ///< The alignment for the pool. + const TargetMachine &TM; ///< The target machine. + unsigned PoolAlignment; ///< The alignment for the pool. std::vector<MachineConstantPoolEntry> Constants; ///< The pool of constants. /// MachineConstantPoolValues that use an existing MachineConstantPoolEntry. DenseSet<MachineConstantPoolValue*> MachineCPVsSharingEntries; + + const DataLayout *getDataLayout() const; public: /// @brief The only constructor. - explicit MachineConstantPool(const DataLayout *td) - : TD(td), PoolAlignment(1) {} + explicit MachineConstantPool(const TargetMachine &TM) + : TM(TM), PoolAlignment(1) {} ~MachineConstantPool(); /// getConstantPoolAlignment - Return the alignment required by |