diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-24 08:39:57 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-24 08:39:57 +0000 |
commit | d341e781da793cbd9b6146c73384bcbf94a0a6bf (patch) | |
tree | 80c1ac953fdde12ad5980cc1c33360b70b92ec91 /llvm/lib/MC/MCAssembler.cpp | |
parent | ecd32d6a4fb1debdec5e1f69bb44b16ed7239446 (diff) | |
download | bcm5719-llvm-d341e781da793cbd9b6146c73384bcbf94a0a6bf.tar.gz bcm5719-llvm-d341e781da793cbd9b6146c73384bcbf94a0a6bf.zip |
llvm-mc: Tweak undefined symbol handling.
llvm-svn: 79898
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r-- | llvm/lib/MC/MCAssembler.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index 7a67fac7efd..80e1b9e43cb 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/lib/MC/MCAssembler.cpp @@ -294,7 +294,7 @@ public: // FIXME: Set private external bit. // Set external bit. - if (MSD.SymbolData->isExternal()) + if (MSD.SymbolData->isExternal() || Symbol.isUndefined()) Type |= STF_External; // struct nlist (12 bytes) @@ -339,7 +339,7 @@ public: ie = Asm.symbol_end(); it != ie; ++it) { MCSymbol &Symbol = it->getSymbol(); - if (!it->isExternal()) + if (!it->isExternal() && !Symbol.isUndefined()) continue; uint64_t &Entry = StringIndexMap[Symbol.getName()]; @@ -371,7 +371,7 @@ public: ie = Asm.symbol_end(); it != ie; ++it) { MCSymbol &Symbol = it->getSymbol(); - if (it->isExternal()) + if (it->isExternal() || Symbol.isUndefined()) continue; uint64_t &Entry = StringIndexMap[Symbol.getName()]; @@ -385,7 +385,6 @@ public: MSD.SymbolData = it; MSD.StringIndex = Entry; - assert(!Symbol.isUndefined() && "Local symbol can not be undefined!"); if (Symbol.isAbsolute()) { MSD.SectionIndex = 0; LocalSymbolData.push_back(MSD); |