[llvm-dev] TableGen [sub]class name as a string
Tyro Software via llvm-dev
llvm-dev at lists.llvm.org
Mon Oct 24 03:50:06 PDT 2016
I'm hoping for a way to incorporate the name of a leaf class into a base
class' definition. Something like:
class BASE<dag oops, dag iops, ...
let Trace = !strconcat("TAG", !leaf_classname)
Or less elegantly if the derived class can name itself symbolically:
class BASE<string leaf_classname, dag oops, dag iops, list<dag> pattern>
...
def DERIVED : BASE<!self_classname, (outs ...
Currently I'm repeating the derived class/def name as a string which is a
bit non-DRY; it's a minor pain but would be nice to avoid if there's some
approach to those fantasy !leaf_classname/!self_classname operations.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161024/c7cc3455/attachment.html>
More information about the llvm-dev
mailing list