BackupGGCode / llvm-py

Python bindings for LLVM
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Patch for compiling with LLVM 2.6 #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, I've attached a patch to get llvm-py working with LLVM 2.6 (from SVN).
This patch works with r82 of llvm-py. Here's a summary of the changes:

- Removed instructions vicmp, and vfcmp.
- Added instructions fadd, fsub, and fmul.
- Removed is_trapping attribute of call instructions.
- Updated following enums in core.py: type kinds, value ids, opcodes,
linkage, attributes.
- Updated wrap.cpp for api changes, e.g: replaced std::ostringstream with
llvm::raw_string_stream, replaced llvm::ParseError with llvm::SMDiagnostic.
- In wrap.cpp, removed those passes which have been added to the llvm-c api.
- Regenerated _intrinsic_ids.py
- In module init function, added calls to LLVMLinkInJIT,
LLVMLinkInInterpreter, and LLVMInitializeNativeTarget. These calls are
required for the JIT and Interpreter to work.

I've tested this patch on Mac OS X 10.4

Original issue reported on code.google.com by kstach...@gmail.com on 23 Sep 2009 at 7:36

Attachments:

GoogleCodeExporter commented 9 years ago
Even with this patch, I can't cleanly import * from llvm.core with the current 
HEAD
of 2.6 of LLVM. It complains about _LLVMCountDatatypes or something. Any hints 
there?

Original comment by djc.ochtman on 12 Oct 2009 at 8:34

GoogleCodeExporter commented 9 years ago
Ah, the LLVMCountDatatypes seems to be specific to OS X. On Linux, it seems to 
work
alright.

Original comment by djc.ochtman on 12 Oct 2009 at 11:44

GoogleCodeExporter commented 9 years ago
Now that LLVM 2.6 is really out, it would be nice to put this into the tree (and
maybe do a release). I'd like to put it in the Gentoo tree...

Original comment by djc.ochtman on 26 Oct 2009 at 10:06

GoogleCodeExporter commented 9 years ago
Applied, thanks!

Original comment by mdevan.f...@gmail.com on 28 Oct 2009 at 6:03