Skip to content

Commit

Permalink
Check value type for #getArgOperand(int) and remove obsolete throws…
Browse files Browse the repository at this point in the history
… declaration
  • Loading branch information
lembergerth committed Jun 18, 2018
1 parent e5eebb6 commit 62c2dc2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/org/sosy_lab/llvm_j/Value.java
Original file line number Diff line number Diff line change
Expand Up @@ -1017,10 +1017,11 @@ public List<Integer> getIndices() {
/**
* Returns the argument operand at the specified index.
*
* @throws LLVMException if this value is not a function call instruction
* @throws IllegalStateException if this value is not a function call instruction
* @see #isCallInst()
*/
public Value getArgOperand(int index) throws LLVMException {
public Value getArgOperand(int index) {
checkLlvmState(isCallInst(), "Value is not a call instruction: " + this);
int numArgOperands = getNumArgOperands();
if (numArgOperands <= index) {
throw new IndexOutOfBoundsException(
Expand Down

0 comments on commit 62c2dc2

Please sign in to comment.