diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-11-01 21:58:17 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-11-01 21:58:17 +0000 |
commit | e1e33f8e8248d73f2603a7542299fc3b405ad4a7 (patch) | |
tree | fa9711b3978b0d0b319516ab1071c05d3265327e /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 36594561aa663b9d65e73eadef42ee5bd9fe5d35 (diff) | |
download | llvm-e1e33f8e8248d73f2603a7542299fc3b405ad4a7.zip llvm-e1e33f8e8248d73f2603a7542299fc3b405ad4a7.tar.gz llvm-e1e33f8e8248d73f2603a7542299fc3b405ad4a7.tar.bz2 |
ObjectiveC. Define a new cc1 flag
-fobjc-subscripting-legacy-runtime which is off
by default and on only when using ObjectiveC
legacy runtime. Use this flag to allow
array and dictionary subscripting and disallow
objectiveC pointer arithmatic in ObjectiveC
legacy runtime. // rdar://15363492
llvm-svn: 193889
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 2f64071..3da8ba7 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1218,6 +1218,10 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, if (Args.hasArg(OPT_fno_objc_infer_related_result_type)) Opts.ObjCInferRelatedResultType = 0; + + if (Args.hasArg(OPT_fobjc_subscripting_legacy_runtime)) + Opts.ObjCSubscriptingLegacyRuntime = + (Opts.ObjCRuntime.getKind() == ObjCRuntime::FragileMacOSX); } if (Args.hasArg(OPT_fgnu89_inline)) |