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
This commit is contained in:
Duncan P. N. Exon Smith 2016-04-19 17:43:43 +00:00
parent 23ee87bda0
commit b84b4164ec
1 changed files with 9 additions and 11 deletions

View File

@ -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(