diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2006-09-14 18:23:27 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2006-09-14 18:23:27 +0000 |
commit | b74ed07bfd3af42331b1964c24c39912610a08f4 (patch) | |
tree | 23784905a2ba3e6ebe644e62b54658950cbf8fa1 /lib/VMCore/Mangler.cpp | |
parent | a17cf0a7e2d9aa6d9bb6f9461a6fa8a9ac02bab4 (diff) |
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
Diffstat (limited to 'lib/VMCore/Mangler.cpp')
-rw-r--r-- | lib/VMCore/Mangler.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp index 8715498b9c..b3211a3153 100644 --- a/lib/VMCore/Mangler.cpp +++ b/lib/VMCore/Mangler.cpp @@ -162,11 +162,16 @@ void Mangler::InsertName(GlobalValue *GV, ExistingValue = GV; } else { // If GV is external but the existing one is static, mangle the existing one - if (GV->hasExternalLinkage() && !ExistingValue->hasExternalLinkage()) { + if ((GV->hasExternalLinkage() || GV->hasDLLImportLinkage()) && + !(ExistingValue->hasExternalLinkage() || ExistingValue->hasDLLImportLinkage())) { MangledGlobals.insert(ExistingValue); ExistingValue = GV; - } else if (GV->hasExternalLinkage() && ExistingValue->hasExternalLinkage()&& - GV->isExternal() && ExistingValue->isExternal()) { + } else if ((GV->hasExternalLinkage() || + GV->hasDLLImportLinkage()) && + (ExistingValue->hasExternalLinkage() || + ExistingValue->hasDLLImportLinkage()) && + GV->isExternal() && + ExistingValue->isExternal()) { // If the two globals both have external inkage, and are both external, // don't mangle either of them, we just have some silly type mismatch. } else { |