diff options
author | David Greene <greened@obbligato.org> | 2011-10-19 13:04:43 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2011-10-19 13:04:43 +0000 |
commit | 8e85b480d5d543fc7f7c233a686f6051c3113ec7 (patch) | |
tree | 3358bce896b137704f2938219acdd1d073bf7aba /llvm/lib/TableGen/TGLexer.h | |
parent | 8bf0d72f0e0be33892610ae1833d4bcecaed08a5 (diff) | |
download | bcm5719-llvm-8e85b480d5d543fc7f7c233a686f6051c3113ec7.tar.gz bcm5719-llvm-8e85b480d5d543fc7f7c233a686f6051c3113ec7.zip |
Implement Paste
Add a paste operator '#' to take two identifier-like strings and joint
them. Internally paste gets represented as a !strconcat() with any
necessary casts to string added.
This will be used to implement basic for loop functionality as in:
for i = [0, 1, 2, 3, 4, 5, 6, 7] {
def R#i : Register<...>
}
llvm-svn: 142525
Diffstat (limited to 'llvm/lib/TableGen/TGLexer.h')
-rw-r--r-- | llvm/lib/TableGen/TGLexer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/TableGen/TGLexer.h b/llvm/lib/TableGen/TGLexer.h index 24f8ea4ce5a..0246ab6b900 100644 --- a/llvm/lib/TableGen/TGLexer.h +++ b/llvm/lib/TableGen/TGLexer.h @@ -39,7 +39,8 @@ namespace tgtok { colon, semi, // : ; comma, period, // , . equal, question, // = ? - + paste, // # + // Keywords. Bit, Bits, Class, Code, Dag, Def, Defm, Field, In, Int, Let, List, MultiClass, String, |