summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectStreamer.cpp
diff options
context:
space:
mode:
authorWeiming Zhao <weimingz@codeaurora.org>2017-03-28 17:15:11 +0000
committerWeiming Zhao <weimingz@codeaurora.org>2017-03-28 17:15:11 +0000
commitda4d12a8e563d3f50ca3ce3243720fe30f77523f (patch)
tree0ab0972ec9ea90ebeccf09bd701da5121fea8000 /llvm/lib/MC/MCObjectStreamer.cpp
parent472b5efc8b37d99989bcedb2e63abc08911b33a7 (diff)
downloadbcm5719-llvm-da4d12a8e563d3f50ca3ce3243720fe30f77523f.tar.gz
bcm5719-llvm-da4d12a8e563d3f50ca3ce3243720fe30f77523f.zip
Revert "Dont emit Mapping symbols for sections that contain only data."
It breaks some lld tests. This reverts commit 3a50eea6d9732ab40e9a7aebe6be777b53a8b35c. llvm-svn: 298932
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCObjectStreamer.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp
index 726326be2ee..8f502fc3e2f 100644
--- a/llvm/lib/MC/MCObjectStreamer.cpp
+++ b/llvm/lib/MC/MCObjectStreamer.cpp
@@ -171,16 +171,6 @@ void MCObjectStreamer::EmitLabel(MCSymbol *Symbol, SMLoc Loc) {
}
}
-void MCObjectStreamer::EmitLabel(MCSymbol *Symbol, SMLoc Loc, MCFragment *F) {
- MCStreamer::EmitLabel(Symbol, Loc);
- getAssembler().registerSymbol(*Symbol);
- auto *DF = dyn_cast_or_null<MCDataFragment>(F);
- if (DF)
- Symbol->setFragment(F);
- else
- PendingLabels.push_back(Symbol);
-}
-
void MCObjectStreamer::EmitULEB128Value(const MCExpr *Value) {
int64_t IntValue;
if (Value->evaluateAsAbsolute(IntValue, getAssembler())) {
@@ -501,8 +491,8 @@ void MCObjectStreamer::EmitGPRel32Value(const MCExpr *Value) {
MCDataFragment *DF = getOrCreateDataFragment();
flushPendingLabels(DF, DF->getContents().size());
- DF->getFixups().push_back(
- MCFixup::create(DF->getContents().size(), Value, FK_GPRel_4));
+ DF->getFixups().push_back(MCFixup::create(DF->getContents().size(),
+ Value, FK_GPRel_4));
DF->getContents().resize(DF->getContents().size() + 4, 0);
}
@@ -511,8 +501,8 @@ void MCObjectStreamer::EmitGPRel64Value(const MCExpr *Value) {
MCDataFragment *DF = getOrCreateDataFragment();
flushPendingLabels(DF, DF->getContents().size());
- DF->getFixups().push_back(
- MCFixup::create(DF->getContents().size(), Value, FK_GPRel_4));
+ DF->getFixups().push_back(MCFixup::create(DF->getContents().size(),
+ Value, FK_GPRel_4));
DF->getContents().resize(DF->getContents().size() + 8, 0);
}
OpenPOWER on IntegriCloud