summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-26 22:13:22 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-26 22:13:22 +0000
commite73b2673010f931212691f8e08de1544b77ebf36 (patch)
tree95b847bd371a5fbb3956fb02fd680a19fdcf470b /llvm/lib/MC
parent7e3778948aa5b123cfa15a05dac87fc70d4905db (diff)
downloadbcm5719-llvm-e73b2673010f931212691f8e08de1544b77ebf36.tar.gz
bcm5719-llvm-e73b2673010f931212691f8e08de1544b77ebf36.zip
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). llvm-svn: 80162
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/MCAssembler.cpp8
-rw-r--r--llvm/lib/MC/MCContext.cpp1
2 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp
index 9efdfe359bb..9388df8df61 100644
--- a/llvm/lib/MC/MCAssembler.cpp
+++ b/llvm/lib/MC/MCAssembler.cpp
@@ -557,6 +557,10 @@ public:
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 @@ public:
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;
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index 5a3e7f661ec..f36564a6afa 100644
--- a/llvm/lib/MC/MCContext.cpp
+++ b/llvm/lib/MC/MCContext.cpp
@@ -38,7 +38,6 @@ MCSymbol *MCContext::GetOrCreateSymbol(const StringRef &Name) {
return Entry = new (*this) MCSymbol(Name, false);
}
-
MCSymbol *MCContext::CreateTemporarySymbol(const StringRef &Name) {
// If unnamed, just create a symbol.
if (Name.empty())
OpenPOWER on IntegriCloud