about summary refs log tree commit diff homepage
path: root/lib/Module/KModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Module/KModule.cpp')
-rw-r--r--lib/Module/KModule.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp
index eeaa10cf..ea86433e 100644
--- a/lib/Module/KModule.cpp
+++ b/lib/Module/KModule.cpp
@@ -40,7 +40,11 @@
 #else
 #include "llvm/Support/Path.h"
 #endif
-#include "llvm/Target/DataLayout.h"
+#if LLVM_VERSION_CODE <= LLVM_VERSION(3, 1)
+#include "llvm/Target/TargetData.h"
+#else
+#include "llvm/DataLayout.h"
+#endif
 #include "llvm/Transforms/Scalar.h"
 
 #include <sstream>
@@ -90,7 +94,11 @@ namespace {
 
 KModule::KModule(Module *_module) 
   : module(_module),
+#if LLVM_VERSION_CODE <= LLVM_VERSION(3, 1)
+    targetData(new TargetData(module)),
+#else
     targetData(new DataLayout(module)),
+#endif
     dbgStopPointFn(0),
     kleeMergeFn(0),
     infos(0),