aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Module/KModule.cpp
diff options
context:
space:
mode:
authorMartin Nowack <martin@se.inf.tu-dresden.de>2013-12-05 21:48:38 +0100
committerMartin Nowack <martin@se.inf.tu-dresden.de>2013-12-06 11:46:16 +0100
commitbf6df4192e9404432ff8c787475b352d475ceb85 (patch)
tree0cec3037b3e34f07e07b9f01e36199cca855823d /lib/Module/KModule.cpp
parent6d19d31eed55e18709c95363beafe8f679d6070c (diff)
downloadklee-bf6df4192e9404432ff8c787475b352d475ceb85.tar.gz
Deprecate LLVM 2.8 and lower
Diffstat (limited to 'lib/Module/KModule.cpp')
-rw-r--r--lib/Module/KModule.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp
index 7b23a9c9..49e6cb50 100644
--- a/lib/Module/KModule.cpp
+++ b/lib/Module/KModule.cpp
@@ -30,9 +30,7 @@
#include "llvm/IR/DataLayout.h"
#else
#include "llvm/Instructions.h"
-#if LLVM_VERSION_CODE >= LLVM_VERSION(2, 7)
#include "llvm/LLVMContext.h"
-#endif
#include "llvm/Module.h"
#include "llvm/ValueSymbolTable.h"
#if LLVM_VERSION_CODE <= LLVM_VERSION(3, 1)
@@ -47,14 +45,8 @@
#include "llvm/Support/CallSite.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
-#if LLVM_VERSION_CODE >= LLVM_VERSION(2, 7)
#include "llvm/Support/raw_os_ostream.h"
-#endif
-#if LLVM_VERSION_CODE < LLVM_VERSION(2, 9)
-#include "llvm/System/Path.h"
-#else
#include "llvm/Support/Path.h"
-#endif
#include "llvm/Transforms/Scalar.h"
#include <llvm/Transforms/Utils/Cloning.h>
@@ -435,38 +427,6 @@ void KModule::prepare(const Interpreter::ModuleOptions &opts,
std::ostream *os = ih->openOutputFile("assembly.ll");
assert(os && os->good() && "unable to open source output");
-#if LLVM_VERSION_CODE < LLVM_VERSION(2, 6)
- // We have an option for this in case the user wants a .ll they
- // can compile.
- if (NoTruncateSourceLines) {
- os << *module;
- } else {
- bool truncated = false;
- std::string string;
- llvm::raw_string_ostream rss(string);
- rss << *module;
- rss.flush();
- const char *position = string.c_str();
-
- for (;;) {
- const char *end = index(position, '\n');
- if (!end) {
- os << position;
- break;
- } else {
- unsigned count = (end - position) + 1;
- if (count<255) {
- os->write(position, count);
- } else {
- os->write(position, 254);
- os << "\n";
- truncated = true;
- }
- position = end+1;
- }
- }
- }
-#else
llvm::raw_os_ostream *ros = new llvm::raw_os_ostream(*os);
// We have an option for this in case the user wants a .ll they
@@ -498,7 +458,6 @@ void KModule::prepare(const Interpreter::ModuleOptions &opts,
}
}
delete ros;
-#endif
delete os;
}