diff options
author | Amy Huang <akhuang@google.com> | 2020-04-21 12:34:42 -0700 |
---|---|---|
committer | Amy Huang <akhuang@google.com> | 2020-04-21 12:36:55 -0700 |
commit | 1e1f5eb7c978da3b062daaf3c32c459704e65a55 (patch) | |
tree | ebc2f95bc774982b8f9c808c9ae69f82e4882a2f /llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp | |
parent | a6c1692cb30e62c94513c2c6262cd76df92ef892 (diff) | |
download | llvm-1e1f5eb7c978da3b062daaf3c32c459704e65a55.zip llvm-1e1f5eb7c978da3b062daaf3c32c459704e65a55.tar.gz llvm-1e1f5eb7c978da3b062daaf3c32c459704e65a55.tar.bz2 |
[NativeSession] Fix unchecked Expected type
(followup to https://reviews.llvm.org/D78128)
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp index 73a28ff..d12fec9 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp @@ -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"); } |