2011-08-24 01:56:55 +08:00
|
|
|
// Check that we verify debug output properly with multiple -arch options.
|
|
|
|
//
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-phases \
|
2014-01-17 10:06:23 +08:00
|
|
|
// RUN: --verify-debug-info -arch i386 -arch x86_64 %s -g 2> %t
|
2011-08-24 01:56:55 +08:00
|
|
|
// RUN: FileCheck -check-prefix=CHECK-MULTIARCH-ACTIONS < %t %s
|
|
|
|
//
|
|
|
|
// CHECK-MULTIARCH-ACTIONS: 0: input, "{{.*}}darwin-verify-debug.c", c
|
Reapply "Change -save-temps to emit unoptimized bitcode files."
This reapplies r224503 along with a fix for compiling Fortran by having the
clang driver invoke gcc (see r224546, where it was reverted). I have added
a testcase for that as well.
Original commit message:
It is often convenient to use -save-temps to collect the intermediate
results of a compilation, e.g., when triaging a bug report. Besides the
temporary files for preprocessed source and assembly code, this adds the
unoptimized bitcode files as well.
This adds a new BackendJobAction, which is mostly mechanical, to run after
the CompileJobAction. When not using -save-temps, the BackendJobAction is
combined into one job with the CompileJobAction, similar to the way the
integrated assembler is handled. I've implemented this entirely as a
driver change, so under the hood, it is just using -disable-llvm-optzns
to get the unoptimized bitcode.
Based in part on a patch by Steven Wu.
rdar://problem/18909437
llvm-svn: 224688
2014-12-21 15:00:00 +08:00
|
|
|
// CHECK-MULTIARCH-ACTIONS: 9: dsymutil, {8}, dSYM
|
|
|
|
// CHECK-MULTIARCH-ACTIONS: 10: verify-debug-info, {9}, none
|
2011-08-24 01:56:55 +08:00
|
|
|
//
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
|
2014-01-17 10:06:23 +08:00
|
|
|
// RUN: --verify-debug-info -arch i386 -arch x86_64 %s -g 2> %t
|
2011-08-24 01:56:55 +08:00
|
|
|
// RUN: FileCheck -check-prefix=CHECK-MULTIARCH-BINDINGS < %t %s
|
|
|
|
//
|
|
|
|
// CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["a.out"], output: "a.out.dSYM"
|
|
|
|
// CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin10" - "darwin::VerifyDebug", inputs: ["a.out.dSYM"], output: (nothing)
|
|
|
|
|
|
|
|
// Check output name derivation.
|
|
|
|
//
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
|
2014-01-17 10:06:23 +08:00
|
|
|
// RUN: --verify-debug-info -o foo %s -g 2> %t
|
2011-08-24 01:56:55 +08:00
|
|
|
// RUN: FileCheck -check-prefix=CHECK-OUTPUT-NAME < %t %s
|
|
|
|
//
|
|
|
|
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Link", inputs: [{{.*}}], output: "foo"
|
|
|
|
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["foo"], output: "foo.dSYM"
|
|
|
|
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::VerifyDebug", inputs: ["foo.dSYM"], output: (nothing)
|
|
|
|
|
|
|
|
// Check that we only verify when needed.
|
|
|
|
//
|
|
|
|
// RUN: touch %t.o
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
|
2014-01-17 10:06:23 +08:00
|
|
|
// RUN: --verify-debug-info -o foo %t.o -g 2> %t
|
2013-07-04 23:22:16 +08:00
|
|
|
// RUN: not grep "Verify" %t
|