[cfe-commits] r85237 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Anders Carlsson andersca at mac.com
Tue Oct 27 07:32:27 PDT 2009


Author: andersca
Date: Tue Oct 27 09:32:27 2009
New Revision: 85237

URL: http://llvm.org/viewvc/llvm-project?rev=85237&view=rev
Log:
Add a PrettyStackTraceDecl in CodeGenModule::EmitGlobalDefinition.

Modified:
    cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=85237&r1=85236&r2=85237&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Tue Oct 27 09:32:27 2009
@@ -601,6 +601,10 @@
 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))





More information about the cfe-commits mailing list