Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86
assembler backends.
External weak linkage added for future use, we don't provide any
codegeneration, etc. support for it.
llvm-svn: 30374
diff --git a/llvm/lib/Linker/LinkArchives.cpp b/llvm/lib/Linker/LinkArchives.cpp
index e115b93..15d261e 100644
--- a/llvm/lib/Linker/LinkArchives.cpp
+++ b/llvm/lib/Linker/LinkArchives.cpp
@@ -65,16 +65,22 @@
if (I->hasName()) {
if (I->isExternal())
UndefinedSymbols.insert(I->getName());
- else if (!I->hasInternalLinkage())
+ else if (!I->hasInternalLinkage()) {
+ assert(!I->hasDLLImportLinkage()
+ && "Found dllimported non-external symbol!");
DefinedSymbols.insert(I->getName());
+ }
}
for (Module::global_iterator I = M->global_begin(), E = M->global_end();
I != E; ++I)
if (I->hasName()) {
if (I->isExternal())
UndefinedSymbols.insert(I->getName());
- else if (!I->hasInternalLinkage())
+ else if (!I->hasInternalLinkage()) {
+ assert(!I->hasDLLImportLinkage()
+ && "Found dllimported non-external symbol!");
DefinedSymbols.insert(I->getName());
+ }
}
// Prune out any defined symbols from the undefined symbols set...