title: Why I encounter error: AttributeError: 'int' object has no attribute 'type'
body: <p>I am using llvmlite for my project in combination with Pyvex. I have defined some functions in llvmlite like the following: </p>
  
  <pre><code>def int32(val): 
      return ir.Constant(ir.IntType(32), val)
  
  
  def put64(putoffset, val):
      llvmtmp = builder.gep(regtag, (int32(0), int32(putoffset)), True)
      return builder.store(val, llvmtmp)
  </code></pre>
  
  <p>However, when I want to call this function using the following code:</p>
  
  <pre><code>for stmt in irsb.statements:
     if isinstance(stmt, pyvex.IRStmt.Put):
        putoffset = stmt.offset
        put64("t3", putoffset)
  </code></pre>
  
  <p>I encounter the error: AttributeError: 'int' object has no attribute 'type'</p>
  
  <p>does anyone know how can I resolve this problem?</p>