Skip to content

Commit 1bc87ab

Browse files
authored
Merge pull request #39982 from xymus/serialization-low-level-error
[Serialization] Reword error message on memory corruption or format failures
2 parents 6313748 + c7774c6 commit 1bc87ab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Serialization/ModuleFile.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,12 @@ class ModuleFile
344344
fatal(expected.takeError());
345345
}
346346

347+
/// Report an unexpected format error that could happen only from a memory-level
348+
/// inconsistency. Please prefer passing an error to `fatal(llvm::Error error)` when possible.
347349
[[noreturn]] void fatal() const {
348350
fatal(llvm::make_error<llvm::StringError>(
349-
"(see \"While...\" info below)", llvm::inconvertibleErrorCode()));
351+
"Memory corruption or serialization format inconsistency.",
352+
llvm::inconvertibleErrorCode()));
350353
}
351354

352355
/// Outputs information useful for diagnostics to \p out

0 commit comments

Comments
 (0)