Closed qci-amos closed 2 years ago
Hi @qci-amos and thanks for your feedback!
For further analysis that could help for a PR:
ret void
is indeed a legit LLVM syntax: https://llvm.org/docs/LangRef.html#ret-instruction.
We should take into account that return_operand
in llvm-ir::terminator::Ret
can be "None
if returning void": https://docs.rs/llvm-ir/0.8.0/llvm_ir/terminator/struct.Ret.html#structfield.return_operand.
This should be updated accordingly:
operand()
in class QirRetTerminator
in _parser.py
get_ret_operand()
of struct PyQirTerminator
in python.rs
I've got a QIR instruction:
But when I try to parse that I'm getting an exception
I can work around this with a try/except: