diff options
author | Jordan Rose <jordan_rose@apple.com> | 2018-03-23 00:07:18 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2018-03-23 00:07:18 +0000 |
commit | 1e879d8be6322f9f974db3dc7dc4279ea46b4645 (patch) | |
tree | 4d19017996100e775e6eda980bec9bf4101c384f /clang/lib/Serialization/ASTWriterDecl.cpp | |
parent | 37eeb32046d27f78d5ef52f02b81dfd295281fff (diff) | |
download | bcm5719-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/Serialization/ASTWriterDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterDecl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp index 6a426036a26..d70debaf85f 100644 --- a/clang/lib/Serialization/ASTWriterDecl.cpp +++ b/clang/lib/Serialization/ASTWriterDecl.cpp @@ -17,6 +17,7 @@ #include "clang/AST/DeclTemplate.h" #include "clang/AST/DeclVisitor.h" #include "clang/AST/Expr.h" +#include "clang/AST/PrettyDeclStackTrace.h" #include "clang/Basic/SourceManager.h" #include "clang/Serialization/ASTReader.h" #include "clang/Serialization/ASTWriter.h" @@ -2227,6 +2228,9 @@ static bool isRequiredDecl(const Decl *D, ASTContext &Context, } void ASTWriter::WriteDecl(ASTContext &Context, Decl *D) { + PrettyDeclStackTraceEntry CrashInfo(Context, D, SourceLocation(), + "serializing"); + // Determine the ID for this declaration. serialization::DeclID ID; assert(!D->isFromASTFile() && "should not be emitting imported decl"); |