Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for editing BasicBlock in every block #109

Open
shivaji17 opened this issue Sep 7, 2022 · 1 comment
Open

Support for editing BasicBlock in every block #109

shivaji17 opened this issue Sep 7, 2022 · 1 comment

Comments

@shivaji17
Copy link
Contributor

shivaji17 commented Sep 7, 2022

Is it possible to add support for returning pointer to BasicBlock which is part of every block type? This would help editing the basic block field without needing to type cast Block interface to concrete block type object.
Something similar to this

type Block interface {
	...
        ...
        ...
	GetBasicBlock() *BasicBlock.  <-  New addition
}
...
...
...
func (b *BasicBlock) GetBasicBlock() *BasicBlock {
	return b
}

If any client wants to edit something from BasicBlock which is common to all blocks, the client would always need to type cast the block interface to a particular block type and edit the BasicBlock info even when the client is not making any change specific to given block type.

@shivaji17
Copy link
Contributor Author

@jomei Can we add support for above thing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant