diff options
author | David Greene <greened@obbligato.org> | 2011-08-10 18:27:46 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2011-08-10 18:27:46 +0000 |
commit | 50c0912492e265c87a64cb90f20f91c5ac7b9af5 (patch) | |
tree | 318854ed7b9df7bd77dcda3fb0401de8794314b6 /llvm/utils/TableGen/TGParser.cpp | |
parent | 4a36d144e2f3083e22b7856669b6be17cb9a9e6e (diff) | |
download | bcm5719-llvm-50c0912492e265c87a64cb90f20f91c5ac7b9af5.tar.gz bcm5719-llvm-50c0912492e265c87a64cb90f20f91c5ac7b9af5.zip |
Make Record Name an Init
Use an Init (ultimately a StringInit) to represent the Record name.
This allows the name to be composed by standard TableGen operators.
This will enable us to get rid of the ugly #NAME# hack processing and
naturally replace it with operators. It also increases flexibility
and power of the TableGen language by allowing record identifiers to
be computed dynamically.
llvm-svn: 137232
Diffstat (limited to 'llvm/utils/TableGen/TGParser.cpp')
-rw-r--r-- | llvm/utils/TableGen/TGParser.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/TGParser.cpp b/llvm/utils/TableGen/TGParser.cpp index 2cff3ced57e..36e9b82ff3f 100644 --- a/llvm/utils/TableGen/TGParser.cpp +++ b/llvm/utils/TableGen/TGParser.cpp @@ -1690,6 +1690,9 @@ bool TGParser::ParseDef(MultiClass *CurMultiClass) { return true; if (CurMultiClass == 0) // Def's in multiclasses aren't really defs. + // See Record::setName(). This resolve step will see any new name + // for the def that might have been created when resolving + // inheritance, values and arguments above. CurRec->resolveReferences(); // If ObjectBody has template arguments, it's an error. @@ -2102,6 +2105,9 @@ bool TGParser::ParseDefm(MultiClass *CurMultiClass) { if (!CurMultiClass) for (unsigned i = 0, e = NewRecDefs.size(); i != e; ++i) + // See Record::setName(). This resolve step will see any new + // name for the def that might have been created when resolving + // inheritance, values and arguments above. NewRecDefs[i]->resolveReferences(); if (Lex.getCode() != tgtok::semi) |