lifting-bits / remill

Library for lifting machine code to LLVM bitcode
Apache License 2.0
1.27k stars 143 forks source link

Llvm 7 build #469

Closed Aiethel closed 3 years ago

Aiethel commented 3 years ago

Build for llvm-7 (and possibly others lower than 8) version fails because of some API changes. This PR tries to fix that.

artemdinaburg commented 3 years ago

@Aiethel it looks like CallSite has been removed in LLVM-11; relevant error:

/__w/remill/remill/lib/BC/DeadStoreEliminator.cpp:1191:20: error: no member named 'CallSite' in namespace 'llvm'
  auto val = llvm::CallSite(&inst).getCalledValue()->stripPointerCasts();
             ~~~~~~^
3 errors generated.

Its replacement is AbstractCallSite with a slightly different API. This would require hacking in some compatibility headers.

Aiethel commented 3 years ago

Yeah, I thought that llvm::AbstractCallSite was added along the original llvm::CallSite.

I wrapped the compatibility class into remill::compat::llvm namespace to make the compatibility glue more easily recognizable.

Aiethel commented 3 years ago

Failing test case seems to be unrelated to the changes?

ekilmer commented 3 years ago

Failing test case seems to be unrelated to the changes?

Yes, there is a flaky test on Mac, and the Mac OS 11.0 runners are very inconsistent. CI looks good!