about summary refs log tree commit diff homepage
path: root/tools
diff options
context:
space:
mode:
authorMartin Nowack <m.nowack@imperial.ac.uk>2023-10-30 14:26:01 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2024-02-08 13:17:19 +0000
commit44a38ba6f54046cb4a9f8b08a0b8711ad5d5ebaa (patch)
treec9a9711829a52c61ef36594b5ee7e942a0197973 /tools
parentbdc30e5427e9fa4a6fc7c8e0c21ededa8ec8c6a4 (diff)
downloadklee-44a38ba6f54046cb4a9f8b08a0b8711ad5d5ebaa.tar.gz
Explicitly enable opaque pointer support for LLVM 15
This automatically lifts old-style pointers to opaque pointers.
More recent versions use opaque pointers automatically and do not need
an explicit enabling.
Diffstat (limited to 'tools')
-rw-r--r--tools/klee/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index febeb47f..18e67fe6 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -1201,6 +1201,10 @@ int main(int argc, char **argv, char **envp) {
   // Load the bytecode...
   std::string errorMsg;
   LLVMContext ctx;
+#if LLVM_VERSION_CODE == LLVM_VERSION(15, 0)
+  // We have to force the upgrade to opaque pointer explicitly for LLVM 15.
+  ctx.setOpaquePointers(true);
+#endif
   std::vector<std::unique_ptr<llvm::Module>> loadedModules;
   if (!klee::loadFile(InputFile, ctx, loadedModules, errorMsg)) {
     klee_error("error loading program '%s': %s", InputFile.c_str(),