diff options
author | David Greene <greened@obbligato.org> | 2011-09-19 18:26:07 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2011-09-19 18:26:07 +0000 |
commit | d9746fe58ace4a8625983da1ecf68c0564883616 (patch) | |
tree | 610265767e02890bc48dbe01c88c16ddb2133872 /utils | |
parent | f22e6722a1cf83f9b53107b80705e30fd3b3b098 (diff) | |
download | external_llvm-d9746fe58ace4a8625983da1ecf68c0564883616.zip external_llvm-d9746fe58ace4a8625983da1ecf68c0564883616.tar.gz external_llvm-d9746fe58ace4a8625983da1ecf68c0564883616.tar.bz2 |
Better Error Reporting
Report missing template arguments more helpfully by supplying the name
of the missing argument in the error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/TGParser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/TableGen/TGParser.cpp b/utils/TableGen/TGParser.cpp index 36e9b82..f734b98 100644 --- a/utils/TableGen/TGParser.cpp +++ b/utils/TableGen/TGParser.cpp @@ -1416,6 +1416,10 @@ std::vector<Init*> TGParser::ParseValueList(Record *CurRec, Record *ArgsRec, if (ArgsRec != 0 && EltTy == 0) { const std::vector<std::string> &TArgs = ArgsRec->getTemplateArgs(); const RecordVal *RV = ArgsRec->getValue(TArgs[ArgN]); + if (!RV) { + errs() << "Cannot find template arg " << ArgN << " (" << TArgs[ArgN] + << ")\n"; + } assert(RV && "Template argument record not found??"); ItemType = RV->getType(); ++ArgN; |