Fix bug with Module.to_bitcode() (Reported by Jun Koi)
This commit is contained in:
parent
c118427118
commit
08bed7dd74
1 changed files with 1 additions and 1 deletions
|
|
@ -535,7 +535,7 @@ class Module(llvm.Wrapper):
|
||||||
ret = False
|
ret = False
|
||||||
if fileobj is None:
|
if fileobj is None:
|
||||||
ret = True
|
ret = True
|
||||||
fileobj = BytesIO
|
fileobj = BytesIO()
|
||||||
api.llvm.WriteBitcodeToFile(self._ptr, fileobj)
|
api.llvm.WriteBitcodeToFile(self._ptr, fileobj)
|
||||||
if ret:
|
if ret:
|
||||||
return fileobj.getvalue()
|
return fileobj.getvalue()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue