summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize
diff options
context:
space:
mode:
authorYaxun Liu <Yaxun.Liu@amd.com>2018-07-20 11:32:51 +0000
committerYaxun Liu <Yaxun.Liu@amd.com>2018-07-20 11:32:51 +0000
commit99a9f75948598a41afaf2ca1b3277593f4fd54b2 (patch)
tree9fad5231d36aa43bee928dded9b0bca263135139 /llvm/lib/Transforms/Vectorize
parent5c608154a7e42c482065036d9f137fb52bb3ad86 (diff)
downloadbcm5719-llvm-99a9f75948598a41afaf2ca1b3277593f4fd54b2.tar.gz
bcm5719-llvm-99a9f75948598a41afaf2ca1b3277593f4fd54b2.zip
Sema: Fix explicit address space cast in C++
Currently clang does not allow implicit cast of a pointer to a pointer type in different address space but allows C-style cast of a pointer to a pointer type in different address space. However, there is a bug in Sema causing incorrect Cast Expr in AST for the latter case, which in turn results in invalid LLVM IR in codegen. This is because Sema::IsQualificationConversion returns true for a cast of pointer to a pointer type in different address space, which in turn allows a standard conversion and results in a cast expression with no op in AST. This patch fixes that by let Sema::IsQualificationConversion returns false for a cast of pointer to a pointer type in different address space, which in turn disallows standard conversion, implicit cast, and static cast. Finally it results in an reinterpret cast and correct conversion kind is set. Differential Revision: https://reviews.llvm.org/D49294 llvm-svn: 337540
Diffstat (limited to 'llvm/lib/Transforms/Vectorize')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud