[PATCH] D139305: [clang][driver] Make option '-mmcu' as an alias of option '-mcpu'

Ben Shi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 5 03:32:03 PST 2022


benshi001 marked an inline comment as done.
benshi001 added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:387
       return A->getValue();
+    if (const Arg *A = Args.getLastArg(options::OPT_mcpu_EQ))
+      return A->getValue();
----------------
arichardson wrote:
> It looks to me that -mcpu will always take precedence over -mmcu with this code even if mmcu comes later in the command line. Wouldn't it make more sense to treat them as aliases?
That's really a good idea. Thanks!


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

https://reviews.llvm.org/D139305



More information about the cfe-commits mailing list