Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Commit

Permalink
Fix bad LoadInst compat for LLVM 11 (#739)
Browse files Browse the repository at this point in the history
* Fix bad LoadInst compat for LLVM 11

* Add lifter smoketest. Just check for 0 return

* Use macos 10.15 CI runner
  • Loading branch information
ekilmer committed Mar 2, 2021
1 parent 62293ae commit 2ed00dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/vcpkg_ci.yml
Expand Up @@ -66,13 +66,15 @@ jobs:
# --help return non-zero and fails...
mcsema-lift-${{ matrix.llvm }}.0 --version
mcsema-disass-2 --help
mcsema-lift-${{ matrix.llvm }}.0 --arch amd64 --os linux --cfg ./tests/test_suite_generator/generated/prebuilt_cfg/amd64/linux/cfg/hello_world --output hello_world.bc
mcsema-lift-${{ matrix.llvm }}.0 --arch x86 --os linux --cfg ./tests/test_suite_generator/generated/prebuilt_cfg/x86/linux/cfg/hello_world --output hello_world.bc
build_mac:
strategy:
fail-fast: false
matrix:
os: [
'macos-11.0'
'macos-10.15'
]
llvm: [
'11'
Expand Down
2 changes: 1 addition & 1 deletion mcsema/BC/Optimize.cpp
Expand Up @@ -1542,7 +1542,7 @@ static void GlobalizeStateStructures(void) {
#if LLVM_VERSION_NUMBER < LLVM_VERSION(11, 0)
new llvm::LoadInst(ptr, load->getName(), load)
#else
new llvm::LoadInst(ptr->getType(), ptr, load->getName(), load)
new llvm::LoadInst(ptr->getType()->getPointerElementType(), ptr, load->getName(), load)
#endif
);
to_remove.push_back(itp);
Expand Down

0 comments on commit 2ed00dc

Please sign in to comment.