1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/lib/TableGen
Hal Finkel 91f4861f4f [TableGen] Correctly generate implicit anonymous prototype defs in multiclasses
Even within a multiclass, we had been generating concrete implicit anonymous
defs when parsing values (generally in value lists). This behavior was
incorrect, and led to errors when multiclass parameters were used in the
parameter list of the implicit anonymous def.

If we had some multiclass:

multiclass mc<string n> {

 ... : SomeClass<SomeOtherClass<n> >

The capture of the multiclass parameter 'n' would not work correctly, and
depending on how the implicit SomeOtherClass was used, either TableGen would
ignore something it shouldn't, or would crash.

To fix this problem, when inside a multiclass, we generate prototype anonymous
defs for implicit anonymous defs (just as we do for explicit anonymous defs).
Within the multiclass, the current record prototype is populated with a node
that is essentially: !cast<SomeOtherClass>(!strconcat(NAME, anon_value_name)).
This is then resolved to the correct concrete anonymous def, in the usual way,
when NAME is resolved during multiclass instantiation.

llvm-svn: 198348
2014-01-02 20:47:09 +00:00
..
CMakeLists.txt Remove exception handling usage from tblgen. 2012-10-25 20:33:17 +00:00
Error.cpp Make sure TableGen exits with an error code after printing errors. 2013-03-20 20:43:11 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Main.cpp keep only the StringRef version of getFileOrSTDIN. 2013-06-25 05:28:34 +00:00
Makefile Remove exception handling usage from tblgen. 2012-10-25 20:33:17 +00:00
Record.cpp Fix most memory leaks in tablegen. 2013-10-31 04:07:41 +00:00
StringMatcher.cpp Emit memcmp directly from the StringMatcherEmitter. 2012-05-20 18:10:42 +00:00
TableGenBackend.cpp A bugfix for tblgen, in the function ‘emitSourceFileHeader’. 2013-01-28 07:35:33 +00:00
TGLexer.cpp tblgen: Diagnose duplicate includes. 2013-02-07 04:30:39 +00:00
TGLexer.h tblgen: Diagnose duplicate includes. 2013-02-07 04:30:39 +00:00
TGParser.cpp [TableGen] Correctly generate implicit anonymous prototype defs in multiclasses 2014-01-02 20:47:09 +00:00
TGParser.h [TableGen] Use the same anonymous name as the prefix on all multiclass defs 2014-01-02 19:35:33 +00:00