summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGBuilder.h
diff options
context:
space:
mode:
authorAnastasia Stulova <anastasia.stulova@arm.com>2017-09-27 14:37:00 +0000
committerAnastasia Stulova <anastasia.stulova@arm.com>2017-09-27 14:37:00 +0000
commitea39f03c83a0842bcbc103c21223bb7885455eae (patch)
tree1920098658107f4fc8053c405c225e003ef63fec /lib/CodeGen/CGBuilder.h
parentcf6309caa0488734daee4edd2623edc2dd94a42a (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.h7
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,