aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorGordon Henriksen <gordonhenriksen@mac.com>2007-09-26 20:56:12 +0000
committerGordon Henriksen <gordonhenriksen@mac.com>2007-09-26 20:56:12 +0000
commit46abf91f7378fb7bb118d66fe6d69b5d3af1e9d5 (patch)
tree6bf88bdc8ca68312fb47aed0eded7914b5952c50 /include/llvm
parentf41db2136fe50e1a92aabfcb3ba1ec1f70f5f0d5 (diff)
downloadexternal_llvm-46abf91f7378fb7bb118d66fe6d69b5d3af1e9d5.zip
external_llvm-46abf91f7378fb7bb118d66fe6d69b5d3af1e9d5.tar.gz
external_llvm-46abf91f7378fb7bb118d66fe6d69b5d3af1e9d5.tar.bz2
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
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/CHelpers.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/CHelpers.h b/include/llvm/CHelpers.h
index d00aba3..0ae7503 100644
--- a/include/llvm/CHelpers.h
+++ b/include/llvm/CHelpers.h
@@ -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