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

hfinkel at anl.gov hfinkel at anl.gov
Thu May 7 07:03:37 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();
----------------
deadalnix wrote:
> hfinkel wrote:
> > If so, resolve it.
> Well that why we have plenty of green code below.
No, I meant please reword the comment from
  // If yes, resolve !
to
  // If so, resolve it.


================
Comment at: test/TableGen/MultiClassDefName.td:47
@@ +46,3 @@
+defm : MC3<"Buzz">;
+
+// CHECK: def ZFizzBuzz
----------------
deadalnix wrote:
> silvas wrote:
> > hfinkel wrote:
> > > Can you please add a test with both a strong concatenation and also a concatenation with NAME?
> > Also, the case where the template argument is a complex type. E.g.:
> > 
> > ```
> > multiclass MC3<Foo f> {
> >   def ZFizz#f.s : C<f.s>;
> > }
> > ```
> What do you mean by strong concatenation ?
Was a typo. I meant string concatenation.
  def NAME#ZFizz#f.s

http://reviews.llvm.org/D9466

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






More information about the llvm-commits mailing list