sdardis added inline comments.

================
Comment at: lib/Driver/ToolChains/Clang.cpp:1490
+      GPOpt->claim();
+  }
+
----------------
atanasyan wrote:
> Could it be rewritten a bit shorter?
> 
> ```
> bool NoAbiCalls =
>     ABICalls && ABICalls->getOption().matches(options::OPT_mno_abicalls);
> bool WantGPOpt = GPOpt && GPOpt->getOption().matches(options::OPT_mgpopt);
> 
> if (NoAbiCalls && (!GPOpt || WantGPOpt)) {
>   CmdArgs.push_back("-mllvm");
>   CmdArgs.push_back("-mgpopt=1");
> } else {
>   CmdArgs.push_back("-mllvm");
>   CmdArgs.push_back("-mgpopt=0");
> }
> 
> if (GPOpt)
>   GPOpt->claim();
> ```
Yes, it can. I think I mis-handled the case where -mabicalls and -mgpopt are 
combined. I'll reflow the logic along the lines of your suggestion and add a 
warning.


https://reviews.llvm.org/D35548



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to