aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/DwarfWriter.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2006-05-03 01:29:57 +0000
committerOwen Anderson <resistor@mac.com>2006-05-03 01:29:57 +0000
commit20a631fde715280ecab9ae997ba7fa79434b4fe2 (patch)
tree0d724c5315fd81f33b7b09830661330efe099f9b /llvm/lib/CodeGen/DwarfWriter.cpp
parent37c39b9c62c523ea324d635e1760f91754b0a371 (diff)
downloadllvm-20a631fde715280ecab9ae997ba7fa79434b4fe2.zip
llvm-20a631fde715280ecab9ae997ba7fa79434b4fe2.tar.gz
llvm-20a631fde715280ecab9ae997ba7fa79434b4fe2.tar.bz2
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/DwarfWriter.cpp')
-rw-r--r--llvm/lib/CodeGen/DwarfWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp
index bb41dc03..b7006182 100644
--- a/llvm/lib/CodeGen/DwarfWriter.cpp
+++ b/llvm/lib/CodeGen/DwarfWriter.cpp
@@ -1075,7 +1075,7 @@ void DwarfWriter::EmitInt64(uint64_t Value) const {
if (Asm->Data64bitsDirective) {
O << Asm->Data64bitsDirective << "0x" << std::hex << Value << std::dec;
} else {
- if (TD.isBigEndian()) {
+ if (TD->isBigEndian()) {
EmitInt32(unsigned(Value >> 32)); O << "\n";
EmitInt32(unsigned(Value));
} else {
@@ -1361,7 +1361,7 @@ DIE *DwarfWriter::NewType(DIE *Context, TypeDesc *TyDesc, CompileUnit *Unit) {
Offset -= FieldOffset;
// Maybe we need to work from the other end.
- if (TD.isLittleEndian()) Offset = FieldSize - (Offset + Size);
+ if (TD->isLittleEndian()) Offset = FieldSize - (Offset + Size);
Member->AddUInt(DW_AT_byte_size, 0, FieldSize >> 3);
Member->AddUInt(DW_AT_bit_size, 0, Size);