diff options
author | Alex Lorenz <arphaman@gmail.com> | 2015-07-31 23:13:23 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2015-07-31 23:13:23 +0000 |
commit | 59ed5919cd7c6cefbd5d77ee65704aafbe158dab (patch) | |
tree | 52d33c8c6b0077f1cb82183d0167ec744b70d3c2 /llvm/lib/CodeGen/MIRParser | |
parent | 1e156011d138d475f507d3dfc4c3df7fef496a1f (diff) | |
download | bcm5719-llvm-59ed5919cd7c6cefbd5d77ee65704aafbe158dab.tar.gz bcm5719-llvm-59ed5919cd7c6cefbd5d77ee65704aafbe158dab.zip |
MIR Parser: Report an error when a jump table entry is redefined.
llvm-svn: 243798
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser')
-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; } |