Added C and Ocaml bindings for functions, basic blocks, and

instruction creation. No support yet for instruction introspection.

Also eliminated allocas from the Ocaml bindings for portability,
and avoided unnecessary casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42367 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gordon Henriksen
2007-09-26 20:56:12 +00:00
parent f41db2136f
commit 46abf91f73
11 changed files with 2088 additions and 234 deletions

View File

@@ -89,6 +89,16 @@ namespace llvm {
inline LLVMValueRef *wrap(const Value **Vals) {
return reinterpret_cast<LLVMValueRef*>(const_cast<Value**>(Vals));
}
/// Basic block conversions
///
inline BasicBlock *unwrap(LLVMBasicBlockRef BBRef) {
return reinterpret_cast<BasicBlock*>(BBRef);
}
inline LLVMBasicBlockRef wrap(const BasicBlock *BB) {
return reinterpret_cast<LLVMBasicBlockRef>(const_cast<BasicBlock*>(BB));
}
}
#endif