Add a PrettyStackTraceDecl in CodeGenModule::EmitGlobalDefinition.

llvm-svn: 85237
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 10f7d84..1cee3bb 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -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))