diff options
author | Chris Lattner <sabre@nondot.org> | 2003-07-30 04:31:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-07-30 04:31:17 +0000 |
commit | 554af5cd62513799b895a1c15b0d3ae0e7b16a2c (patch) | |
tree | 9ee53d0b2f1e52fe703b048c113f679219c139be /support/tools/TableGen | |
parent | fc06bf0eaabb68449aaa699c4649799cd31fb5db (diff) | |
download | external_llvm-554af5cd62513799b895a1c15b0d3ae0e7b16a2c.zip external_llvm-554af5cd62513799b895a1c15b0d3ae0e7b16a2c.tar.gz external_llvm-554af5cd62513799b895a1c15b0d3ae0e7b16a2c.tar.bz2 |
Implement TODO: disallow 'def's with template arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7409 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'support/tools/TableGen')
-rw-r--r-- | support/tools/TableGen/FileParser.y | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/support/tools/TableGen/FileParser.y b/support/tools/TableGen/FileParser.y index 7a374e1..6ebcf76 100644 --- a/support/tools/TableGen/FileParser.y +++ b/support/tools/TableGen/FileParser.y @@ -432,7 +432,12 @@ ClassInst : CLASS ObjectBody { }; DefInst : DEF ObjectBody { - // TODO: If ObjectBody has template arguments, it's an error. + if (!$2->getTemplateArgs().empty()) { + err() << "Def '" << $2->getName() + << "' is not permitted to have template arguments!\n"; + abort(); + } + // If ObjectBody has template arguments, it's an error. if (Records.getDef($2->getName())) { err() << "Def '" << $2->getName() << "' already defined!\n"; abort(); |