mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-15 00:38:42 +00:00
Fix Name Access
Get the Record name by string explicitly to avoid potential asserts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142514 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7efe936251
commit
2c49fbb32c
@ -1686,7 +1686,8 @@ bool TGParser::ParseDef(MultiClass *CurMultiClass) {
|
|||||||
|
|
||||||
// Ensure redefinition doesn't happen.
|
// Ensure redefinition doesn't happen.
|
||||||
if (Records.getDef(CurRec->getName())) {
|
if (Records.getDef(CurRec->getName())) {
|
||||||
Error(DefLoc, "def '" + CurRec->getName() + "' already defined");
|
Error(DefLoc, "def '" + CurRec->getNameInitAsString()
|
||||||
|
+ "' already defined");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
Records.addDef(CurRec);
|
Records.addDef(CurRec);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user