move to LLVM 3.9
This change removes support for earlier LLVM versions; making them work as well is simply too tedious. Change-Id: I372a151279ceb2bfd6de101c9e0c15f0a4b18c03
This commit is contained in:
@ -104,14 +104,20 @@ bool AdvancedMemoryImporter::handle_ip_event(fail::simtime_t curtime, instructio
|
||||
llvm::InitializeAllTargetMCs();
|
||||
llvm::InitializeAllDisassemblers();
|
||||
|
||||
if (llvm::error_code ec = createBinary(m_elf->getFilename(), binary)) {
|
||||
LOG << m_elf->getFilename() << "': " << ec.message() << ".\n";
|
||||
Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(m_elf->getFilename());
|
||||
if (!BinaryOrErr) {
|
||||
std::string Buf;
|
||||
raw_string_ostream OS(Buf);
|
||||
logAllUnhandledErrors(std::move(BinaryOrErr.takeError()), OS, "");
|
||||
OS.flush();
|
||||
LOG << m_elf->getFilename() << "': " << Buf << ".\n";
|
||||
return false;
|
||||
}
|
||||
binary = &(*BinaryOrErr.get().getBinary());
|
||||
|
||||
// necessary due to an AspectC++ bug triggered by LLVM 3.3's dyn_cast()
|
||||
#ifndef __puma
|
||||
ObjectFile *obj = dyn_cast<ObjectFile>(binary.get());
|
||||
ObjectFile *obj = dyn_cast<ObjectFile>(binary);
|
||||
disas.reset(new LLVMDisassembler(obj));
|
||||
#endif
|
||||
disas->disassemble();
|
||||
|
||||
Reference in New Issue
Block a user