summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-10-10 18:40:01 +0000
committerManman Ren <manman.ren@gmail.com>2013-10-10 18:40:01 +0000
commitb8e48a636e7ee6c13140382eb93d9695a65b0624 (patch)
tree9dfcb4342241d83d94b2f4e8cb036108204ce4b7 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent75a3ad485cb97556145483eb06c88782a7c83697 (diff)
downloadllvm-b8e48a636e7ee6c13140382eb93d9695a65b0624.tar.gz
llvm-b8e48a636e7ee6c13140382eb93d9695a65b0624.tar.bz2
llvm-b8e48a636e7ee6c13140382eb93d9695a65b0624.tar.xz
Debug Info: In DIBuilder, the context field of subprogram is updated to use
DIScopeRef. A paired commit at clang is required due to changes to DIBuilder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192378 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index cfe4ea6e3f..f400eb9921 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -393,9 +393,10 @@ DIE *DwarfDebug::updateSubprogramScopeDIE(CompileUnit *SPCU,
// function then gdb prefers the definition at top level and but does not
// expect specification DIE in parent function. So avoid creating
// specification DIE for a function defined inside a function.
- if (SP.isDefinition() && !SP.getContext().isCompileUnit() &&
- !SP.getContext().isFile() &&
- !isSubprogramContext(SP.getContext())) {
+ DIScope SPContext = resolve(SP.getContext());
+ if (SP.isDefinition() && !SPContext.isCompileUnit() &&
+ !SPContext.isFile() &&
+ !isSubprogramContext(SPContext)) {
SPCU->addFlag(SPDie, dwarf::DW_AT_declaration);
// Add arguments.