ZarkoCA updated this revision to Diff 344078.
ZarkoCA edited the summary of this revision.
ZarkoCA added a comment.

- Simplify option logic


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102094/new/

https://reviews.llvm.org/D102094

Files:
  clang/lib/Frontend/CompilerInvocation.cpp


Index: clang/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -1851,12 +1851,7 @@
           << A->getSpelling() << T.str();
 
     const Option &O = A->getOption();
-    if (O.matches(OPT_mabi_EQ_vec_extabi))
-      Opts.EnableAIXExtendedAltivecABI = 1;
-    else if (O.matches(OPT_mabi_EQ_vec_default))
-      Opts.EnableAIXExtendedAltivecABI = 0;
-    else
-      Opts.EnableAIXExtendedAltivecABI = 0;
+    Opts.EnableAIXExtendedAltivecABI = O.matches(OPT_mabi_EQ_vec_extabi);
   }
 
   bool NeedLocTracking = false;


Index: clang/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -1851,12 +1851,7 @@
           << A->getSpelling() << T.str();
 
     const Option &O = A->getOption();
-    if (O.matches(OPT_mabi_EQ_vec_extabi))
-      Opts.EnableAIXExtendedAltivecABI = 1;
-    else if (O.matches(OPT_mabi_EQ_vec_default))
-      Opts.EnableAIXExtendedAltivecABI = 0;
-    else
-      Opts.EnableAIXExtendedAltivecABI = 0;
+    Opts.EnableAIXExtendedAltivecABI = O.matches(OPT_mabi_EQ_vec_extabi);
   }
 
   bool NeedLocTracking = false;
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to