[llvm] [AArch64][TargetParser] move CPUInfo into tablegen [NFC] (PR #92145)

Tomas Matheson via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 11:14:41 PDT 2024


================
@@ -108,6 +111,101 @@ static void EmitARMTargetDef(RecordKeeper &RK, raw_ostream &OS) {
      << "#undef EMIT_EXTENSIONS\n"
      << "#endif // EMIT_EXTENSIONS\n"
      << "\n";
+
+  // Emit architecture information
+  OS << "#ifdef EMIT_ARCHITECTURES\n";
+
+  // Return the C++ name of the of an ArchInfo object
+  auto ArchInfoName = [](int Major, int Minor, StringRef Profile) {
+    return Minor == 0 ? "ARMV" + std::to_string(Major) + Profile.upper()
+                      : "ARMV" + std::to_string(Major) + "_" +
+                            std::to_string(Minor) + Profile.upper();
+  };
----------------
tmatheson-arm wrote:

I think it's actually `std::string` but I will make it explicit.

https://github.com/llvm/llvm-project/pull/92145


More information about the llvm-commits mailing list