mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
[LLVM-C] Expose User::getOperandUse as LLVMGetOperandUse.
Patch by Gabriel Radanne <drupyog@zoho.com> llvm-svn: 215419
This commit is contained in:
parent
c007e0faa6
commit
58cb4e0217
@ -1377,6 +1377,13 @@ LLVMValueRef LLVMGetUsedValue(LLVMUseRef U);
|
|||||||
*/
|
*/
|
||||||
LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned Index);
|
LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned Index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtain the use of an operand at a specific index in a llvm::User value.
|
||||||
|
*
|
||||||
|
* @see llvm::User::getOperandUse()
|
||||||
|
*/
|
||||||
|
LLVMUseRef LLVMGetOperandUse(LLVMValueRef Val, unsigned Index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set an operand at a specific index in a llvm::User value.
|
* Set an operand at a specific index in a llvm::User value.
|
||||||
*
|
*
|
||||||
|
@ -603,6 +603,11 @@ LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned Index) {
|
|||||||
return wrap(cast<User>(V)->getOperand(Index));
|
return wrap(cast<User>(V)->getOperand(Index));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLVMUseRef LLVMGetOperandUse(LLVMValueRef Val, unsigned Index) {
|
||||||
|
Value *V = unwrap(Val);
|
||||||
|
return wrap(&cast<User>(V)->getOperandUse(Index));
|
||||||
|
}
|
||||||
|
|
||||||
void LLVMSetOperand(LLVMValueRef Val, unsigned Index, LLVMValueRef Op) {
|
void LLVMSetOperand(LLVMValueRef Val, unsigned Index, LLVMValueRef Op) {
|
||||||
unwrap<User>(Val)->setOperand(Index, unwrap(Op));
|
unwrap<User>(Val)->setOperand(Index, unwrap(Op));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user