diff options
author | David Greene <greened@obbligato.org> | 2011-10-19 13:03:51 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2011-10-19 13:03:51 +0000 |
commit | 07e055f919debdbe81cf398e10667d3701cb7e48 (patch) | |
tree | b3c5bbcd4c4c44015f80d37292b954d2977d3134 /llvm/lib/TableGen | |
parent | 3a20f5a6878909a2aa3b5da2c70305a964333491 (diff) | |
download | bcm5719-llvm-07e055f919debdbe81cf398e10667d3701cb7e48.tar.gz bcm5719-llvm-07e055f919debdbe81cf398e10667d3701cb7e48.zip |
Fix Name Access
Get the Record name as a string explicitly to avoid asserts.
llvm-svn: 142515
Diffstat (limited to 'llvm/lib/TableGen')
-rw-r--r-- | llvm/lib/TableGen/TGParser.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp index 5dc25e9827a..1e5b55fdf93 100644 --- a/llvm/lib/TableGen/TGParser.cpp +++ b/llvm/lib/TableGen/TGParser.cpp @@ -1694,8 +1694,9 @@ bool TGParser::ParseDef(MultiClass *CurMultiClass) { } else { // Otherwise, a def inside a multiclass, add it to the multiclass. for (unsigned i = 0, e = CurMultiClass->DefPrototypes.size(); i != e; ++i) - if (CurMultiClass->DefPrototypes[i]->getName() == CurRec->getName()) { - Error(DefLoc, "def '" + CurRec->getName() + + if (CurMultiClass->DefPrototypes[i]->getNameInit() + == CurRec->getNameInit()) { + Error(DefLoc, "def '" + CurRec->getNameInitAsString() + "' already defined in this multiclass!"); return true; } |