forked from OSchip/llvm-project
[NativeSession] Fix unchecked Expected type
(followup to https://reviews.llvm.org/D78128)
This commit is contained in:
parent
a6c1692cb3
commit
1e1f5eb7c9
|
@ -173,8 +173,11 @@ NativeSession::searchForPdb(const PdbSearchOptions &Opts) {
|
|||
sys::path::append(PdbPath, PdbName);
|
||||
|
||||
auto Allocator = std::make_unique<BumpPtrAllocator>();
|
||||
if (loadPdbFile(PdbPath, Allocator))
|
||||
|
||||
if (auto File = loadPdbFile(PdbPath, Allocator))
|
||||
return std::string(PdbPath);
|
||||
else
|
||||
return File.takeError();
|
||||
|
||||
return make_error<RawError>("PDB not found");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue