summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-19 17:43:43 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-19 17:43:43 +0000
commitb84b4164ecee805c34859e7fd44370a91bd8d8e1 (patch)
treea3bfc1045cb99423b7eb50c66e94cd037db3e512
parent23ee87bda0ca3740b1c020be9890ee55dfc8dbe4 (diff)
downloadbcm5719-llvm-b84b4164ecee805c34859e7fd44370a91bd8d8e1.tar.gz
bcm5719-llvm-b84b4164ecee805c34859e7fd44370a91bd8d8e1.zip
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. llvm-svn: 266773
-rw-r--r--llvm/test/Linker/dicompositetype-unique.ll20
1 files changed, 9 insertions, 11 deletions
diff --git a/llvm/test/Linker/dicompositetype-unique.ll b/llvm/test/Linker/dicompositetype-unique.ll
index 4f3fcec6964..6e4e34bdc2a 100644
--- a/llvm/test/Linker/dicompositetype-unique.ll
+++ b/llvm/test/Linker/dicompositetype-unique.ll
@@ -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(
OpenPOWER on IntegriCloud