mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-16 11:24:39 +00:00
MIR Parser: Report an error when a jump table entry is redefined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243798 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -582,8 +582,11 @@ bool MIRParserImpl::initializeJumpTableInfo(
|
||||
Blocks.push_back(MBB);
|
||||
}
|
||||
unsigned Index = JTI->createJumpTableIndex(Blocks);
|
||||
// TODO: Report an error when the same jump table slot ID is redefined.
|
||||
PFS.JumpTableSlots.insert(std::make_pair(Entry.ID, Index));
|
||||
if (!PFS.JumpTableSlots.insert(std::make_pair(Entry.ID.Value, Index))
|
||||
.second)
|
||||
return error(Entry.ID.SourceRange.Start,
|
||||
Twine("redefinition of jump table entry '%jump-table.") +
|
||||
Twine(Entry.ID.Value) + "'");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user