diff options
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MIRParser.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MIRParser/MIRParser.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp index cc277eea9f4..0679ec02c98 100644 --- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp +++ b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp @@ -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; } |