Skip to content

Commit

Permalink
Enable opaque pointers in each spot where we make an LLVM context
Browse files Browse the repository at this point in the history
  • Loading branch information
tetsuo-cpp committed Jun 24, 2022
1 parent 669166d commit 752ddf3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/lift/Lift.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ int main(int argc, char *argv[]) {
// Make sure `--address` and `--entry_address` are in-bounds for the target
// architecture's address size.
llvm::LLVMContext context;
context.enableOpaquePointers();
auto arch = remill::Arch::Get(context, FLAGS_os, FLAGS_arch);
const uint64_t addr_mask = ~0ULL >> (64UL - arch->address_size);
if (FLAGS_address != (FLAGS_address & addr_mask)) {
Expand Down
1 change: 1 addition & 0 deletions tests/AArch64/Lift.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ extern "C" int main(int argc, char *argv[]) {
}

llvm::LLVMContext context;
context.enableOpaquePointers();
auto os_name = remill::GetOSName(REMILL_OS);
auto arch_name = remill::GetArchName(FLAGS_arch);
auto arch = remill::Arch::Build(&context, os_name, arch_name);
Expand Down
1 change: 1 addition & 0 deletions tests/X86/Lift.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ extern "C" int main(int argc, char *argv[]) {
}

llvm::LLVMContext context;
context.enableOpaquePointers();
auto os_name = remill::GetOSName(REMILL_OS);
auto arch_name = remill::GetArchName(FLAGS_arch);
auto arch = remill::Arch::Build(&context, os_name, arch_name);
Expand Down

0 comments on commit 752ddf3

Please sign in to comment.