Move dllimport name mangling to IR mangler.
[oota-llvm.git] / lib / IR / Mangler.cpp
index a0e1b25056c93b1fa220193f72a044b2ba1de24a..1c8f01abb607feec29a32067ca0ffa5ff75b6a2b 100644 (file)
@@ -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();