Fix an issue in some Thumb fixups, where the effective PC address needs to be 4-byte...
[oota-llvm.git] / lib / MC / MCDwarf.cpp
index a33b0c596ba19a386ed3b033f8c3d971acb0a89c..3e10f9502dbe8dd47b5126d27eea2f962038e398 100644 (file)
@@ -213,8 +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).
-  MCOS->EmitValue(MakeStartMinusEndExpr(MCOS, LineStartSym, LineEndSym, 4),
-                  4, 0, true /*UseSet*/);
+  MCOS->EmitAbsValue(MakeStartMinusEndExpr(MCOS, LineStartSym, LineEndSym,4),
+                     4);
 
   // Next 2 bytes is the Version, which is Dwarf 2.
   MCOS->EmitIntValue(2, 2);
@@ -226,9 +226,9 @@ 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, true /*UseSet*/);
+                  4, 0);
 
   // Parameters of the state machine, are next.
   MCOS->EmitIntValue(DWARF2_LINE_MIN_INSN_LENGTH, 1);
@@ -313,14 +313,6 @@ void MCDwarfFileTable::Emit(MCStreamer *MCOS,
   MCOS->EmitLabel(LineEndSym);
 }
 
-/// Utility function to compute the size of the encoding.
-uint64_t MCDwarfLineAddr::ComputeSize(int64_t LineDelta, uint64_t AddrDelta) {
-  SmallString<256> Tmp;
-  raw_svector_ostream OS(Tmp);
-  MCDwarfLineAddr::Encode(LineDelta, AddrDelta, OS);
-  return OS.GetNumBytesInBuffer();
-}
-
 /// Utility function to write the encoding to an object writer.
 void MCDwarfLineAddr::Write(MCObjectWriter *OW, int64_t LineDelta,
                             uint64_t AddrDelta) {