Driver: Handle /GR- in a compatible way with MSVC
There are slight differences between /GR- and -fno-rtti which made mapping one to the other inappropriate. -fno-rtti disables dynamic_cast, typeid, and does not emit RTTI related information for the v-table. /GR- does not generate complete object locators and thus will not reference them in vftables. However, constructs like dynamic_cast and typeid are permitted. This should bring our implementation of RTTI up to semantic parity with MSVC modulo bugs. llvm-svn: 212138
This commit is contained in:
@@ -1447,6 +1447,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
|
||||
Opts.TraditionalCPP = Args.hasArg(OPT_traditional_cpp);
|
||||
|
||||
Opts.RTTI = !Args.hasArg(OPT_fno_rtti);
|
||||
Opts.RTTIData = Opts.RTTI && !Args.hasArg(OPT_fno_rtti_data);
|
||||
Opts.Blocks = Args.hasArg(OPT_fblocks);
|
||||
Opts.BlocksRuntimeOptional = Args.hasArg(OPT_fblocks_runtime_optional);
|
||||
Opts.Modules = Args.hasArg(OPT_fmodules);
|
||||
|
||||
Reference in New Issue
Block a user