From: Hans Wennborg Date: Fri, 2 Aug 2013 01:29:28 +0000 (+0000) Subject: Revert r187537 "clang-cl: add more options" X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=007af3d14cf271e6333182ae1404d5e7ce801bb4;p=platform%2Fupstream%2Fllvm.git Revert r187537 "clang-cl: add more options" It broke the "phase1 - sanity" buildbot. Reverting until we can figure out what's going on. And Eric says it broke all current Mac builds actually. llvm-svn: 187640 --- diff --git a/clang/include/clang/Driver/CLCompatOptions.td b/clang/include/clang/Driver/CLCompatOptions.td index d3494da..aef9291 100644 --- a/clang/include/clang/Driver/CLCompatOptions.td +++ b/clang/include/clang/Driver/CLCompatOptions.td @@ -14,111 +14,12 @@ def cl_Group : OptionGroup<"">, HelpText<"CL.EXE COMPATIBILITY OPTIONS">; -def cl_ignored_Group : OptionGroup<"">, - Group; - class CLFlag : Option<["/", "-"], name, KIND_FLAG>, Group, Flags<[CLOption, DriverOption]>; -class CLIgnoredFlag : Option<["/", "-"], name, KIND_FLAG>, - Group, Flags<[CLOption, DriverOption]>; - -class CLJoined : Option<["/", "-"], name, KIND_JOINED>, - Group, Flags<[CLOption, DriverOption]>; - -class CLIgnoredJoined : Option<["/", "-"], name, KIND_JOINED>, - Group, Flags<[CLOption, DriverOption]>; - -class CLJoinedOrSeparate : Option<["/", "-"], name, - KIND_JOINED_OR_SEPARATE>, Group, Flags<[CLOption, DriverOption]>; - -// Aliases: - +def _QUESTION : CLFlag<"?">, Alias, HelpText<"Display available options">; def _SLASH_c : CLFlag<"c">, HelpText<"Compile only">, Alias; -def _SLASH_D : CLJoinedOrSeparate<"D">, HelpText<"Define macro">, - MetaVarName<"">, Alias; -def _SLASH_GR : CLFlag<"GR">, HelpText<"Enable RTTI">, Alias; -def _SLASH_GR_ : CLFlag<"GR-">, HelpText<"Disable RTTI">, Alias; def _SLASH_help : CLFlag<"help">, Alias, HelpText<"Display available options">; -def _SLASH_I : CLJoinedOrSeparate<"I">, - HelpText<"Add directory to include search path">, MetaVarName<"">, - Alias; -def _SLASH_J : CLFlag<"J">, HelpText<"Make char type unsigned">, - Alias; -def _SLASH_O : CLJoined<"O">, HelpText<"Optimization level">, - MetaVarName<"">, Alias; -def _SLASH_Ob0 : CLFlag<"Ob0">, HelpText<"Disable inlining">, - Alias; -def _SLASH_Od : CLFlag<"Od">, HelpText<"Disable optimization">, Alias; -def _SLASH_Os : CLFlag<"Os">, HelpText<"Optimize for size">, Alias, - AliasArgs<["s"]>; -def _SLASH_Ot : CLFlag<"Ot">, HelpText<"Optimize for speed">, Alias, - AliasArgs<["2"]>; -def _SLASH_Ox : CLFlag<"Ox">, HelpText<"Maximum optimization">, Alias, - AliasArgs<["3"]>; -def _SLASH_Oy : CLFlag<"Oy">, HelpText<"Enable frame pointer omission">, - Alias; -def _SLASH_Oy_ : CLFlag<"Oy-">, HelpText<"Disable frame pointer omission">, - Alias; -def _SLASH_P : CLFlag<"P">, HelpText<"Only run the preprocessor">, Alias; -def _SLASH_QUESTION : CLFlag<"?">, Alias, - HelpText<"Display available options">; -def _SLASH_U : CLJoinedOrSeparate<"U">, HelpText<"Undefine macro">, - MetaVarName<"">, Alias; def _SLASH_W0 : CLFlag<"W0">, HelpText<"Disable all warnings">, Alias; def _SLASH_W1 : CLFlag<"W1">, HelpText<"Enable -Wall">, Alias; -def _SLASH_W2 : CLFlag<"W2">, HelpText<"Enable -Wall">, Alias; -def _SLASH_W3 : CLFlag<"W3">, HelpText<"Enable -Wall">, Alias; -def _SLASH_W4 : CLFlag<"W4">, HelpText<"Enable -Wall">, Alias; -def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Wall">, Alias; -def _SLASH_WX : CLFlag<"WX">, HelpText<"Treat warnings as errors">, - Alias, AliasArgs<["error"]>; -def _SLASH_WX_ : CLFlag<"WX-">, HelpText<"Do not treat warnings as errors">, - Alias, AliasArgs<["no-error"]>; -def _SLASH_w_flag : CLFlag<"w">, HelpText<"Disable all warnings">, Alias; -def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Syntax-check only">, - Alias; - - -// Ignored: - -def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">; -def _SLASH_errorReport : CLIgnoredJoined<"errorReport">; -def _SLASH_nologo : CLIgnoredFlag<"nologo">; -def _SLASH_Ob1 : CLIgnoredFlag<"Ob1">; -def _SLASH_Ob2 : CLIgnoredFlag<"Ob2">; -def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">; -def _SLASH_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">; - - -// Unsupported: - -def _SLASH_EH : CLJoined<"EH">; -def _SLASH_Fd : CLJoined<"Fd">; -def _SLASH_Fo : CLJoined<"Fo">; -def _SLASH_fp : CLJoined<"fp">; -def _SLASH_Gd : CLFlag<"Gd">; -def _SLASH_GL : CLFlag<"GL">; -def _SLASH_GL_ : CLFlag<"GL-">; -def _SLASH_Gm : CLFlag<"Gm">; -def _SLASH_Gm_ : CLFlag<"Gm-">; -def _SLASH_GS : CLFlag<"GS">; -def _SLASH_Gy : CLFlag<"Gy">; -def _SLASH_Gy_ : CLFlag<"Gy-">; -def _SLASH_GZ : CLFlag<"GZ">; -def _SLASH_MD : CLFlag<"MD">; -def _SLASH_MT : CLFlag<"MT">; -def _SLASH_MDd : CLFlag<"MDd">; -def _SLASH_MTd : CLFlag<"MTd">; -def _SLASH_Oi : CLFlag<"Oi">; -def _SLASH_RTC : CLJoined<"RTC">; -def _SLASH_showIncludes : CLJoined<"showIncludes">; -def _SLASH_Tc : CLJoined<"Tc">; -def _SLASH_TC : CLFlag<"TC">; -def _SLASH_Tp : CLJoined<"Tp">; -def _SLASH_TP : CLFlag<"TP">; -def _SLASH_w : CLJoined<"w">; -def _SLASH_Zc : CLJoined<"Zc:">; -def _SLASH_ZI : CLFlag<"ZI">; -def _SLASH_Zi : CLFlag<"Zi">; diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 02a29b2..3a23732 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -3632,9 +3632,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.ClaimAllArgs(options::OPT_clang_ignored_f_Group); Args.ClaimAllArgs(options::OPT_clang_ignored_m_Group); - // Claim ignored clang-cl options. - Args.ClaimAllArgs(options::OPT_cl_ignored_Group); - // Disable warnings for clang -E -use-gold-plugin -emit-llvm foo.c Args.ClaimAllArgs(options::OPT_use_gold_plugin); Args.ClaimAllArgs(options::OPT_emit_llvm); diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c index f83d1fd..ece48c5 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c @@ -1,91 +1,10 @@ // Don't attempt slash switches on msys bash. // REQUIRES: shell-preserves-root +// RUN: %clang_cl /c /W0 %s -### 2>&1 | FileCheck -check-prefix=W0 %s +// W0-DAG: -c +// W0-DAG: -w -// Alias options: - -// RUN: %clang_cl /c %s -### 2>&1 | FileCheck -check-prefix=C %s -// C: -c - -// RUN: %clang_cl /Dfoo=bar %s -### 2>&1 | FileCheck -check-prefix=D %s -// RUN: %clang_cl /D foo=bar %s -### 2>&1 | FileCheck -check-prefix=D %s -// D: "-D" "foo=bar" - -// RTTI is on by default; just check that we don't error. -// RUN: %clang_cl /Zs /GR %s 2>&1 - -// RUN: %clang_cl /GR- %s -### 2>&1 | FileCheck -check-prefix=GR_ %s -// GR_: -fno-rtti - -// RUN: %clang_cl /Imyincludedir %s -### 2>&1 | FileCheck -check-prefix=I %s -// RUN: %clang_cl /I myincludedir %s -### 2>&1 | FileCheck -check-prefix=I %s -// I: "-I" "myincludedir" - -// RUN: %clang_cl /J %s -### 2>&1 | FileCheck -check-prefix=J %s -// J: -fno-signed-char - -// RUN: %clang_cl /Ofoo %s -### 2>&1 | FileCheck -check-prefix=O %s -// O: -Ofoo - -// RUN: %clang_cl /Ob0 %s -### 2>&1 | FileCheck -check-prefix=Ob0 %s -// Ob0: -fno-inline - -// RUN: %clang_cl /Od %s -### 2>&1 | FileCheck -check-prefix=Od %s -// Od: -O0 - -// RUN: %clang_cl /Os %s -### 2>&1 | FileCheck -check-prefix=Os %s -// Os: -Os - -// RUN: %clang_cl /Ot %s -### 2>&1 | FileCheck -check-prefix=Ot %s -// Ot: -O2 - -// RUN: %clang_cl /Ox %s -### 2>&1 | FileCheck -check-prefix=Ox %s -// Ox: -O3 - -// RUN: %clang_cl /Zs /Oy %s 2>&1 - -// RUN: %clang_cl /Oy- %s -### 2>&1 | FileCheck -check-prefix=Oy_ %s -// Oy_: -mdisable-fp-elim - -// RUN: %clang_cl /P %s -### 2>&1 | FileCheck -check-prefix=P %s -// P: -E - -// RUN: %clang_cl /Umymacro %s -### 2>&1 | FileCheck -check-prefix=U %s -// RUN: %clang_cl /U mymacro %s -### 2>&1 | FileCheck -check-prefix=U %s -// U: "-U" "mymacro" - -// RUN: %clang_cl /W0 %s -### 2>&1 | FileCheck -check-prefix=W0 %s -// W0: -w - -// RUN: %clang_cl /W1 %s -### 2>&1 | FileCheck -check-prefix=W1 %s -// RUN: %clang_cl /W2 %s -### 2>&1 | FileCheck -check-prefix=W1 %s -// RUN: %clang_cl /W3 %s -### 2>&1 | FileCheck -check-prefix=W1 %s -// RUN: %clang_cl /W4 %s -### 2>&1 | FileCheck -check-prefix=W1 %s -// RUN: %clang_cl /Wall %s -### 2>&1 | FileCheck -check-prefix=W1 %s -// W1: -Wall - -// RUN: %clang_cl /WX %s -### 2>&1 | FileCheck -check-prefix=WX %s -// WX: -Werror - -// RUN: %clang_cl /WX- %s -### 2>&1 | FileCheck -check-prefix=WX_ %s -// WX_: -Wno-error - -// RUN: %clang_cl /w %s -### 2>&1 | FileCheck -check-prefix=w %s -// w: -w - -// RUN: %clang_cl /Zs %s -### 2>&1 | FileCheck -check-prefix=Zs %s -// Zs: -fsyntax-only - - -// Ignored options. Check that we don't get "unused during compilation" errors. -// (/Zs is for syntax-only, /WX is for -Werror) -// RUN: %clang_cl /Zs /WX /analyze- /errorReport:foo /nologo /Ob1 /Ob2 %s -// RUN: %clang_cl /Zs /WX /Zc:forScope /Zc:wchar_t %s - - -// Unsupported but parsed options. Check that we don't error on them. -// (/Zs is for syntax-only) -// RUN: %clang_cl /Zs /EHsc /Fdfoo /Fobar /fp:precise /Gd /GL /GL- /Gm %s 2>&1 -// RUN: %clang_cl /Zs /Gm- /GS /Gy /Gy- /GZ /MD /MT /MDd /MTd /Oi %s 2>&1 -// RUN: %clang_cl /Zs /RTC1 /Tcfoo /TC /Tpbar /TP /wfoo /Zc:wchar_t- /ZI %s 2>&1 -// RUN: %clang_cl /Zs /Zi /showIncludes %s 2>&1 +// RUN: %clang_cl /c /W1 %s -### 2>&1 | FileCheck -check-prefix=W1 %s +// W1-DAG: -c +// W1-DAG: -Wall