Debug Info: code clean up.

Use EmitLabelOffsetDifference for handling on darwin platform when
non-darwin platforms use EmitLabelPlusOffset.

Also fix a bug in EmitLabelOffsetDifference where the size is hard-coded
to 4 even though Size is passed in as an argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193660 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manman Ren
2013-10-29 23:14:15 +00:00
parent 3eabc2adb7
commit 38856f8bed
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -1423,12 +1423,12 @@ void AsmPrinter::EmitLabelOffsetDifference(const MCSymbol *Hi, uint64_t Offset,
OutContext);
if (!MAI->hasSetDirective())
OutStreamer.EmitValue(Diff, 4);
OutStreamer.EmitValue(Diff, Size);
else {
// Otherwise, emit with .set (aka assignment).
MCSymbol *SetLabel = GetTempSymbol("set", SetCounter++);
OutStreamer.EmitAssignment(SetLabel, Diff);
OutStreamer.EmitSymbolValue(SetLabel, 4);
OutStreamer.EmitSymbolValue(SetLabel, Size);
}
}