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 | 561bba2e9f3e67979b0cf6104b48067f8f7d6647 (patch) | |
tree | e739d899d95f659ca848c43e6f02dbedf68378a6 /clang/lib/AST/ExprClassification.cpp | |
parent | dba269286531073ddfc73b1b939501e7cb7cd177 (diff) |
[OpenCL] Make sure we put string literals in the constant address space.
llvm-svn: 194717
Diffstat (limited to 'clang/lib/AST/ExprClassification.cpp')
-rw-r--r-- | clang/lib/AST/ExprClassification.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp index 4640d7d37d61..54f77efef0f9 100644 --- a/clang/lib/AST/ExprClassification.cpp +++ b/clang/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()) |