As per discussion with Doug Gregor on the IRC channel, introduce a new compiler switch: -fms-compatility.
Microsoft specific tweaking will now fall into 2 categories:
- fms-extension: Microsoft specific extensions that should never change the meaning of an otherwise well formed code. Currently map to LangOptions::Microsoft. (To be clearer, I am planning to change the name to LangOptions::MicrosoftExt).
- fms-compatibility: Really a MSVC emulation mode. Map to LangOptions::MicrosoftMode. Can change the meaning of an otherwise standard conformant program.
llvm-svn: 139978
This commit is contained in:
@@ -1655,6 +1655,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
|
||||
Opts.DollarIdents);
|
||||
Opts.PascalStrings = Args.hasArg(OPT_fpascal_strings);
|
||||
Opts.Microsoft = Args.hasArg(OPT_fms_extensions);
|
||||
Opts.MicrosoftMode = Args.hasArg(OPT_fms_compatibility);
|
||||
Opts.MSCVersion = Args.getLastArgIntValue(OPT_fmsc_version, 0, Diags);
|
||||
Opts.Borland = Args.hasArg(OPT_fborland_extensions);
|
||||
Opts.WritableStrings = Args.hasArg(OPT_fwritable_strings);
|
||||
|
||||
Reference in New Issue
Block a user