diff options
author | Owen Anderson <resistor@mac.com> | 2006-05-03 01:29:57 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2006-05-03 01:29:57 +0000 |
commit | a69571c7991813c93cba64e88eced6899ce93d81 (patch) | |
tree | 06bc81338c35527b69a6e8e7434e7c1a824bc4ca /lib/CodeGen/MachineFunction.cpp | |
parent | 0eb4d6b52e1b5db9a4c86e5a954356ae3507a287 (diff) |
Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference.
This fixes PR 759.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28074 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | lib/CodeGen/MachineFunction.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 6d66839e2f..02646de18f 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -367,11 +367,11 @@ void MachineJumpTableInfo::print(std::ostream &OS) const { } unsigned MachineJumpTableInfo::getEntrySize() const { - return TD.getPointerSize(); + return TD->getPointerSize(); } unsigned MachineJumpTableInfo::getAlignment() const { - return TD.getPointerAlignment(); + return TD->getPointerAlignment(); } void MachineJumpTableInfo::dump() const { print(std::cerr); } @@ -400,7 +400,7 @@ unsigned MachineConstantPool::getConstantPoolIndex(Constant *C, unsigned Offset = 0; if (!Constants.empty()) { Offset = Constants.back().Offset; - Offset += TD.getTypeSize(Constants.back().Val->getType()); + Offset += TD->getTypeSize(Constants.back().Val->getType()); Offset = (Offset+AlignMask)&~AlignMask; } |