Skip to content

Commit 68fa9c4

Browse files
committed
add comment
1 parent f8d6f05 commit 68fa9c4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/tools/llvm-profdata/llvm-profdata.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,8 @@ loadInput(const WeightedFile &Input, SymbolRemapper *Remapper,
780780
// should this interact with different -failure-mode?
781781
std::optional<std::pair<Error, std::string>> ReaderWarning;
782782
auto ReaderWarningScope = llvm::make_scope_exit([&] {
783+
// If we hit a different error we may still have an error in ReaderWarning.
784+
// Consume it now to avoid an assert
783785
if (ReaderWarning)
784786
consumeError(std::move(ReaderWarning->first));
785787
});

0 commit comments

Comments
 (0)