diff options
author | Anders Carlsson <andersca@mac.com> | 2009-10-27 14:32:27 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-10-27 14:32:27 +0000 |
commit | 8e2efcc267ed12dc435782288b7f9a4a1bc56c72 (patch) | |
tree | 631567f538b6e0b27c24e42e90b9f3a883719bf5 /lib/CodeGen/CodeGenModule.cpp | |
parent | b3eca29e2b1f11d2daa06feb23e006f69be759c7 (diff) |
Add a PrettyStackTraceDecl in CodeGenModule::EmitGlobalDefinition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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<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)) |