mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
llvm-pdbdump-fuzzer: fix the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271352 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1fa1983597
commit
4d3c482d43
@ -23,7 +23,7 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
extern "C" void LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
|
||||
std::unique_ptr<MemoryBuffer> Buff = MemoryBuffer::getMemBuffer(
|
||||
StringRef((const char *)data, size), "", false);
|
||||
|
||||
@ -33,32 +33,32 @@ extern "C" void LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
|
||||
std::unique_ptr<pdb::PDBFile> File(new pdb::PDBFile(std::move(Buff)));
|
||||
if (auto E = File->parseFileHeaders()) {
|
||||
consumeError(std::move(E));
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
if (auto E = File->parseStreamData()) {
|
||||
consumeError(std::move(E));
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto DbiS = File->getPDBDbiStream();
|
||||
if (auto E = DbiS.takeError()) {
|
||||
consumeError(std::move(E));
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
auto TpiS = File->getPDBTpiStream();
|
||||
if (auto E = TpiS.takeError()) {
|
||||
consumeError(std::move(E));
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
auto IpiS = File->getPDBIpiStream();
|
||||
if (auto E = IpiS.takeError()) {
|
||||
consumeError(std::move(E));
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
auto InfoS = File->getPDBInfoStream();
|
||||
if (auto E = InfoS.takeError()) {
|
||||
consumeError(std::move(E));
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
pdb::DbiStream &DS = DbiS.get();
|
||||
|
||||
@ -66,7 +66,7 @@ extern "C" void LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
|
||||
pdb::ModStream ModS(*File, Modi.Info);
|
||||
if (auto E = ModS.reload()) {
|
||||
consumeError(std::move(E));
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
codeview::CVSymbolDumper SD(P, TD, nullptr, false);
|
||||
bool HadError = false;
|
||||
@ -74,4 +74,5 @@ extern "C" void LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
|
||||
SD.dump(S);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user