summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineConstantPool.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineConstantPool.h')
-rw-r--r--include/llvm/CodeGen/MachineConstantPool.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineConstantPool.h b/include/llvm/CodeGen/MachineConstantPool.h
index 8ed215d75bcf0..912ce89662685 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