[PATCH] D112421: [clang][ARM] PACBTI-M frontend support

Victor Campos via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 25 08:38:29 PST 2021


vhscampos added inline comments.


================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2979
+def warn_unsupported_branch_protection_spec : Warning<
+  "unsupported branch protection specification '%0'">,  InGroup<BranchProtection>;
+
----------------
Still need to remove extraneous whitespace


================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:6377
+
+        static const char *SignReturnAddrStr[] = {"none", "non-leaf", "all"};
+        Fn->addFnAttr("sign-return-address",
----------------
I reckon selecting the string using a switch statement on BPI.SignReturnAddr is more type safe than doing it like this. The current selection is prone to out of bounds accesses to the array in case the enum changes. Please consider so.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112421



More information about the cfe-commits mailing list