7c611aed7c
This adds few fixes, but mostly it updates the rewrite-includes patch. Sadly upstream has decided to rename the option name for whatever reason, so if unchanged 12.2 would be the only clang with the option named this way, causing further problems e.g. with icecream. So it would be very nice to get this into 12.2. As it is an isolated feature, it should be low-risk. OBS-URL: https://build.opensuse.org/request/show/127882 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=155
59 lines
2.9 KiB
Diff
59 lines
2.9 KiB
Diff
commit 5cf55e1c6a22ae066db5066fdc69f99564ace8ea
|
|
Author: Eric Christopher <echristo@apple.com>
|
|
Date: Thu Jul 12 23:30:25 2012 +0000
|
|
|
|
The end of the prologue should be marked with is_stmt.
|
|
Fixes PR13303.
|
|
|
|
Patch by Paul Robinson!
|
|
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160148 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
|
|
index 038792b..649684a 100644
|
|
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
|
|
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
|
|
@@ -1382,7 +1382,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
|
|
MF->getFunction()->getContext());
|
|
recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(),
|
|
FnStartDL.getScope(MF->getFunction()->getContext()),
|
|
- 0);
|
|
+ DWARF2_LINE_DEFAULT_IS_STMT ? DWARF2_FLAG_IS_STMT : 0);
|
|
}
|
|
}
|
|
|
|
diff --git a/test/DebugInfo/X86/pr13303.ll b/test/DebugInfo/X86/pr13303.ll
|
|
new file mode 100644
|
|
index 0000000..e820cb5
|
|
--- /dev/null
|
|
+++ b/test/DebugInfo/X86/pr13303.ll
|
|
@@ -0,0 +1,28 @@
|
|
+; RUN: llc %s -o %t -filetype=obj -mtriple=x86_64-unknown-linux-gnu
|
|
+; RUN: llvm-dwarfdump %t | FileCheck %s
|
|
+; PR13303
|
|
+
|
|
+; Check that the prologue ends with is_stmt here.
|
|
+; CHECK: 0x0000000000000000 {{.*}} is_stmt
|
|
+
|
|
+define i32 @main() nounwind uwtable {
|
|
+entry:
|
|
+ %retval = alloca i32, align 4
|
|
+ store i32 0, i32* %retval
|
|
+ ret i32 0, !dbg !10
|
|
+}
|
|
+
|
|
+!llvm.dbg.cu = !{!0}
|
|
+
|
|
+!0 = metadata !{i32 786449, i32 0, i32 12, metadata !"PR13303.c", metadata !"/home/probinson", metadata !"clang version 3.2 (trunk 160143)", i1 true, i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !3, metadata !1} ; [ DW_TAG_compile_unit ] [/home/probinson/PR13303.c] [DW_LANG_C99]
|
|
+!1 = metadata !{metadata !2}
|
|
+!2 = metadata !{i32 0}
|
|
+!3 = metadata !{metadata !4}
|
|
+!4 = metadata !{metadata !5}
|
|
+!5 = metadata !{i32 786478, i32 0, metadata !6, metadata !"main", metadata !"main", metadata !"", metadata !6, i32 1, metadata !7, i1 false, i1 true, i32 0, i32 0, null, i32 0, i1 false, i32 ()* @main, null, null, metadata !1, i32 1} ; [ DW_TAG_subprogram ] [line 1] [def] [main]
|
|
+!6 = metadata !{i32 786473, metadata !"PR13303.c", metadata !"/home/probinson", null} ; [ DW_TAG_file_type ]
|
|
+!7 = metadata !{i32 786453, i32 0, metadata !"", i32 0, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !8, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
|
|
+!8 = metadata !{metadata !9}
|
|
+!9 = metadata !{i32 786468, null, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
|
|
+!10 = metadata !{i32 1, i32 14, metadata !11, null}
|
|
+!11 = metadata !{i32 786443, metadata !5, i32 1, i32 12, metadata !6, i32 0} ; [ DW_TAG_lexical_block ] [/home/probinson/PR13303.c]
|