llvm-mc/Mach-O: Don't put assembler temporary labels in the symbol table.
- I moved section creation back into AsmParser. I think policy decisions like
this should be pushed higher, not lower, when possible (in addition the
assembler has flags which change this behavior, for example).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80162 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp
index 9efdfe3..9388df8 100644
--- a/lib/MC/MCAssembler.cpp
+++ b/lib/MC/MCAssembler.cpp
@@ -557,6 +557,10 @@
ie = Asm.symbol_end(); it != ie; ++it) {
MCSymbol &Symbol = it->getSymbol();
+ // Ignore assembler temporaries.
+ if (it->getSymbol().isTemporary())
+ continue;
+
if (!it->isExternal() && !Symbol.isUndefined())
continue;
@@ -589,6 +593,10 @@
ie = Asm.symbol_end(); it != ie; ++it) {
MCSymbol &Symbol = it->getSymbol();
+ // Ignore assembler temporaries.
+ if (it->getSymbol().isTemporary())
+ continue;
+
if (it->isExternal() || Symbol.isUndefined())
continue;