[llvm] r266773 - Linker: Simplify test/Linker/dicompositetype-unique.ll, NFC

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 10:43:43 PDT 2016


Author: dexonsmith
Date: Tue Apr 19 12:43:43 2016
New Revision: 266773

URL: http://llvm.org/viewvc/llvm-project?rev=266773&view=rev
Log:
Linker: Simplify test/Linker/dicompositetype-unique.ll, NFC

Simplify the test logic a little, sharing logic between the two linking
directions by specifying -check-prefix multiple times.  Now it's more
obvious what's hte same and different between the two directions, and
there is less CHECK duplication.  This is a prep for expanding the test.

Modified:
    llvm/trunk/test/Linker/dicompositetype-unique.ll

Modified: llvm/trunk/test/Linker/dicompositetype-unique.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/dicompositetype-unique.ll?rev=266773&r1=266772&r2=266773&view=diff
==============================================================================
--- llvm/trunk/test/Linker/dicompositetype-unique.ll (original)
+++ llvm/trunk/test/Linker/dicompositetype-unique.ll Tue Apr 19 12:43:43 2016
@@ -1,34 +1,32 @@
 ; RUN: llvm-link -S -o - %s %S/Inputs/dicompositetype-unique.ll \
-; RUN:   | FileCheck %s
+; RUN:   | FileCheck %s -check-prefix CHECK -check-prefix FORWARD
 ; RUN: llvm-link -S -o - %S/Inputs/dicompositetype-unique.ll %s \
-; RUN:   | FileCheck %s -check-prefix REVERSE
+; RUN:   | FileCheck %s -check-prefix CHECK -check-prefix REVERSE
 ; RUN: llvm-link -disable-debug-info-type-map -S -o - %s %S/Inputs/dicompositetype-unique.ll \
 ; RUN:   | FileCheck %s -check-prefix NOMAP
 
 ; Check that the bitcode reader handles this too.
 ; RUN: llvm-as -o %t1.bc <%s
 ; RUN: llvm-as -o %t2.bc <%S/Inputs/dicompositetype-unique.ll
-; RUN: llvm-link -S -o - %t1.bc %t2.bc | FileCheck %s
-; RUN: llvm-link -S -o - %t2.bc %t1.bc | FileCheck %s -check-prefix REVERSE
+; RUN: llvm-link -S -o - %t1.bc %t2.bc \
+; RUN:   | FileCheck %s -check-prefix CHECK -check-prefix FORWARD
+; RUN: llvm-link -S -o - %t2.bc %t1.bc \
+; RUN:   | FileCheck %s -check-prefix CHECK -check-prefix REVERSE
 ; RUN: llvm-link -disable-debug-info-type-map -S -o - %t1.bc %t2.bc \
 ; RUN:   | FileCheck %s -check-prefix NOMAP
 
 ; Check that the type map will unique two DICompositeTypes.
 
 ; CHECK:   !named = !{!0, !1, !0, !1}
-; REVERSE: !named = !{!0, !1, !0, !1}
 ; NOMAP:   !named = !{!0, !1, !0, !2}
 !named = !{!0, !1}
 
 ; Check both directions.
 ; CHECK:        !1 = distinct !DICompositeType(
-; CHECK-SAME:                         name: "T1"
-; CHECK-SAME:                         identifier: "T"
+; FORWARD-SAME:                                name: "T1"
+; REVERSE-SAME:                                name: "T2"
+; CHECK-SAME:                                  identifier: "T"
 ; CHECK-NOT:       identifier: "T"
-; REVERSE:      !1 = distinct !DICompositeType(
-; REVERSE-SAME:                       name: "T2"
-; REVERSE-SAME:                       identifier: "T"
-; REVERSE-NOT:     identifier: "T"
 
 ; These types are different, so we should get both copies when there is no map.
 ; NOMAP:        !1 = !DICompositeType(




More information about the llvm-commits mailing list