[PATCH] D120906: [ARM][AArch64] generate subtarget feature flags [NFC]

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 18:33:33 PST 2022


MaskRay added inline comments.


================
Comment at: llvm/utils/TableGen/SubtargetEmitter.cpp:1812
+
+    const auto Name = Feature->getValueAsString("Name");
+    const auto Attribute = Feature->getValueAsString("Attribute");
----------------
https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable

`String` can be std::string, StringRef, or SmallString<0>. It is clearer to spell it.


================
Comment at: llvm/utils/TableGen/SubtargetEmitter.cpp:1823
+    // Some features default to true, with values set to false if enabled.
+    const auto Default = Value == "false" ? "true" : "false";
+
----------------
https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable

`const char *`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120906



More information about the llvm-commits mailing list