diff options
Diffstat (limited to 'include/llvm')
| -rw-r--r-- | include/llvm/CHelpers.h | 10 |
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 |
