C++: Extend final IRBlock

This commit is contained in:
Anders Schack-Mulligen
2025-08-22 10:32:24 +02:00
parent 3821f172df
commit 6ffb9b129f
3 changed files with 9 additions and 3 deletions

View File

@@ -269,7 +269,9 @@ module IRCfg implements BB::CfgSig<Language::Location> {
class SuccessorType = EdgeKind;
class BasicBlock extends IRBlock {
final private class FinalIRBlock = IRBlock;
class BasicBlock extends FinalIRBlock {
ControlFlowNode getNode(int i) { result = this.getInstruction(i) }
ControlFlowNode getLastNode() { result = super.getLastInstruction() }

View File

@@ -269,7 +269,9 @@ module IRCfg implements BB::CfgSig<Language::Location> {
class SuccessorType = EdgeKind;
class BasicBlock extends IRBlock {
final private class FinalIRBlock = IRBlock;
class BasicBlock extends FinalIRBlock {
ControlFlowNode getNode(int i) { result = this.getInstruction(i) }
ControlFlowNode getLastNode() { result = super.getLastInstruction() }

View File

@@ -269,7 +269,9 @@ module IRCfg implements BB::CfgSig<Language::Location> {
class SuccessorType = EdgeKind;
class BasicBlock extends IRBlock {
final private class FinalIRBlock = IRBlock;
class BasicBlock extends FinalIRBlock {
ControlFlowNode getNode(int i) { result = this.getInstruction(i) }
ControlFlowNode getLastNode() { result = super.getLastInstruction() }