blob: 677419a20c5b514f907210a52acfe651c8ce905f [file] [log] [blame]
Eric Christopherf8571862011-08-23 17:56:55 +00001// Check that we verify debug output properly with multiple -arch options.
2//
Eric Christophera5cf92d2011-08-23 21:47:58 +00003// REQUIRES: asserts
Sebastian Pop9ec60df2012-01-20 22:01:23 +00004// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-phases \
Eric Christopherf8571862011-08-23 17:56:55 +00005// RUN: -verify -arch i386 -arch x86_64 %s -g 2> %t
6// RUN: FileCheck -check-prefix=CHECK-MULTIARCH-ACTIONS < %t %s
7//
8// CHECK-MULTIARCH-ACTIONS: 0: input, "{{.*}}darwin-verify-debug.c", c
9// CHECK-MULTIARCH-ACTIONS: 8: dsymutil, {7}, dSYM
10// CHECK-MULTIARCH-ACTIONS: 9: verify, {8}, none
11//
Sebastian Pop9ec60df2012-01-20 22:01:23 +000012// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
Eric Christopherf8571862011-08-23 17:56:55 +000013// RUN: -verify -arch i386 -arch x86_64 %s -g 2> %t
14// RUN: FileCheck -check-prefix=CHECK-MULTIARCH-BINDINGS < %t %s
15//
16// CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["a.out"], output: "a.out.dSYM"
17// CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin10" - "darwin::VerifyDebug", inputs: ["a.out.dSYM"], output: (nothing)
18
19// Check output name derivation.
20//
Sebastian Pop9ec60df2012-01-20 22:01:23 +000021// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
Eric Christopherf8571862011-08-23 17:56:55 +000022// RUN: -verify -o foo %s -g 2> %t
23// RUN: FileCheck -check-prefix=CHECK-OUTPUT-NAME < %t %s
24//
25// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Link", inputs: [{{.*}}], output: "foo"
26// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["foo"], output: "foo.dSYM"
27// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::VerifyDebug", inputs: ["foo.dSYM"], output: (nothing)
28
29// Check that we only verify when needed.
30//
31// RUN: touch %t.o
Sebastian Pop9ec60df2012-01-20 22:01:23 +000032// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
Eric Christopherf8571862011-08-23 17:56:55 +000033// RUN: -verify -o foo %t.o -g 2> %t
34// RUN: grep "Verify" %t | count 0