forked from OSchip/llvm-project
Move -fms-extensions defaulting to driver, instead of using getDefaultLangOptions.
llvm-svn: 89057
This commit is contained in:
parent
759d72dc8e
commit
0730e4f7e0
|
@ -430,6 +430,7 @@ OPTION("-fno-inline", fno_inline, Flag, clang_ignored_f_Group, INVALID, "", 0, 0
|
|||
OPTION("-fno-keep-inline-functions", fno_keep_inline_functions, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-fno-math-errno", fno_math_errno, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-fno-merge-all-constants", fno_merge_all_constants, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-fno-ms-extensions", fno_ms_extensions, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-fno-omit-frame-pointer", fno_omit_frame_pointer, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-fno-pascal-strings", fno_pascal_strings, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-fno-rtti", fno_rtti, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
|
|
|
@ -995,11 +995,6 @@ public:
|
|||
|
||||
namespace {
|
||||
|
||||
/// GetWindowsVisualStudioLanguageOptions - Set the default language options for Windows.
|
||||
static void GetWindowsVisualStudioLanguageOptions(LangOptions &Opts) {
|
||||
Opts.Microsoft = true;
|
||||
}
|
||||
|
||||
// x86-32 Windows Visual Studio target
|
||||
class VisualStudioWindowsX86_32TargetInfo : public WindowsX86_32TargetInfo {
|
||||
public:
|
||||
|
@ -1014,10 +1009,6 @@ public:
|
|||
// We lost the original triple, so we use the default.
|
||||
Define(Defines, "_M_IX86", "600");
|
||||
}
|
||||
virtual void getDefaultLangOptions(LangOptions &Opts) {
|
||||
WindowsX86_32TargetInfo::getDefaultLangOptions(Opts);
|
||||
GetWindowsVisualStudioLanguageOptions(Opts);
|
||||
}
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
|
|
|
@ -889,7 +889,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
Args.AddLastArg(CmdArgs, options::OPT_fheinous_gnu_extensions);
|
||||
Args.AddLastArg(CmdArgs, options::OPT_fgnu_runtime);
|
||||
Args.AddLastArg(CmdArgs, options::OPT_flax_vector_conversions);
|
||||
Args.AddLastArg(CmdArgs, options::OPT_fms_extensions);
|
||||
Args.AddLastArg(CmdArgs, options::OPT_fnext_runtime);
|
||||
Args.AddLastArg(CmdArgs, options::OPT_fno_caret_diagnostics);
|
||||
Args.AddLastArg(CmdArgs, options::OPT_fno_show_column);
|
||||
|
@ -940,7 +939,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
else
|
||||
CmdArgs.push_back("-fexceptions=0");
|
||||
|
||||
// -frtti is default, only pass non-default.
|
||||
// -frtti is default.
|
||||
if (!Args.hasFlag(options::OPT_frtti, options::OPT_fno_rtti))
|
||||
CmdArgs.push_back("-frtti=0");
|
||||
|
||||
|
@ -950,6 +949,12 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
isSignedCharDefault(getToolChain().getTriple())))
|
||||
CmdArgs.push_back("-fsigned-char=0");
|
||||
|
||||
// -fms-extensions=0 is default.
|
||||
if (Args.hasFlag(options::OPT_fms_extensions,
|
||||
options::OPT_fno_ms_extensions,
|
||||
getToolChain().getTriple().getOS() == llvm::Triple::Win32))
|
||||
CmdArgs.push_back("-fms-extensions");
|
||||
|
||||
// -fshort-wchar default varies depending on platform; only
|
||||
// pass if specified.
|
||||
if (Arg *A = Args.getLastArg(options::OPT_fshort_wchar)) {
|
||||
|
|
Loading…
Reference in New Issue