summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAssembler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r--llvm/lib/MC/MCAssembler.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp
index 0d00ed17525..4cf8b7e522b 100644
--- a/llvm/lib/MC/MCAssembler.cpp
+++ b/llvm/lib/MC/MCAssembler.cpp
@@ -674,7 +674,10 @@ public:
const MCSymbol &Symbol = it->getSymbol();
// Ignore assembler temporaries.
- if (it->getSymbol().isTemporary())
+ if (it->getSymbol().isTemporary() &&
+ (!it->getFragment() ||
+ !Asm.getBackend().doesSectionRequireSymbols(
+ it->getFragment()->getParent()->getSection())))
continue;
if (!it->isExternal() && !Symbol.isUndefined())
@@ -710,7 +713,10 @@ public:
const MCSymbol &Symbol = it->getSymbol();
// Ignore assembler temporaries.
- if (it->getSymbol().isTemporary())
+ if (it->getSymbol().isTemporary() &&
+ (!it->getFragment() ||
+ !Asm.getBackend().doesSectionRequireSymbols(
+ it->getFragment()->getParent()->getSection())))
continue;
if (it->isExternal() || Symbol.isUndefined())
OpenPOWER on IntegriCloud