blob: 1e4eff8c83f16516291024ad4a9c21ae15d7f021 [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
Eric Christopherf8571862011-08-23 17:56:55 +00004// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -ccc-print-phases \
5// 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//
12// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -ccc-print-bindings \
13// 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//
21// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -ccc-print-bindings \
22// 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
32// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -ccc-print-bindings \
33// RUN: -verify -o foo %t.o -g 2> %t
34// RUN: grep "Verify" %t | count 0