blob: 85445e940395d9b827693111bc88675a6566ae76 [file] [log] [blame]
Eric Christopherf8571862011-08-23 17:56:55 +00001// Check that we verify debug output properly with multiple -arch options.
2//
3// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -ccc-print-phases \
4// RUN: -verify -arch i386 -arch x86_64 %s -g 2> %t
5// RUN: FileCheck -check-prefix=CHECK-MULTIARCH-ACTIONS < %t %s
6//
7// CHECK-MULTIARCH-ACTIONS: 0: input, "{{.*}}darwin-verify-debug.c", c
8// CHECK-MULTIARCH-ACTIONS: 8: dsymutil, {7}, dSYM
9// CHECK-MULTIARCH-ACTIONS: 9: verify, {8}, none
10//
11// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -ccc-print-bindings \
12// RUN: -verify -arch i386 -arch x86_64 %s -g 2> %t
13// 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//
20// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -ccc-print-bindings \
21// RUN: -verify -o foo %s -g 2> %t
22// RUN: FileCheck -check-prefix=CHECK-OUTPUT-NAME < %t %s
23//
24// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Link", inputs: [{{.*}}], output: "foo"
25// 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
31// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -ccc-print-bindings \
32// RUN: -verify -o foo %t.o -g 2> %t
33// RUN: grep "Verify" %t | count 0