Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:aaronpuchert:Backports:SLE-15
klee
0010-Explicitly-enable-opaque-pointer-support-f...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0010-Explicitly-enable-opaque-pointer-support-for-LLVM-15.patch of Package klee
From: Martin Nowack <m.nowack@imperial.ac.uk> Date: Mon, 30 Oct 2023 14:26:01 +0000 Subject: Explicitly enable opaque pointer support for LLVM 15 Patch-mainline: no References: llvm16 This automatically lifts old-style pointers to opaque pointerws. More recent versions use opaque pointers automatically and do not need an explicit enabling. Signed-off-by: Jiri Slaby <jslaby@suse.cz> --- test/Concrete/Makefile.cmake.test.in | 6 ++++-- tools/klee/main.cpp | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/Concrete/Makefile.cmake.test.in b/test/Concrete/Makefile.cmake.test.in index 2282bb08..765ea690 100644 --- a/test/Concrete/Makefile.cmake.test.in +++ b/test/Concrete/Makefile.cmake.test.in @@ -14,6 +14,8 @@ LLVMCC := @LLVMCC@ LLVMAS := @LLVM_AS@ LLVMLINK := @LLVM_LINK@ LLVMCC.CFlags := @OZERO_OPT@ -Wall +LLVMAS.Flags := @LLVM_AS_FLAGS@ +LLVMLINK.Flags := @LLVM_LINK_FLAGS@ # Make sure source files can match the pattern rules VPATH := @CMAKE_CURRENT_SOURCE_DIR@ @@ -28,7 +30,7 @@ Output/%.bc: %.c Output/.dir $(LLVMCC) -emit-llvm -c $(LLVMCC.CFlags) $< -o $@ Output/%.bc: %.ll $(LLVMAS) Output/.dir - $(LLVMAS) -f $< -o $@ + $(LLVMAS) $(LLVMAS.Flags) -f $< -o $@ # We build a separate testingUtils bitcode for each test, to make sure parallel # tests don't interact with one another. @@ -36,7 +38,7 @@ Output/%_testingUtils.bc: _testingUtils.c Output/.dir $(LLVMCC) -emit-llvm -c $(LLVMCC.CFlags) $< -o $@ Output/linked_%.bc: Output/%.bc Output/%_testingUtils.bc - $(LLVMLINK) $< Output/$*_testingUtils.bc -o $@ + $(LLVMLINK) $(LLVMLINK.Flags) $< Output/$*_testingUtils.bc -o $@ .PRECIOUS: Output/.dir diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp index a3062d24..340daf0b 100644 --- a/tools/klee/main.cpp +++ b/tools/klee/main.cpp @@ -1202,6 +1202,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(), -- 2.43.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor