[Serialization] Save path traces from failed cross-references.

This is important information in a crash trace, so let's make sure to
preserve it even as the stack unwinds.
This commit is contained in:
Jordan Rose
2017-04-05 16:40:53 -07:00
parent 3dbc9de75b
commit e831dca955
3 changed files with 74 additions and 28 deletions

View File

@@ -436,6 +436,10 @@ public:
return getStatus();
}
/// Emits one last diagnostic, logs the error, and then aborts for the stack
/// trace.
void fatal(llvm::Error error) LLVM_ATTRIBUTE_NORETURN;
ASTContext &getContext() const {
assert(FileContext && "no associated context yet");
return FileContext->getParentModule()->getASTContext();