diff options
| author | Devang Patel <dpatel@apple.com> | 2009-12-01 18:13:48 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2009-12-01 18:13:48 +0000 |
| commit | 0a2c0bcb149a87d682c154a5a61e90f23fcc323e (patch) | |
| tree | d465e8ce429cdb7d38a16745d617ea67e060e6cb /llvm | |
| parent | 36d4dec28ae66f8663ef39a5a474c3ed5c766dac (diff) | |
| download | bcm5719-llvm-0a2c0bcb149a87d682c154a5a61e90f23fcc323e.tar.gz bcm5719-llvm-0a2c0bcb149a87d682c154a5a61e90f23fcc323e.zip | |
Clear function specific containers while processing end of a function, even if DW_TAG_subprogram for current function is not found.
llvm-svn: 90247
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 16 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/2009-12-01-CurrentFn.ll | 17 |
2 files changed, 24 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index c2e1e0503a8..30264c751bb 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2092,17 +2092,15 @@ void DwarfDebug::endFunction(MachineFunction *MF) { MMI->getFrameMoves())); // Clear debug info - if (CurrentFnDbgScope) { - CurrentFnDbgScope = NULL; - DbgScopeMap.clear(); - DbgScopeBeginMap.clear(); - DbgScopeEndMap.clear(); - ConcreteScopes.clear(); - AbstractScopesList.clear(); - } + CurrentFnDbgScope = NULL; + DbgScopeMap.clear(); + DbgScopeBeginMap.clear(); + DbgScopeEndMap.clear(); + ConcreteScopes.clear(); + AbstractScopesList.clear(); Lines.clear(); - + if (TimePassesIsEnabled) DebugTimer->stopTimer(); } diff --git a/llvm/test/DebugInfo/2009-12-01-CurrentFn.ll b/llvm/test/DebugInfo/2009-12-01-CurrentFn.ll new file mode 100644 index 00000000000..d33a8f476e7 --- /dev/null +++ b/llvm/test/DebugInfo/2009-12-01-CurrentFn.ll @@ -0,0 +1,17 @@ +; RUN: llc < %s | grep "func_end1:" | count 1 + +declare void @foo() + +define void @bar(i32 %i) nounwind ssp { +entry: + tail call void @foo() nounwind, !dbg !0 + ret void, !dbg !0 +} + +!0 = metadata !{i32 9, i32 0, metadata !1, null} +!1 = metadata !{i32 458798, i32 0, metadata !2, metadata !"baz", metadata !"baz", metadata !"baz", metadata !2, i32 8, metadata !3, i1 true, i1 true}; [DW_TAG_subprogram ] +!2 = metadata !{i32 458769, i32 0, i32 1, metadata !"2007-12-VarArrayDebug.c", metadata !"/Volumes/Data/ddunbar/llvm/test/FrontendC", metadata !"4.2.1 (Based on Apple Inc. build 5653) (LLVM build)", i1 true, i1 true, metadata !"", i32 0}; [DW_TAG_compile_unit ] +!3 = metadata !{i32 458773, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !4, i32 0}; [DW_TAG_subroutine_type ] +!4 = metadata !{null, metadata !5} +!5 = metadata !{i32 458788, metadata !2, metadata !"int", metadata !2, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5}; [DW_TAG_base_type ] + |

