[PATCH] D114677: [AArch64] Avoid crashing on invalid -Wa,-march= values

Thorsten via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 28 10:19:30 PST 2021


tschuett added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:263
   if (!success)
-    D.Diag(diag::err_drv_clang_unsupported) << A->getAsString(Args);
+    D.Diag(diag::err_drv_clang_unsupported)
+        << (WaMArch.size() ? "-march=" + WaMArch.str() : A->getAsString(Args));
----------------
Would an if statement be more readable and actually show what the issue is?

Bonus points for a comment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114677



More information about the cfe-commits mailing list