mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 15:10:59 +03:00
Adapt jit-rt to LLVM 9
This commit is contained in:
parent
030123410a
commit
0ab79c1950
3 changed files with 14 additions and 1 deletions
|
@ -323,7 +323,13 @@ void disassemble(const llvm::TargetMachine &tm,
|
|||
if (object.section_end() != secIt) {
|
||||
const auto sec = *secIt;
|
||||
llvm::StringRef data;
|
||||
#if LDC_LLVM_VER >= 900
|
||||
auto dataOrError = sec.getContents();
|
||||
assert(dataOrError);
|
||||
data = *dataOrError;
|
||||
#else
|
||||
sec.getContents(data);
|
||||
#endif
|
||||
|
||||
if (llvm::object::SymbolRef::ST_Function ==
|
||||
llvm::cantFail(symbol.getType())) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue