[llvm-dev] AttributeError: 'str' object has no attribute 'type'

Samaneh Berenjian via llvm-dev llvm-dev at lists.llvm.org
Fri Jul 28 08:36:22 PDT 2017


​Hi all, 


I have defined the following in my code:

if (str(loadaddr).startswith("0x")):
             const_3 = ir.Constant(int64, int('{}'.format(loadaddr), 16))
             builder.load(tmp0, const_3)

Why I encounter the following error:


AttributeError: 'str' object has no attribute 'type'

Thank you in advance


-- 
This email was Anti Virus checked by  Security Gateway.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170728/a0d62758/attachment.html>


More information about the llvm-dev mailing list