Don't tell the linker about available_externally definitions. If we do, it will

complain about duplicated definitions.

llvm-svn: 124634
This commit is contained in:
Rafael Espindola 2011-02-01 00:41:51 +00:00
parent 97c467ee47
commit 54673ba6ca

View File

@ -304,6 +304,10 @@ void LTOModule::addDefinedSymbol(GlobalValue *def, Mangler &mangler,
if (def->getName().startswith("llvm."))
return;
// ignore available_externally
if (def->hasAvailableExternallyLinkage())
return;
// string is owned by _defines
const char *symbolName = ::strdup(mangler.getNameWithPrefix(def).c_str());