Added instruction operands (Seth Warn)
git-svn-id: http://llvm-py.googlecode.com/svn/trunk@66 8d1e9007-1d4e-0410-b67e-1979fd6579aa
This commit is contained in:
parent
1b4b807884
commit
2eeb7630a1
6 changed files with 93 additions and 2 deletions
|
|
@ -237,6 +237,21 @@ unsigned LLVMInstGetOpcode(LLVMValueRef inst)
|
|||
return instp->getOpcode();
|
||||
}
|
||||
|
||||
unsigned LLVMInstGetNumOperands(LLVMValueRef inst)
|
||||
{
|
||||
llvm::Instruction *instp = llvm::unwrap<llvm::Instruction>(inst);
|
||||
assert(instp);
|
||||
return instp->getNumOperands();
|
||||
}
|
||||
|
||||
LLVMValueRef LLVMInstGetOperand(LLVMValueRef inst, unsigned idx)
|
||||
{
|
||||
llvm::Instruction *instp = llvm::unwrap<llvm::Instruction>(inst);
|
||||
assert(instp);
|
||||
llvm::Value *operand = instp->getOperand(idx);
|
||||
return llvm::wrap(operand);
|
||||
}
|
||||
|
||||
/* llvm::unwrap a set of `n' wrapped objects starting at `values',
|
||||
* into a vector of pointers to llvm::unwrapped objects `out'. */
|
||||
template <typename W, typename UW>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue