about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2014-08-20 19:28:27 +0100
committerDaniel Dunbar <daniel@zuster.org>2014-09-16 08:26:16 -0700
commit21ab5307531fd291f5980b71b438221eb5c438fc (patch)
tree837e35783fda195cad32789955d0f95e9851993e /lib
parent44c74907d97df031bd06023aec6f69d6fe9ba403 (diff)
downloadklee-21ab5307531fd291f5980b71b438221eb5c438fc.tar.gz
Fix compilation error due to r199218. Maybe we should just remove this
assertion entirely?
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());
       }
     }