summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2018-03-23 00:07:18 +0000
committerJordan Rose <jordan_rose@apple.com>2018-03-23 00:07:18 +0000
commit1e879d8be6322f9f974db3dc7dc4279ea46b4645 (patch)
tree4d19017996100e775e6eda980bec9bf4101c384f /clang/lib/Frontend/CompilerInstance.cpp
parent37eeb32046d27f78d5ef52f02b81dfd295281fff (diff)
downloadbcm5719-llvm-1e879d8be6322f9f974db3dc7dc4279ea46b4645.tar.gz
bcm5719-llvm-1e879d8be6322f9f974db3dc7dc4279ea46b4645.zip
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
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp5
1 files changed, 5 insertions, 0 deletions
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);
},
OpenPOWER on IntegriCloud