mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Fix Name Access
Get the Record name as a string explicitly to avoid asserts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142515 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2c49fbb32c
commit
91919cd816
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user