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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30374 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Linker/LinkArchives.cpp b/lib/Linker/LinkArchives.cpp
index e115b93..15d261e 100644
--- a/lib/Linker/LinkArchives.cpp
+++ b/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...