diff options
author | Alex Lorenz <arphaman@gmail.com> | 2015-07-15 23:38:35 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2015-07-15 23:38:35 +0000 |
commit | 31d706836c83c690e1803dfb7a1e788e92c46da7 (patch) | |
tree | f6ddf70ba7b1aaf7876c07e414458e2054e374eb /llvm/lib/CodeGen/MIRParser/MIRParser.cpp | |
parent | 6799e9b3e05d0dd9cee926689551fc0d592b96ba (diff) | |
download | bcm5719-llvm-31d706836c83c690e1803dfb7a1e788e92c46da7.tar.gz bcm5719-llvm-31d706836c83c690e1803dfb7a1e788e92c46da7.zip |
MIR Serialization: Serialize the jump table index operands.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242358
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MIRParser.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MIRParser/MIRParser.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp index 1ba5db841af..fb1878febda 100644 --- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp +++ b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp @@ -113,7 +113,7 @@ public: bool initializeJumpTableInfo(MachineFunction &MF, const yaml::MachineJumpTable &YamlJTI, - const PerFunctionMIParsingState &PFS); + PerFunctionMIParsingState &PFS); private: /// Return a MIR diagnostic converted from an MI string diagnostic. @@ -436,7 +436,7 @@ bool MIRParserImpl::initializeFrameInfo(const Function &F, bool MIRParserImpl::initializeJumpTableInfo( MachineFunction &MF, const yaml::MachineJumpTable &YamlJTI, - const PerFunctionMIParsingState &PFS) { + PerFunctionMIParsingState &PFS) { MachineJumpTableInfo *JTI = MF.getOrCreateJumpTableInfo(YamlJTI.Kind); SMDiagnostic Error; for (const auto &Entry : YamlJTI.Entries) { @@ -447,7 +447,9 @@ bool MIRParserImpl::initializeJumpTableInfo( return error(Error, MBBSource.SourceRange); Blocks.push_back(MBB); } - JTI->createJumpTableIndex(Blocks); + 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)); } return false; } |