aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MIRParser/MIParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MIParser.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRParser/MIParser.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIParser.cpp b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
index 27f0a93..a0f0e27 100644
--- a/llvm/lib/CodeGen/MIRParser/MIParser.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
@@ -780,7 +780,7 @@ bool MIParser::parseBasicBlockDefinition(
"' is not defined in the function '" +
MF.getName() + "'");
}
- auto *MBB = MF.CreateMachineBasicBlock(BB);
+ auto *MBB = MF.CreateMachineBasicBlock(BB, BBID);
MF.insert(MF.end(), MBB);
bool WasInserted = MBBSlots.insert(std::make_pair(ID, MBB)).second;
if (!WasInserted)
@@ -799,13 +799,6 @@ bool MIParser::parseBasicBlockDefinition(
MBB->setSectionID(*SectionID);
MF.setBBSectionsType(BasicBlockSection::List);
}
- if (BBID.has_value()) {
- // BBSectionsType is set to `List` if any basic blocks has `SectionID`.
- // Here, we set it to `Labels` if it hasn't been set above.
- if (!MF.hasBBSections())
- MF.setBBSectionsType(BasicBlockSection::Labels);
- MBB->setBBID(BBID.value());
- }
MBB->setCallFrameSize(CallFrameSize);
return false;
}