[NativeSession] Fix unchecked Expected type

(followup to https://reviews.llvm.org/D78128)
This commit is contained in:
Amy Huang 2020-04-21 12:34:42 -07:00
parent a6c1692cb3
commit 1e1f5eb7c9
1 changed files with 4 additions and 1 deletions

View File

@ -173,8 +173,11 @@ NativeSession::searchForPdb(const PdbSearchOptions &Opts) {
sys::path::append(PdbPath, PdbName); sys::path::append(PdbPath, PdbName);
auto Allocator = std::make_unique<BumpPtrAllocator>(); auto Allocator = std::make_unique<BumpPtrAllocator>();
if (loadPdbFile(PdbPath, Allocator))
if (auto File = loadPdbFile(PdbPath, Allocator))
return std::string(PdbPath); return std::string(PdbPath);
else
return File.takeError();
return make_error<RawError>("PDB not found"); return make_error<RawError>("PDB not found");
} }