]> granicus.if.org Git - clang/commitdiff
Add a PrettyStackTraceDecl in CodeGenModule::EmitGlobalDefinition.
authorAnders Carlsson <andersca@mac.com>
Tue, 27 Oct 2009 14:32:27 +0000 (14:32 +0000)
committerAnders Carlsson <andersca@mac.com>
Tue, 27 Oct 2009 14:32:27 +0000 (14:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85237 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index 10f7d84ee8d08d9af6e4d37d77c9f3bf105baefa..1cee3bb501f2175a8e02fd47f970cde5692e20cb 100644 (file)
@@ -601,6 +601,10 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) {
 void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD) {
   const ValueDecl *D = cast<ValueDecl>(GD.getDecl());
 
+  PrettyStackTraceDecl CrashInfo((ValueDecl *)D, D->getLocation(), 
+                                 Context.getSourceManager(),
+                                 "Generating code for declaration");
+  
   if (const CXXConstructorDecl *CD = dyn_cast<CXXConstructorDecl>(D))
     EmitCXXConstructor(CD, GD.getCtorType());
   else if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(D))