diff options
author | Hal Finkel <hfinkel@anl.gov> | 2014-01-02 19:35:33 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2014-01-02 19:35:33 +0000 |
commit | f2a0b2b34058b90b12468b17cc6b94b80083028d (patch) | |
tree | 16d5e93a52034de769919997e731ff5f8388197a /llvm/lib/TableGen/TGParser.h | |
parent | 1e259e79b9047b3b55608db07fa50ea51e0b43dc (diff) | |
download | bcm5719-llvm-f2a0b2b34058b90b12468b17cc6b94b80083028d.tar.gz bcm5719-llvm-f2a0b2b34058b90b12468b17cc6b94b80083028d.zip |
[TableGen] Use the same anonymous name as the prefix on all multiclass defs
TableGen had been generating a different name for an anonymous multiclass's
NAME for every def in the multiclass. This had an unfortunate side effect: it
was impossible to reference one def within the multiclass from another (in the
parameter list, for example). By making sure we only generate an anonymous name
once per multiclass (which, as it turns out, requires only changing the name
parameter to reference type), we can now concatenate NAME within the multiclass
with a def name in order to generate a reference to that def.
This does not matter so much, in and of itself, but is necessary for a
follow-up commit that will fix variable capturing in implicit anonymous
multiclass defs (and that is important).
llvm-svn: 198340
Diffstat (limited to 'llvm/lib/TableGen/TGParser.h')
-rw-r--r-- | llvm/lib/TableGen/TGParser.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/TableGen/TGParser.h b/llvm/lib/TableGen/TGParser.h index a5753458108..e5559a33e38 100644 --- a/llvm/lib/TableGen/TGParser.h +++ b/llvm/lib/TableGen/TGParser.h @@ -137,7 +137,7 @@ private: // Parser methods. bool ParseMultiClass(); Record *InstantiateMulticlassDef(MultiClass &MC, Record *DefProto, - Init *DefmPrefix, + Init *&DefmPrefix, SMRange DefmPrefixRange); bool ResolveMulticlassDefArgs(MultiClass &MC, Record *DefProto, |