From: Rafael Espindola Date: Tue, 30 Oct 2012 00:13:16 +0000 (+0000) Subject: In the past "production" clang builds would not be used for c++, and X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2d4d68a58898c5d13d66d45a5d9440fc1d790fe;p=clang In the past "production" clang builds would not be used for c++, and we had the -ccc-clang-cxx and -ccc-no-clang-cxx options to force them on or off for testing. Clang c++ support is now production quality and these options are dead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166986 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td index fd38f1fd9f..899c37b533 100644 --- a/include/clang/Basic/DiagnosticDriverKinds.td +++ b/include/clang/Basic/DiagnosticDriverKinds.td @@ -121,8 +121,6 @@ def warn_drv_empty_joined_argument : Warning< InGroup>; def warn_drv_not_using_clang_cpp : Warning< "not using the clang preprocessor due to user override">; -def warn_drv_not_using_clang_cxx : Warning< - "not using the clang compiler for C++ inputs">; def warn_drv_clang_unsupported : Warning< "the clang compiler does not support '%0'">; def warn_drv_assuming_mfloat_abi_is : Warning< diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h index 3ab98f7b76..84add7cbd1 100644 --- a/include/clang/Driver/Driver.h +++ b/include/clang/Driver/Driver.h @@ -149,9 +149,6 @@ private: /// Use the clang compiler where possible. unsigned CCCUseClang : 1; - /// Use clang for handling C++ and Objective-C++ inputs. - unsigned CCCUseClangCXX : 1; - /// Use clang as a preprocessor (clang's preprocessor will still be /// used where an integrated CPP would). unsigned CCCUseClangCPP : 1; diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index c14b0bccc1..81e35239f5 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -91,10 +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<"">; -def ccc_clang_cxx : Flag<["-"], "ccc-clang-cxx">, CCCDriverOpt, - HelpText<"Enable the clang compiler for C++">; -def ccc_no_clang_cxx : Flag<["-"], "ccc-no-clang-cxx">, CCCDriverOpt, - HelpText<"Disable the clang compiler for C++">; def ccc_no_clang : Flag<["-"], "ccc-no-clang">, CCCDriverOpt, HelpText<"Disable the clang compiler">; def ccc_no_clang_cpp : Flag<["-"], "ccc-no-clang-cpp">, CCCDriverOpt, diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 29202b5411..f8b923286e 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -58,7 +58,7 @@ Driver::Driver(StringRef ClangExecutable, CCCIsCPP(false),CCCEcho(false), CCCPrintBindings(false), CCPrintOptions(false), CCPrintHeaders(false), CCLogDiagnostics(false), CCGenDiagnostics(false), CCCGenericGCCName(""), CheckInputsExist(true), - CCCUseClang(true), CCCUseClangCXX(true), CCCUseClangCPP(true), + CCCUseClang(true), CCCUseClangCPP(true), ForcedClangUse(false), CCCUsePCH(true), SuppressMissingInputWarning(false) { Name = llvm::sys::path::stem(ClangExecutable); @@ -275,9 +275,6 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { CCCEcho = Args->hasArg(options::OPT_ccc_echo); if (const Arg *A = Args->getLastArg(options::OPT_ccc_gcc_name)) CCCGenericGCCName = A->getValue(*Args); - CCCUseClangCXX = Args->hasFlag(options::OPT_ccc_clang_cxx, - options::OPT_ccc_no_clang_cxx, - CCCUseClangCXX); CCCUsePCH = Args->hasFlag(options::OPT_ccc_pch_is_pch, options::OPT_ccc_pch_is_pth); CCCUseClang = !Args->hasArg(options::OPT_ccc_no_clang); @@ -1797,12 +1794,6 @@ bool Driver::ShouldUseClangCompiler(const Compilation &C, const JobAction &JA, } else if (!isa(JA) && !isa(JA)) return false; - // Use clang for C++? - if (!CCCUseClangCXX && types::isCXX((*JA.begin())->getType())) { - Diag(clang::diag::warn_drv_not_using_clang_cxx); - return false; - } - return true; } diff --git a/test/Driver/bindings.c b/test/Driver/bindings.c index 7ae04a91db..4db155a22b 100644 --- a/test/Driver/bindings.c +++ b/test/Driver/bindings.c @@ -26,10 +26,7 @@ // 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 -ccc-no-clang-cxx -fsyntax-only -x c++ %s 2>&1 | FileCheck %s --check-prefix=CHECK07 -// CHECK07: "gcc::Compile", inputs: ["{{.*}}bindings.c"], output: (nothing) - -// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-clang-cxx -fsyntax-only -x c++ %s 2>&1 | FileCheck %s --check-prefix=CHECK08 +// 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) // RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang-cpp -fsyntax-only -no-integrated-cpp %s 2>&1 | FileCheck %s --check-prefix=CHECK09 diff --git a/test/Misc/warning-flags.c b/test/Misc/warning-flags.c index 398e9bce26..aa6c290f84 100644 --- a/test/Misc/warning-flags.c +++ b/test/Misc/warning-flags.c @@ -18,7 +18,7 @@ This test serves two purposes: The list of warnings below should NEVER grow. It should gradually shrink to 0. -CHECK: Warnings without flags (153): +CHECK: Warnings without flags (152): CHECK-NEXT: ext_delete_void_ptr_operand CHECK-NEXT: ext_enum_friend CHECK-NEXT: ext_expected_semi_decl_list @@ -69,7 +69,6 @@ CHECK-NEXT: warn_double_const_requires_fp64 CHECK-NEXT: warn_drv_assuming_mfloat_abi_is CHECK-NEXT: warn_drv_clang_unsupported CHECK-NEXT: warn_drv_not_using_clang_cpp -CHECK-NEXT: warn_drv_not_using_clang_cxx CHECK-NEXT: warn_drv_objc_gc_unsupported CHECK-NEXT: warn_drv_pch_not_first_include CHECK-NEXT: warn_dup_category_def diff --git a/test/lit.cfg b/test/lit.cfg index 54a683f0e7..b22346e046 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -186,7 +186,7 @@ config.substitutions.append( ('%clang_cc1', '%s -cc1 -internal-isystem %s' getClangBuiltinIncludeDir(config.clang))) ) config.substitutions.append( ('%clangxx', ' ' + config.clang + - ' -ccc-clang-cxx -ccc-cxx ')) + ' -ccc-cxx ')) config.substitutions.append( ('%clang', ' ' + config.clang + ' ') ) config.substitutions.append( ('%test_debuginfo', ' ' + config.llvm_src_root + '/utils/test_debuginfo.pl ') )