mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-14 17:34:41 +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@142517 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
69a2394b2d
commit
22dde7e655
@ -2021,8 +2021,9 @@ bool TGParser::ResolveMulticlassDef(MultiClass &MC,
|
||||
if (CurMultiClass) {
|
||||
for (unsigned i = 0, e = CurMultiClass->DefPrototypes.size();
|
||||
i != e; ++i)
|
||||
if (CurMultiClass->DefPrototypes[i]->getName() == CurRec->getName())
|
||||
return Error(DefmPrefixLoc, "defm '" + CurRec->getName() +
|
||||
if (CurMultiClass->DefPrototypes[i]->getNameInit()
|
||||
== CurRec->getNameInit())
|
||||
return Error(DefmPrefixLoc, "defm '" + CurRec->getNameInitAsString() +
|
||||
"' already defined in this multiclass!");
|
||||
CurMultiClass->DefPrototypes.push_back(CurRec);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user