Fix for issue #10.
git-svn-id: http://llvm-py.googlecode.com/svn/trunk@59 8d1e9007-1d4e-0410-b67e-1979fd6579aa
This commit is contained in:
parent
82a63c5e81
commit
58ceb85afb
2 changed files with 25 additions and 2 deletions
20
test/issue10.py
Normal file
20
test/issue10.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
from llvm.core import *
|
||||
import llvm._core
|
||||
|
||||
m = Module.new('a')
|
||||
ti = Type.int()
|
||||
tf = Type.function(ti, [ti, ti])
|
||||
|
||||
f = m.add_function(tf, "func1")
|
||||
|
||||
bb = f.append_basic_block('entry')
|
||||
|
||||
b = Builder.new(bb)
|
||||
|
||||
# There are no instructions in bb. Positioning of the
|
||||
# builder at beginning (or end) should succeed (trivially).
|
||||
|
||||
b.position_at_end(bb)
|
||||
b.position_at_beginning(bb)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue