]> granicus.if.org Git - clang/commitdiff
Last option on -fexception for arm-disable-ehabi
authorRenato Golin <renato.golin@linaro.org>
Fri, 31 Jan 2014 16:19:26 +0000 (16:19 +0000)
committerRenato Golin <renato.golin@linaro.org>
Fri, 31 Jan 2014 16:19:26 +0000 (16:19 +0000)
Previous commit would have a following flag overriding the behaviour
and not taken care of.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200555 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index 9577aaacd53d7f9d375cb691132bd6f1d9b9d972..fafb95155dd15ae59cd5c6efdf92fe3ead1496ab 100644 (file)
@@ -832,9 +832,12 @@ void Clang::AddARMTargetArgs(const ArgList &Args,
     }
 
     // Exception handling
-    if (Args.hasArg(options::OPT_fno_exceptions)) {
-      CmdArgs.push_back("-backend-option");
-      CmdArgs.push_back("-arm-disable-ehabi");
+    if (Arg *A = Args.getLastArg(options::OPT_fexceptions,
+                                 options::OPT_fno_exceptions)) {
+      if (A->getOption().matches(options::OPT_fno_exceptions)) {
+        CmdArgs.push_back("-backend-option");
+        CmdArgs.push_back("-arm-disable-ehabi");
+      }
     }
 }