about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Module/ModuleUtil.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
index 3811003e..5f7ed35e 100644
--- a/lib/Module/ModuleUtil.cpp
+++ b/lib/Module/ModuleUtil.cpp
@@ -96,8 +96,11 @@ GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
       if (I->isDeclaration())
         UndefinedSymbols.insert(I->getName());
       else if (!I->hasLocalLinkage()) {
-        assert(!I->hasDLLImportLinkage()
-               && "Found dllimported non-external symbol!");
+#if LLVM_VERSION_CODE < LLVM_VERSION(3, 5)
+            assert(!I->hasDLLImportLinkage() && "Found dllimported non-external symbol!");
+#else
+            assert(!I->hasDLLImportStorageClass() && "Found dllimported non-external symbol!");
+#endif
         DefinedSymbols.insert(I->getName());
       }
     }
@@ -108,8 +111,11 @@ GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
       if (I->isDeclaration())
         UndefinedSymbols.insert(I->getName());
       else if (!I->hasLocalLinkage()) {
-        assert(!I->hasDLLImportLinkage()
-               && "Found dllimported non-external symbol!");
+#if LLVM_VERSION_CODE < LLVM_VERSION(3, 5)
+            assert(!I->hasDLLImportLinkage() && "Found dllimported non-external symbol!");
+#else
+            assert(!I->hasDLLImportStorageClass() && "Found dllimported non-external symbol!");
+#endif
         DefinedSymbols.insert(I->getName());
       }
     }