[PATCH] D23056: Adding test for DIMacro and DIMacroFile comparison implementation

Amjad Aboud via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 02:54:53 PDT 2016


aaboud created this revision.
aaboud added a reviewer: dblaikie.
aaboud added subscribers: llvm-commits, bwyma.

This patch contains a LIT test that covers the fix committed in rL277290.

https://reviews.llvm.org/D23056

Files:
  test/DebugInfo/macro_link.ll

Index: test/DebugInfo/macro_link.ll
===================================================================
--- test/DebugInfo/macro_link.ll
+++ test/DebugInfo/macro_link.ll
@@ -0,0 +1,40 @@
+; RUN: llvm-link %s %s -S -o -| FileCheck %s
+
+; This test checks that DIMacro and DIMacroFile comaprison works correctly.
+
+; CHECK: !llvm.dbg.cu = !{!0, !11}
+; CHECK: !llvm.ident = !{!12, !12}
+; CHECK: !llvm.module.flags = !{!13}
+
+; CHECK: !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 4.0.0 (trunk 276746)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, macros: !3)
+; CHECK: !1 = !DIFile(filename: "t.c", directory: "/")
+; CHECK: !2 = !{}
+; CHECK: !3 = !{!4, !5}
+; CHECK: !4 = !DIMacro(type: DW_MACINFO_undef, line: 1, name: "X")
+; CHECK: !5 = !DIMacroFile(line: 2, file: !6, nodes: !7)
+; CHECK: !6 = !DIFile(filename: "t.h", directory: "/")
+; CHECK: !7 = !{!8, !9}
+; CHECK: !8 = !DIMacro(type: DW_MACINFO_define, line: 3, name: "X", value: "5")
+; CHECK: !9 = !DIMacroFile(line: 4, file: !10)
+; CHECK: !10 = !DIFile(filename: "t2.h", directory: "/")
+; CHECK: !11 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 4.0.0 (trunk 276746)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, macros: !3)
+; CHECK: !12 = !{!"clang version 4.0.0 (trunk 276746)"}
+; CHECK: !13 = !{i32 2, !"Debug Info Version", i32 3}
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!11}
+!llvm.ident = !{!12}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 4.0.0 (trunk 276746)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, macros: !3)
+!1 = !DIFile(filename: "t.c", directory: "/")
+!2 = !{}
+!3 = !{!4, !5}
+!4 = !DIMacro(type: DW_MACINFO_undef, line: 1, name: "X")
+!5 = !DIMacroFile(line: 2, file: !6, nodes: !7)
+!6 = !DIFile(filename: "t.h", directory: "/")
+!7 = !{!8, !9}
+!8 = !DIMacro(type: DW_MACINFO_define, line: 3, name: "X", value: "5")
+!9 = !DIMacroFile(line: 4, file: !10)
+!10 = !DIFile(filename: "t2.h", directory: "/")
+!11 = !{i32 2, !"Debug Info Version", i32 3}
+!12 = !{!"clang version 4.0.0 (trunk 276746)"}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23056.66447.patch
Type: text/x-patch
Size: 2220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160802/21652e36/attachment.bin>


More information about the llvm-commits mailing list