about summary refs log tree commit diff homepage
path: root/lib/Module/FunctionAlias.cpp
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2021-12-15 16:20:29 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2022-03-17 22:59:26 +0000
commitd8553f3cec042b5af9e21c268cb14ee8f7b30083 (patch)
treed8545f09d6ae508df5a8d19ad30b6dbd6f1e4182 /lib/Module/FunctionAlias.cpp
parent8cab09eb98d06d488e036ceec9f4b16090502297 (diff)
downloadklee-d8553f3cec042b5af9e21c268cb14ee8f7b30083.tar.gz
remove LLVM < 6 from sources
Diffstat (limited to 'lib/Module/FunctionAlias.cpp')
-rw-r--r--lib/Module/FunctionAlias.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/Module/FunctionAlias.cpp b/lib/Module/FunctionAlias.cpp
index 3fb0ec9a..a98b74fb 100644
--- a/lib/Module/FunctionAlias.cpp
+++ b/lib/Module/FunctionAlias.cpp
@@ -36,9 +36,7 @@ namespace klee {
 bool FunctionAliasPass::runOnModule(Module &M) {
   bool modified = false;
 
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9)
   assert((M.ifunc_size() == 0) && "Unexpected ifunc");
-#endif
 
   for (const auto &pair : FunctionAlias) {
     bool matchFound = false;
@@ -93,28 +91,7 @@ bool FunctionAliasPass::runOnModule(Module &M) {
     std::vector<GlobalValue *> matches;
 
     // find matches for regex
-#if LLVM_VERSION_CODE >= LLVM_VERSION(5, 0)
     for (GlobalValue &global : M.global_values()) {
-#else
-    // chain iterators of alias list and function list
-    auto firstIt = M.getAliasList().begin();
-    auto firstIe = M.getAliasList().end();
-    auto secondIt = M.getFunctionList().begin();
-    auto secondIe = M.getFunctionList().end();
-    for (bool firstList = true;;
-         (firstList && (++firstIt != firstIe)) || (++secondIt != secondIe)) {
-      GlobalValue *gv = nullptr;
-      if (firstIt == firstIe)
-        firstList = false;
-      if (firstList) {
-        gv = cast<GlobalValue>(&*firstIt);
-      } else {
-        if (secondIt == secondIe)
-          break;
-        gv = cast<GlobalValue>(&*secondIt);
-      }
-      GlobalValue &global = *gv;
-#endif
       if (!global.hasName())
         continue;