Skip to content

Commit

Permalink
Remove the -ccc-no-clang option.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167093 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
espindola committed Oct 31, 2012
1 parent 3719ed2 commit 8c610b0
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 46 deletions.
3 changes: 0 additions & 3 deletions include/clang/Driver/Driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@ class Driver {
/// jobs.
unsigned CheckInputsExist : 1;

/// Use the clang compiler where possible.
unsigned CCCUseClang : 1;

/// \brief Force use of clang frontend.
unsigned ForcedClangUse : 1;

Expand Down
2 changes: 0 additions & 2 deletions include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ def ccc_echo : Flag<["-"], "ccc-echo">, CCCDriverOpt,
def ccc_gcc_name : Separate<["-"], "ccc-gcc-name">, CCCDriverOpt,
HelpText<"Name for native GCC compiler">,
MetaVarName<"<gcc-path>">;
def ccc_no_clang : Flag<["-"], "ccc-no-clang">, CCCDriverOpt,
HelpText<"Disable the clang compiler">;
def ccc_clang_archs : Separate<["-"], "ccc-clang-archs">, CCCDriverOpt,
HelpText<"Comma separate list of architectures to use the clang compiler for">,
MetaVarName<"<arch-list>">;
Expand Down
4 changes: 1 addition & 3 deletions lib/Driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Driver::Driver(StringRef ClangExecutable,
CCCIsCPP(false),CCCEcho(false), CCCPrintBindings(false),
CCPrintOptions(false), CCPrintHeaders(false), CCLogDiagnostics(false),
CCGenDiagnostics(false), CCCGenericGCCName(""), CheckInputsExist(true),
CCCUseClang(true),
ForcedClangUse(false), CCCUsePCH(true), SuppressMissingInputWarning(false) {

Name = llvm::sys::path::stem(ClangExecutable);
Expand Down Expand Up @@ -277,7 +276,6 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
CCCGenericGCCName = A->getValue(*Args);
CCCUsePCH = Args->hasFlag(options::OPT_ccc_pch_is_pch,
options::OPT_ccc_pch_is_pth);
CCCUseClang = !Args->hasArg(options::OPT_ccc_no_clang);
// FIXME: DefaultTargetTriple is used by the target-prefixed calls to as/ld
// and getToolChain is const.
if (const Arg *A = Args->getLastArg(options::OPT_target))
Expand Down Expand Up @@ -1780,7 +1778,7 @@ bool Driver::ShouldUseClangCompiler(const Compilation &C, const JobAction &JA,
const llvm::Triple &Triple) const {
// Check if user requested no clang, or clang doesn't understand this type (we
// only handle single inputs for now).
if (!CCCUseClang || JA.size() != 1 ||
if (JA.size() != 1 ||
!types::isAcceptedByClang((*JA.begin())->getType()))
return false;

Expand Down
2 changes: 1 addition & 1 deletion test/Driver/arm-darwin-builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// RUX: not grep -- "-fno-builtin-strcat" %t &&
// RUX: not grep -- "-fno-builtin-strcpy" %t &&

// RUN: %clang -ccc-no-clang -target x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s -fbuiltin-strcat -fbuiltin-strcpy 2> %t
// RUN: %clang -target x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s -fbuiltin-strcat -fbuiltin-strcpy 2> %t
// RUN: not grep -- "-fno-builtin-strcat" %t
// RUN: not grep -- "-fno-builtin-strcpy" %t

17 changes: 0 additions & 17 deletions test/Driver/bindings.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,11 @@
// CHECK01: "gcc::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
// CHECK01: "gcc::Link", inputs: ["{{.*}}.o"], output: "a.out"

// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang %s 2>&1 | FileCheck %s --check-prefix=CHECK02
// CHECK02: "gcc::Compile", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.s"
// CHECK02: "gcc::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
// CHECK02: "gcc::Link", inputs: ["{{.*}}.o"], output: "a.out"

// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp %s 2>&1 | FileCheck %s --check-prefix=CHECK03
// CHECK03: "gcc::Preprocess", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.i"
// CHECK03: "gcc::Compile", inputs: ["{{.*}}.i"], output: "{{.*}}.s"
// CHECK03: "gcc::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
// CHECK03: "gcc::Link", inputs: ["{{.*}}.o"], output: "a.out"

// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -x c-header %s 2>&1 | FileCheck %s --check-prefix=CHECK04
// CHECK04: "gcc::Precompile", inputs: ["{{.*}}bindings.c"], output: "{{.*}}bindings.c.gch

// Clang control options

// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=CHECK05
// CHECK05: "clang", inputs: ["{{.*}}bindings.c"], output: (nothing)

// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=CHECK06
// CHECK06: "gcc::Compile", inputs: ["{{.*}}bindings.c"], output: (nothing)

// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -fsyntax-only -x c++ %s 2>&1 | FileCheck %s --check-prefix=CHECK08
// CHECK08: "clang", inputs: ["{{.*}}bindings.c"], output: (nothing)

Expand Down
4 changes: 0 additions & 4 deletions test/Driver/darwin-cc.c

This file was deleted.

8 changes: 0 additions & 8 deletions test/Driver/rewrite-legacy-objc.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,3 @@
// FIXME: CHECK-NOT is broken somehow, it doesn't work here. Check adjacency instead.
// TEST0: "-fmessage-length" "0" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx-fragile" "-fobjc-default-synthesize-properties" "-fno-objc-infer-related-result-type" "-fobjc-exceptions" "-fexceptions" "-fdiagnostics-show-option"
// TEST0: rewrite-legacy-objc.m"

// RUN: not %clang -ccc-no-clang -target unknown -rewrite-legacy-objc %s -o - -### 2>&1 | \
// RUN: FileCheck -check-prefix=TEST1 %s
// TEST1: invalid output type 'rewritten-legacy-objc' for use with gcc

// RUN: not %clang -ccc-no-clang -target i386-apple-darwin10 -rewrite-legacy-objc %s -o - -### 2>&1 | \
// RUN: FileCheck -check-prefix=TEST2 %s
// TEST2: invalid output type 'rewritten-legacy-objc' for use with gcc
8 changes: 0 additions & 8 deletions test/Driver/rewrite-objc.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,3 @@
// TEST0: "-rewrite-objc"
// FIXME: CHECK-NOT is broken somehow, it doesn't work here. Check adjacency instead.
// TEST0: "-fmessage-length" "0" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx" "-fobjc-dispatch-method=mixed" "-fobjc-default-synthesize-properties" "-fno-objc-infer-related-result-type" "-fobjc-exceptions" "-fexceptions" "-fdiagnostics-show-option"

// RUN: not %clang -ccc-no-clang -target unknown -rewrite-objc %s -o - -### 2>&1 | \
// RUN: FileCheck -check-prefix=TEST1 %s
// TEST1: invalid output type 'rewritten-objc' for use with gcc

// RUN: not %clang -ccc-no-clang -target i386-apple-darwin10 -rewrite-objc %s -o - -### 2>&1 | \
// RUN: FileCheck -check-prefix=TEST2 %s
// TEST2: invalid output type 'rewritten-objc' for use with gcc

0 comments on commit 8c610b0

Please sign in to comment.