From 1e879d8be6322f9f974db3dc7dc4279ea46b4645 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Fri, 23 Mar 2018 00:07:18 +0000 Subject: Sink PrettyDeclStackTrace down to the AST library ...and add some very basic stack trace entries for module building. This would have helped track down rdar://problem/38434694 sooner. llvm-svn: 328276 --- clang/lib/Frontend/CompilerInstance.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/lib/Frontend/CompilerInstance.cpp') diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index bb8b8572fa7..1ed254d6aed 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -1170,6 +1170,11 @@ compileModuleImpl(CompilerInstance &ImportingInstance, SourceLocation ImportLoc, llvm::CrashRecoveryContext CRC; CRC.RunSafelyOnThread( [&]() { + SmallString<64> CrashInfoMessage("While building module for '"); + CrashInfoMessage += ModuleName; + CrashInfoMessage += "'"; + llvm::PrettyStackTraceString CrashInfo(CrashInfoMessage.c_str()); + GenerateModuleFromModuleMapAction Action; Instance.ExecuteAction(Action); }, -- cgit v1.2.3