[llvm-dwarfdump-fuzzer] Get this compiling again
Looks like the dwarfdump fuzzer has bitrotted, update it to take into account updates to the libobject API. llvm-svn: 271242
This commit is contained in:
parent
3bdbb10a48
commit
2da766485f
@ -24,10 +24,12 @@ extern "C" void LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
|
||||
std::unique_ptr<MemoryBuffer> Buff = MemoryBuffer::getMemBuffer(
|
||||
StringRef((const char *)data, size), "", false);
|
||||
|
||||
ErrorOr<std::unique_ptr<ObjectFile>> ObjOrErr =
|
||||
Expected<std::unique_ptr<ObjectFile>> ObjOrErr =
|
||||
ObjectFile::createObjectFile(Buff->getMemBufferRef());
|
||||
if (!ObjOrErr)
|
||||
if (auto E = ObjOrErr.takeError()) {
|
||||
consumeError(std::move(E));
|
||||
return;
|
||||
}
|
||||
ObjectFile &Obj = *ObjOrErr.get();
|
||||
std::unique_ptr<DIContext> DICtx(new DWARFContextInMemory(Obj));
|
||||
DICtx->dump(nulls(), DIDT_All);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user