[llvm-dev] LLVM IR: 'class llvm::Instruction' has no member named 'getAddressSpace'

Gurunath Kadam via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 28 13:31:07 PST 2016


I have following LLVM IR instruction:

%ptrA = getelementptr float, float addrspace(1)* %A, i32 %id

To get the addrspace value, do I use function call getAddressSpace() or
getPointerAddressSpace() ?

Using getAddressSpace() results in following error:

'class llvm::Instruction' has no member named 'getAddressSpace'

But I see these methods in Instruction.h implemented for getelementptr inst
class.

Thank you.

Regards,

Gurunath

P.S.: is this the right forum to ask such questions? I see very high-level
discussions going on here. If this is not the right forum then please guide
me to the appropriate one. Otherwise thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161128/96d21188/attachment.html>


More information about the llvm-dev mailing list