[PATCH] D149123: [AArch64][InlineAsm]Add Clang support for flag output constraints

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 25 11:43:34 PDT 2023


nickdesaulniers added inline comments.


================
Comment at: clang/lib/Basic/Targets/AArch64.cpp:1216
+// Returns the length of cc constraint.
+static unsigned matchAsmCCConstraint(const char *&Name) {
+  constexpr unsigned len = 5;
----------------
davidxl wrote:
> Name is not modified in this method, so perhaps dropping '&'?
Yeah, looks like this was copied from D57394. Probably both places should be fixed.

A `char *&` is a code smell.


================
Comment at: clang/lib/Basic/Targets/AArch64.cpp:1310
+    // CC condition
+    if (auto Len = matchAsmCCConstraint(Name)) {
+      Name += Len - 1;
----------------
please don't use `auto` here.


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

https://reviews.llvm.org/D149123



More information about the cfe-commits mailing list