[llvm] r264990 - [DebugInfo] Subprograms should belong to a CU.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 21:47:57 PDT 2016


On Wed, Mar 30, 2016 at 8:40 PM, Davide Italiano via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: davide
> Date: Wed Mar 30 22:40:07 2016
> New Revision: 264990
>
> URL: http://llvm.org/viewvc/llvm-project?rev=264990&view=rev
> Log:
> [DebugInfo] Subprograms should belong to a CU.
>
> Start fixing tests accordingly. There are still
> about 35 failures before we can enable this check
> in the IR verifier.
>
> Modified:
>     llvm/trunk/test/Bitcode/debug-loc-again.ll
>     llvm/trunk/test/CodeGen/MIR/X86/invalid-metadata-node-type.mir
>     llvm/trunk/test/CodeGen/X86/StackColoring-dbg.ll
>     llvm/trunk/test/CodeGen/X86/machine-trace-metrics-crash.ll
>     llvm/trunk/test/DebugInfo/Generic/2010-03-19-DbgDeclare.ll
>     llvm/trunk/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll
>     llvm/trunk/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll
>     llvm/trunk/test/Transforms/SimplifyCFG/basictest.ll
>     llvm/trunk/test/Transforms/Util/split-bit-piece.ll
>     llvm/trunk/test/Transforms/Util/store-first-op.ll
>

This first pass was more or less trivial, but now all the tests left
have no CU defined.
I tried to port one random test, would be glad if you can take a look
before I keep going.
Also, some of them can't be (alas) easily fixed (SampleProfile) until
Adrian lands his fix.

Thanks!

Index: test/Assembler/dilocation.ll
===================================================================
--- test/Assembler/dilocation.ll (revision 264875)
+++ test/Assembler/dilocation.ll (working copy)
@@ -4,6 +4,9 @@
 ; CHECK: !named = !{!0, !1, !1, !2, !2, !3, !3, !4}
 !named = !{!0, !1, !2, !3, !4, !5, !6, !7}

+!llvm.module.flags = !{!10}
+!llvm.dbg.cu = !{!8}
+
 ; CHECK: !0 = distinct !DISubprogram(
 !0 = distinct !DISubprogram()

@@ -21,3 +24,11 @@

 ; CHECK-NEXT: !4 = !DILocation(line: 4294967295, column: 65535, scope: !0)
 !7 = !DILocation(line: 4294967295, column: 65535, scope: !0)
+
+!8 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
+                             file: !9,
+                             isOptimized: true, flags: "-O2",
+                             splitDebugFilename: "abc.debug", emissionKind: 3,
+                             subprograms: !{!0})
+!9 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
+!10 = !{i32 2, !"Debug Info Version", i32 3}


--
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list