blob: 6b91290866a4be03ccaf2e8c2c9f388ca492a045 [file] [log] [blame]
Eric Christopher551ef452011-08-23 17:56:55 +00001// Check that we verify debug output properly with multiple -arch options.
2//
Sebastian Pop422377c2012-01-20 22:01:23 +00003// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-phases \
Alp Tokere9d2bfc2014-01-17 02:06:23 +00004// RUN: --verify-debug-info -arch i386 -arch x86_64 %s -g 2> %t
Eric Christopher551ef452011-08-23 17:56:55 +00005// RUN: FileCheck -check-prefix=CHECK-MULTIARCH-ACTIONS < %t %s
6//
7// CHECK-MULTIARCH-ACTIONS: 0: input, "{{.*}}darwin-verify-debug.c", c
Bob Wilson23a55f12014-12-21 07:00:00 +00008// CHECK-MULTIARCH-ACTIONS: 9: dsymutil, {8}, dSYM
9// CHECK-MULTIARCH-ACTIONS: 10: verify-debug-info, {9}, none
Eric Christopher551ef452011-08-23 17:56:55 +000010//
Sebastian Pop422377c2012-01-20 22:01:23 +000011// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
Alp Tokere9d2bfc2014-01-17 02:06:23 +000012// RUN: --verify-debug-info -arch i386 -arch x86_64 %s -g 2> %t
Eric Christopher551ef452011-08-23 17:56:55 +000013// RUN: FileCheck -check-prefix=CHECK-MULTIARCH-BINDINGS < %t %s
14//
15// CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["a.out"], output: "a.out.dSYM"
16// CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin10" - "darwin::VerifyDebug", inputs: ["a.out.dSYM"], output: (nothing)
17
18// Check output name derivation.
19//
Sebastian Pop422377c2012-01-20 22:01:23 +000020// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
Alp Tokere9d2bfc2014-01-17 02:06:23 +000021// RUN: --verify-debug-info -o foo %s -g 2> %t
Eric Christopher551ef452011-08-23 17:56:55 +000022// RUN: FileCheck -check-prefix=CHECK-OUTPUT-NAME < %t %s
23//
Douglas Katzman95354292015-06-23 20:42:09 +000024// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Linker", inputs: [{{.*}}], output: "foo"
Eric Christopher551ef452011-08-23 17:56:55 +000025// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["foo"], output: "foo.dSYM"
26// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::VerifyDebug", inputs: ["foo.dSYM"], output: (nothing)
27
28// Check that we only verify when needed.
29//
30// RUN: touch %t.o
Sebastian Pop422377c2012-01-20 22:01:23 +000031// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
Alp Tokere9d2bfc2014-01-17 02:06:23 +000032// RUN: --verify-debug-info -o foo %t.o -g 2> %t
Rafael Espindolabe8a91b2013-07-04 15:22:16 +000033// RUN: not grep "Verify" %t