about summary refs log tree commit diff homepage
path: root/tools
diff options
context:
space:
mode:
authorCristian Cadar <cristic@cs.stanford.edu>2012-06-19 14:42:46 +0000
committerCristian Cadar <cristic@cs.stanford.edu>2012-06-19 14:42:46 +0000
commit0b72d4e2102f55b2d38e9b4e9912c0eb3710ba54 (patch)
tree80e4b3dbc855de46cd4390132b22aaccb5ad121d /tools
parent87d1428fb69c6c278ed2eb663cebdfb7c4c6d859 (diff)
downloadklee-0b72d4e2102f55b2d38e9b4e9912c0eb3710ba54.tar.gz
Patch by Seungbeom Kim for compatibility with old LLVM 2.6.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@158721 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/klee/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index 68ef98d4..2046be05 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -1158,8 +1158,8 @@ int main(int argc, char **argv, char **envp) {
   sys::SetInterruptFunction(interrupt_handle);
 
   // Load the bytecode...
-#if LLVM_VERSION_CODE < LLVM_VERSION(2, 7)
   std::string ErrorMsg;
+#if LLVM_VERSION_CODE < LLVM_VERSION(2, 7)
   ModuleProvider *MP = 0;
   if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(InputFile, &ErrorMsg)) {
     MP = getBitcodeModuleProvider(Buffer, getGlobalContext(), &ErrorMsg);
@@ -1172,8 +1172,7 @@ int main(int argc, char **argv, char **envp) {
   Module *mainModule = MP->materializeModule();
   MP->releaseModule();
   delete MP;
-#endif
-  std::string ErrorMsg;
+#else
   Module *mainModule = 0;
 #if LLVM_VERSION_CODE < LLVM_VERSION(2, 9)
   MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(InputFile, &ErrorMsg);
@@ -1200,6 +1199,7 @@ int main(int argc, char **argv, char **envp) {
   if (!mainModule)
     klee_error("error loading program '%s': %s", InputFile.c_str(),
                ErrorMsg.c_str());
+#endif
 
   if (WithPOSIXRuntime) {
     int r = initEnv(mainModule);