diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-06 15:35:15 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-06 15:35:15 +0000 |
commit | dee30623734e0ea86d8b4d16cae9632087e548b9 (patch) | |
tree | cb52eb4106df5281f1b1dd2f214570cea17aa64b /llvm/lib/MC | |
parent | fd18df5b2e03a03824934a3561039950306e6f12 (diff) | |
download | bcm5719-llvm-dee30623734e0ea86d8b4d16cae9632087e548b9.tar.gz bcm5719-llvm-dee30623734e0ea86d8b4d16cae9632087e548b9.zip |
Revert previous two patches while I try to find out how to make both
linux and darwin assemblers happy :-(
llvm-svn: 121004
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 11 | ||||
-rw-r--r-- | llvm/lib/MC/MCStreamer.cpp | 6 |
2 files changed, 9 insertions, 8 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index 5d36ee3e626..53731dca7eb 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -213,8 +213,15 @@ 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). - MCOS->EmitAbsValue(MakeStartMinusEndExpr(MCOS, LineStartSym, LineEndSym,4), - 4); + // 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); // Next 2 bytes is the Version, which is Dwarf 2. MCOS->EmitIntValue(2, 2); diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp index b9d59056f3b..6df4ae44e40 100644 --- a/llvm/lib/MC/MCStreamer.cpp +++ b/llvm/lib/MC/MCStreamer.cpp @@ -72,12 +72,6 @@ void MCStreamer::EmitSLEB128IntValue(int64_t Value, unsigned AddrSpace) { EmitBytes(OSE.str(), AddrSpace); } -void MCStreamer::EmitAbsValue(const MCExpr *Value, unsigned Size) { - MCSymbol *ABS = getContext().CreateTempSymbol(); - EmitAssignment(ABS, Value); - EmitSymbolValue(ABS, Size, 0); -} - void MCStreamer::EmitSymbolValue(const MCSymbol *Sym, unsigned Size, unsigned AddrSpace) { EmitValue(MCSymbolRefExpr::Create(Sym, getContext()), Size, AddrSpace); |