diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-06 17:27:56 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-06 17:27:56 +0000 |
commit | 44bbe36de66b44f7c9b7355709b62609886e287a (patch) | |
tree | 168e54e4625559ee716af456450eb1c9befdde14 /llvm/lib/MC/MCDwarf.cpp | |
parent | dee30623734e0ea86d8b4d16cae9632087e548b9 (diff) | |
download | bcm5719-llvm-44bbe36de66b44f7c9b7355709b62609886e287a.tar.gz bcm5719-llvm-44bbe36de66b44f7c9b7355709b62609886e287a.zip |
Second try at making direct object emission produce the same results
as llc + llvm-mc. This time ELF is not changed and I tested that llvm-gcc
bootstrap on darwin10 using darwin9's assembler and linker.
llvm-svn: 121006
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index 53731dca7eb..3e10f9502db 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -213,15 +213,8 @@ void MCDwarfFileTable::Emit(MCStreamer *MCOS, // The first 4 bytes is the total length of the information for this // compilation unit (not including these 4 bytes for the length). - // FIXME: We create the dummy TotalLength variable because LineEndSym points - // to the end of the section and the darwin assembler doesn't consider that - // difference an assembly time constant. It might be better for this to be - // proected by a flag. - MCSymbol *TotalLength = MCOS->getContext().CreateTempSymbol(); - MCOS->EmitAssignment(TotalLength, - MakeStartMinusEndExpr(MCOS, LineStartSym, LineEndSym, - 4)); - MCOS->EmitSymbolValue(TotalLength, 4, 0); + MCOS->EmitAbsValue(MakeStartMinusEndExpr(MCOS, LineStartSym, LineEndSym,4), + 4); // Next 2 bytes is the Version, which is Dwarf 2. MCOS->EmitIntValue(2, 2); @@ -233,7 +226,7 @@ void MCDwarfFileTable::Emit(MCStreamer *MCOS, // section to the end of the prologue. Not including the 4 bytes for the // total length, the 2 bytes for the version, and these 4 bytes for the // length of the prologue. - MCOS->EmitValue(MakeStartMinusEndExpr(MCOS, LineStartSym, ProEndSym, + MCOS->EmitAbsValue(MakeStartMinusEndExpr(MCOS, LineStartSym, ProEndSym, (4 + 2 + 4)), 4, 0); |