diff options
author | Alex Richardson <alexrichardson@google.com> | 2022-11-18 21:15:01 +0000 |
---|---|---|
committer | Alex Richardson <alexrichardson@google.com> | 2022-11-19 11:43:17 +0000 |
commit | 0745b0c0354a0c8e1fefb68a3876d15db6c2e27a (patch) | |
tree | 41eed7c5e878196e271e0fb71c1844df429af329 /llvm/lib/Object/XCOFFObjectFile.cpp | |
parent | 6ed85a62bdbc40a7d98205b2b3da1cb46120faf4 (diff) | |
download | llvm-0745b0c0354a0c8e1fefb68a3876d15db6c2e27a.zip llvm-0745b0c0354a0c8e1fefb68a3876d15db6c2e27a.tar.gz llvm-0745b0c0354a0c8e1fefb68a3876d15db6c2e27a.tar.bz2 |
Fix incorrect cast in VisitSYCLUniqueStableNameExpr
Clang language-level address spaces and LLVM pointer address spaces are
not the same thing (even though they will both have a numeric value of
zero in many cases). LangAS is a enum class to avoid implicit conversions,
but eba69b59d1a30dead07da2c279c8ecfd2b62ba9f avoided the compiler error by
adding a `static_cast<>`. While touching this code, simplify it by using
CreatePointerBitCastOrAddrSpaceCast() which is already a no-op if the types
match.
This changes the code generation for spir64 to place the globals in
the sycl_global addreds space, which maps to `addrspace(1)`.
Reviewed By: bader
Differential Revision: https://reviews.llvm.org/D138284
Diffstat (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions