<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56179>56179</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            how to convert a variable into llvm::value using c++ api
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          profdevc
      </td>
    </tr>
</table>

<pre>
    for converting a constant number, like 0,1,..., we can use like  ```IRBuilder::getint8``` or ```ConstantInt::get(Type::getInt32Ty(Context), 1)  (from /llvm/example/fibonacci)```, but I don't find a way to convert a ```int8_t``` or ```int64_t``` type variable into llvm::value . Maybe the variable set from input so it is not constant.   
I'd like to convert the int8_t variable in c++ code into llvm::value using llvm api functions and then do somthing like store or add/sub. Can anyone give some advice?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9kk2PmzAQhn8NXEZFYAKEA4dNVpFy6KXae2XsAdwaO8KGXf59x6RhU6mtZMsf73w8M3Zr5dp0dgJhzYKTV6YHHg7Oc-PBzGOLU8TOoNVPhJR2Gc0kScLdO4LgBmaHdxmiMr2P67fTrLQk1_yFRo8U2B93GSjhfjj_TnY1freO2PFtveF-Ji1nbytdk7XHDzKoAwHB1JSWHbvJjrRetF5GWvCDjzeNtOtUaw0XQgWPR8rg2s4eriCtiVjloVNGUuHvfAVvH82gi90l8H_3f6-AtPLwLHpih4VPircagWQLG9hWzsL1jJDAV762CH54snRIJKESZW6E5ywoD8qBsX5_kwSo4PQ1Sl-uRC7vnX9iDgHvsM8EICJ2okFm8h9EswuPH26B3xR0sxFeUVLg1BqKaqhZhDT6YbMLaZ23E4ZWcCmp125uEzjTj-BmtQahVwsGDyR9UYKe8xLLJpd1XvPYK6-xGez7nw3_f9fujI9aCDOeJ90M3t9cMGMXGr3yA4EIO37-h7B8uU32Bwr6Ohfl3IyONkWZVXU8NFWNbYpFkVddXYqsrLJjKwuZ5RxTwUQRa96idk1UnKLiNVYNSxlLS5Znh5RlZXKsjvKQl5inbS3KgkWHFEeudBISJ3bq46nZGNq5dyRq5bz7FLlzqjeIj_h89oOdGgLuJC4i3nibDfYXW4Qsyw">