diff options
author | Anastasia Stulova <anastasia.stulova@arm.com> | 2017-09-27 14:37:00 +0000 |
---|---|---|
committer | Anastasia Stulova <anastasia.stulova@arm.com> | 2017-09-27 14:37:00 +0000 |
commit | ea39f03c83a0842bcbc103c21223bb7885455eae (patch) | |
tree | 1920098658107f4fc8053c405c225e003ef63fec /lib/CodeGen/CGBuilder.h | |
parent | cf6309caa0488734daee4edd2623edc2dd94a42a (diff) |
[OpenCL] Handle address space conversion while setting type alignment.
Added missing addrspacecast case in alignment computation
logic of pointer type emission in IR generation.
Differential Revision: https://reviews.llvm.org/D37804
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBuilder.h')
-rw-r--r-- | lib/CodeGen/CGBuilder.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/CGBuilder.h b/lib/CodeGen/CGBuilder.h index 42f9a428bb..61fe4aac3a 100644 --- a/lib/CodeGen/CGBuilder.h +++ b/lib/CodeGen/CGBuilder.h @@ -145,6 +145,13 @@ public: Addr.getAlignment()); } + using CGBuilderBaseTy::CreateAddrSpaceCast; + Address CreateAddrSpaceCast(Address Addr, llvm::Type *Ty, + const llvm::Twine &Name = "") { + return Address(CreateAddrSpaceCast(Addr.getPointer(), Ty, Name), + Addr.getAlignment()); + } + /// Cast the element type of the given address to a different type, /// preserving information like the alignment and address space. Address CreateElementBitCast(Address Addr, llvm::Type *Ty, |