mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-27 12:26:08 +00:00
MIR Serialization: Serialize the jump table index operands.
Reviewers: Duncan P. N. Exon Smith git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242358 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user