aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCObjectStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MC/MCObjectStreamer.cpp')
-rw-r--r--lib/MC/MCObjectStreamer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/MC/MCObjectStreamer.cpp b/lib/MC/MCObjectStreamer.cpp
index cbc66f1cf9..af102ecf78 100644
--- a/lib/MC/MCObjectStreamer.cpp
+++ b/lib/MC/MCObjectStreamer.cpp
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCObjectStreamer.h"
#include "llvm/Support/ErrorHandling.h"
@@ -90,7 +91,7 @@ void MCObjectStreamer::EmitValueImpl(const MCExpr *Value, unsigned Size,
return;
}
DF->addFixup(MCFixup::Create(DF->getContents().size(),
- AddValueSymbols(Value),
+ Value,
MCFixup::getKindForSize(Size, isPCRel)));
DF->getContents().resize(DF->getContents().size() + Size, 0);
}
@@ -210,6 +211,11 @@ void MCObjectStreamer::EmitDwarfAdvanceLineAddr(int64_t LineDelta,
MCDwarfLineAddr::Emit(this, LineDelta, Res);
return;
}
+ if (!getContext().getAsmInfo().hasAggressiveSymbolFolding()) {
+ MCSymbol *ABS = getContext().CreateTempSymbol();
+ EmitAssignment(ABS, AddrDelta);
+ AddrDelta = MCSymbolRefExpr::Create(ABS, getContext());
+ }
new MCDwarfLineAddrFragment(LineDelta, *AddrDelta, getCurrentSectionData());
}