title: LLVM - How to get the result variable of an instruction
body: <p>I'm a beginner with LLVM, and I have a simple problem, but I can't find the solution in the documentation.</p>
  
  <p>I'm doing a function pass that computes on instructions, and for this I need all 'data' from the instruction, I mean the operator, all operands, and the result.</p>
  
  <p>My problem is, I can't get the result variable. For example, for the instruction:</p>
  
  <pre><code>%add1 = add nsw i32 %x, %y
  </code></pre>
  
  <p>I can have <em>x</em> and <em>y</em> name and variable, I can have the opCode, I can have <em>add1</em> name, but, I can not have <em>add1</em> variable.</p>
  
  <p>I read all functions from the <a href="http://www.llvm.org/docs/doxygen/html/classllvm_1_1Instruction.html" rel="noreferrer">Instruction</a> page of the documentation, and I can't find anything who looks like what I'm looking for.</p>
  
  <p>So what is the proper API that can solve my problem?</p>