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

​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