diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-08-26 22:13:22 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-26 22:13:22 +0000 |
| commit | e73b2673010f931212691f8e08de1544b77ebf36 (patch) | |
| tree | 95b847bd371a5fbb3956fb02fd680a19fdcf470b /llvm/lib/MC | |
| parent | 7e3778948aa5b123cfa15a05dac87fc70d4905db (diff) | |
| download | bcm5719-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.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/MC/MCContext.cpp | 1 |
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()) |

