Skip to content

Commit 1e1f5eb

Browse files
committed
[NativeSession] Fix unchecked Expected type
(followup to https://reviews.llvm.org/D78128)
1 parent a6c1692 commit 1e1f5eb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,11 @@ NativeSession::searchForPdb(const PdbSearchOptions &Opts) {
173173
sys::path::append(PdbPath, PdbName);
174174

175175
auto Allocator = std::make_unique<BumpPtrAllocator>();
176-
if (loadPdbFile(PdbPath, Allocator))
176+
177+
if (auto File = loadPdbFile(PdbPath, Allocator))
177178
return std::string(PdbPath);
179+
else
180+
return File.takeError();
178181

179182
return make_error<RawError>("PDB not found");
180183
}

0 commit comments

Comments
 (0)