Jeremy
Your return_test is in a new branch (double-terminators.) I'd love to find an elegant solution to this, but here is my first impression: the LLVM Builder class misbehaves when generating multiple terminator instructions, although the IR parser accepts the first. From a semantic viewpoint, I would prefer to raise a RuntimeError when a program attempts to emit a second terminator. This could be managed in ruby-llvm in an ad hoc way, but until that is implemented, it remains as undefined behavior. If you have any more insight, I'd love to hear it.
Best,
Jeremy
On Sunday, August 21, 2011 at 2:20 PM, Ary Borenszweig wrote:
> I wanted to make a pull request but I already have one. When going to the pull request page it also shows that it includes that second commit with the failing test. Maybe you never merged the other pull request?
>
> https://github.com/jvoorhis/ruby-llvm/pull/6
>
> In any case, here's the commits on my side:
>
> https://github.com/asterite/ruby-llvm/commit/ca999aa6f27308300c3cfbfaaf5c16c7edc76bc6
> https://github.com/asterite/ruby-llvm/commit/c8abae7b4a27ecc64a1060951258a4114e968b9d
>
> (I just realized a commited a test with just one return... I was checking if it worked with one return and forgot to add the second return back :-()
>