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 | 20a631fde715280ecab9ae997ba7fa79434b4fe2 (patch) | |
tree | 0d724c5315fd81f33b7b09830661330efe099f9b /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 37c39b9c62c523ea324d635e1760f91754b0a371 (diff) | |
download | bcm5719-llvm-20a631fde715280ecab9ae997ba7fa79434b4fe2.tar.gz bcm5719-llvm-20a631fde715280ecab9ae997ba7fa79434b4fe2.zip |
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.
llvm-svn: 28074
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 6d66839e2fb..02646de18fd 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/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; } |