summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Mangler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Mangler.cpp')
-rw-r--r--llvm/lib/IR/Mangler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/Mangler.cpp b/llvm/lib/IR/Mangler.cpp
index a0e1b25056c..1c8f01abb60 100644
--- a/llvm/lib/IR/Mangler.cpp
+++ b/llvm/lib/IR/Mangler.cpp
@@ -112,6 +112,10 @@ void Mangler::getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV,
return;
}
+ // dllimported symbols have a __imp_ prefix.
+ if (GV->hasDLLImportStorageClass())
+ OS << "__imp_";
+
StringRef Name = GV->getName();
char Prefix = DL->getGlobalPrefix();
OpenPOWER on IntegriCloud