diff options
| author | Joey Gouly <joey.gouly@arm.com> | 2013-11-14 18:26:10 +0000 |
|---|---|---|
| committer | Joey Gouly <joey.gouly@arm.com> | 2013-11-14 18:26:10 +0000 |
| commit | 758c4d86bb9b2298374fce5b3ca4a35f953f2d2e (patch) | |
| tree | c5f886e049e56b69df48c7c8369934dcd26067c8 /lib/AST/ExprClassification.cpp | |
| parent | 6973a27866b176b1cf4e3e3ebcf0196e101b85dd (diff) | |
| download | clang-758c4d86bb9b2298374fce5b3ca4a35f953f2d2e.tar.gz clang-758c4d86bb9b2298374fce5b3ca4a35f953f2d2e.tar.bz2 clang-758c4d86bb9b2298374fce5b3ca4a35f953f2d2e.tar.xz | |
[OpenCL] Make sure we put string literals in the constant address space.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprClassification.cpp')
| -rw-r--r-- | lib/AST/ExprClassification.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/AST/ExprClassification.cpp b/lib/AST/ExprClassification.cpp index 4640d7d37d..54f77efef0 100644 --- a/lib/AST/ExprClassification.cpp +++ b/lib/AST/ExprClassification.cpp @@ -592,6 +592,8 @@ static Cl::ModifiableType IsModifiable(ASTContext &Ctx, const Expr *E, // Const stuff is obviously not modifiable. if (CT.isConstQualified()) return Cl::CM_ConstQualified; + if (CT.getQualifiers().getAddressSpace() == LangAS::opencl_constant) + return Cl::CM_ConstQualified; // Arrays are not modifiable, only their elements are. if (CT->isArrayType()) |
