From: Anders Carlsson Date: Tue, 27 Oct 2009 14:32:27 +0000 (+0000) Subject: Add a PrettyStackTraceDecl in CodeGenModule::EmitGlobalDefinition. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e2efcc267ed12dc435782288b7f9a4a1bc56c72;p=clang Add a PrettyStackTraceDecl in CodeGenModule::EmitGlobalDefinition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85237 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 10f7d84ee8..1cee3bb501 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -601,6 +601,10 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) { void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD) { const ValueDecl *D = cast(GD.getDecl()); + PrettyStackTraceDecl CrashInfo((ValueDecl *)D, D->getLocation(), + Context.getSourceManager(), + "Generating code for declaration"); + if (const CXXConstructorDecl *CD = dyn_cast(D)) EmitCXXConstructor(CD, GD.getCtorType()); else if (const CXXDestructorDecl *DD = dyn_cast(D))