[llvm] [TableGen][CallingConv] Add CCAssignToRegTuple for synthetic registers. (PR #137826)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 29 16:12:50 PDT 2025


================
@@ -125,6 +133,21 @@ void CallingConvEmitter::emitCallingConv(const Record *CC, raw_ostream &O) {
   O << "}\n";
 }
 
+// Return the name of the specified Init (DefInit or StringInit), with a
+// namespace qualifier if the corresponding record contains one.
+std::string CallingConvEmitter::getQualifiedRegisterName(const Init *I) {
+  if (const auto *DI = dyn_cast<DefInit>(I))
+    return getQualifiedName(DI->getDef());
+
+  const auto *SI = dyn_cast<StringInit>(I);
----------------
topperc wrote:

Use `cast`. It contains it's own assert.

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


More information about the llvm-commits mailing list