[PATCH] [tablegen] Resolve complex def identifiers when instanciating multiclass

hfinkel at anl.gov hfinkel at anl.gov
Tue May 5 15:26:09 PDT 2015


================
Comment at: lib/TableGen/TGParser.cpp:2428
@@ +2427,3 @@
+    // Check if the name is a complex pattern.
+    // If yes, resolve !
+    DefName = CurRec->getNameInit();
----------------
If so, resolve it.

================
Comment at: lib/TableGen/TGParser.cpp:2435
@@ +2434,3 @@
+    if (!DefNameString) {
+      ResolveMulticlassDefArgs(MC, CurRec.get(), DefmPrefixRange.Start, Lex.getLoc(),
+                               TArgs, TemplateVals, false/*Delete args*/);
----------------
Line is too long.

================
Comment at: lib/TableGen/TGParser.cpp:2444
@@ +2443,3 @@
+
+      // We ran out of option here...
+      DefNameString = dyn_cast<StringInit>(DefName);
----------------
option -> options

================
Comment at: test/TableGen/MultiClassDefName.td:47
@@ +46,3 @@
+defm : MC3<"Buzz">;
+
+// CHECK: def ZFizzBuzz
----------------
Can you please add a test with both a strong concatenation and also a concatenation with NAME?

http://reviews.llvm.org/D9466

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list