mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-29 13:18:23 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user