[PATCH] D139305: [clang][driver] Support option '-mcpu' on target AVR

Alexander Richardson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 5 03:14:24 PST 2022


arichardson 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();
----------------
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?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139305



More information about the cfe-commits mailing list