summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-01-25 03:36:28 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-01-25 03:36:28 +0000
commitbc6aaea3364729cbd29a114e9e1f62ebe34defe3 (patch)
treea6c34c4fd0996e1af12ada94da4bd9ba127cd225 /clang/lib/Driver/Tools.cpp
parent5b8a1bd4a2409f9ae5715911ba9c14203aeccf5e (diff)
downloadbcm5719-llvm-bc6aaea3364729cbd29a114e9e1f62ebe34defe3.tar.gz
bcm5719-llvm-bc6aaea3364729cbd29a114e9e1f62ebe34defe3.zip
Driver: ignore -fno-objc-arc-exception when -fno-objc-arc set
Sometime clang would be supplied -fobjc-arc -f(no)objc-arc-exceptions and then later disable ARC with -fno-objc-arc, which only negate first option, but not the latter, resulting usused argument warning. Silence this warning only when -fno-objc-arc option is present. Patch by Onha Choe! llvm-svn: 293014
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index c78123b236d..854b5d5cccb 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -6018,7 +6018,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
options::OPT_fno_objc_arc_exceptions,
/*default*/ types::isCXX(InputType)))
CmdArgs.push_back("-fobjc-arc-exceptions");
+ }
+ // Silence warning for full exception code emission options when explicitly
+ // set to use no ARC.
+ if (Args.hasArg(options::OPT_fno_objc_arc)) {
+ Args.ClaimAllArgs(options::OPT_fobjc_arc_exceptions);
+ Args.ClaimAllArgs(options::OPT_fno_objc_arc_exceptions);
}
// -fobjc-infer-related-result-type is the default, except in the Objective-C
OpenPOWER on IntegriCloud