diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2008-03-19 01:11:35 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2008-03-19 01:11:35 +0000 |
commit | dc1ce7bdc6e32e7a4c4a110caa32834730183c1b (patch) | |
tree | 9844c6c709f7e226211ac1b0178257a29780f262 /include/llvm-c | |
parent | 94202018c51d662c793a77a5e8239f3a35e11e60 (diff) | |
download | external_llvm-dc1ce7bdc6e32e7a4c4a110caa32834730183c1b.zip external_llvm-dc1ce7bdc6e32e7a4c4a110caa32834730183c1b.tar.gz external_llvm-dc1ce7bdc6e32e7a4c4a110caa32834730183c1b.tar.bz2 |
C and Objective Caml bindings for the various getParent methods of the IR.
Based on Erick Tryzelaar's patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48523 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm-c')
-rw-r--r-- | include/llvm-c/Core.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h index 2c1228e..734f066 100644 --- a/include/llvm-c/Core.h +++ b/include/llvm-c/Core.h @@ -362,6 +362,7 @@ LLVMValueRef LLVMConstShuffleVector(LLVMValueRef VectorAConstant, LLVMValueRef MaskConstant); /* Operations on global variables, functions, and aliases (globals) */ +LLVMModuleRef LLVMGetGlobalParent(LLVMValueRef Global); int LLVMIsDeclaration(LLVMValueRef Global); LLVMLinkage LLVMGetLinkage(LLVMValueRef Global); void LLVMSetLinkage(LLVMValueRef Global, LLVMLinkage Linkage); @@ -389,19 +390,23 @@ LLVMValueRef LLVMAddFunction(LLVMModuleRef M, const char *Name, LLVMTypeRef FunctionTy); LLVMValueRef LLVMGetNamedFunction(LLVMModuleRef M, const char *Name); void LLVMDeleteFunction(LLVMValueRef Fn); -unsigned LLVMCountParams(LLVMValueRef Fn); -void LLVMGetParams(LLVMValueRef Fn, LLVMValueRef *Params); -LLVMValueRef LLVMGetParam(LLVMValueRef Fn, unsigned Index); unsigned LLVMGetIntrinsicID(LLVMValueRef Fn); unsigned LLVMGetFunctionCallConv(LLVMValueRef Fn); void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC); const char *LLVMGetCollector(LLVMValueRef Fn); void LLVMSetCollector(LLVMValueRef Fn, const char *Coll); +/* Operations on parameters */ +unsigned LLVMCountParams(LLVMValueRef Fn); +void LLVMGetParams(LLVMValueRef Fn, LLVMValueRef *Params); +LLVMValueRef LLVMGetParam(LLVMValueRef Fn, unsigned Index); +LLVMValueRef LLVMGetParamParent(LLVMValueRef Inst); + /* Operations on basic blocks */ LLVMValueRef LLVMBasicBlockAsValue(LLVMBasicBlockRef Bb); int LLVMValueIsBasicBlock(LLVMValueRef Val); LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val); +LLVMValueRef LLVMGetBasicBlockParent(LLVMValueRef V); unsigned LLVMCountBasicBlocks(LLVMValueRef Fn); void LLVMGetBasicBlocks(LLVMValueRef Fn, LLVMBasicBlockRef *BasicBlocks); LLVMBasicBlockRef LLVMGetEntryBasicBlock(LLVMValueRef Fn); @@ -410,6 +415,9 @@ LLVMBasicBlockRef LLVMInsertBasicBlock(LLVMBasicBlockRef InsertBeforeBB, const char *Name); void LLVMDeleteBasicBlock(LLVMBasicBlockRef BB); +/* Operations on instructions */ +LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst); + /* Operations on call sites */ void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC); unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr); @@ -430,6 +438,7 @@ LLVMBasicBlockRef LLVMGetIncomingBlock(LLVMValueRef PhiNode, unsigned Index); LLVMBuilderRef LLVMCreateBuilder(); void LLVMPositionBuilderBefore(LLVMBuilderRef Builder, LLVMValueRef Instr); void LLVMPositionBuilderAtEnd(LLVMBuilderRef Builder, LLVMBasicBlockRef Block); +LLVMBasicBlockRef LLVMGetInsertBlock(LLVMBuilderRef Builder); void LLVMDisposeBuilder(LLVMBuilderRef Builder); /* Terminators */ |