diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2014-01-14 17:41:53 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2014-01-14 17:41:53 +0000 |
| commit | 3e520c29024437b6dd07d2102918e67223edd6ca (patch) | |
| tree | 9dece4ca21e916cfd6b1226b4194d00f57ed65ed /lib/CodeGen/CodeGenFunction.cpp | |
| parent | d2076ba11a988f0c767d11f1f6c551c792a407fe (diff) | |
| download | clang-3e520c29024437b6dd07d2102918e67223edd6ca.tar.gz clang-3e520c29024437b6dd07d2102918e67223edd6ca.tar.bz2 clang-3e520c29024437b6dd07d2102918e67223edd6ca.tar.xz | |
Simplifying the OpenCL image attribute. It does not need a semantic integer parameter because the required information is encoded in the spelling. Added an appropriate subject to the attribute, and simplified the semantic checking (which will likely be expanded upon in a future patch). Also, removed the GNU spelling since it was unsupported in the first place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199229 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index a6ed8cb47e..108c147781 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -22,7 +22,6 @@ #include "clang/AST/Decl.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/StmtCXX.h" -#include "clang/Basic/OpenCL.h" #include "clang/Basic/TargetInfo.h" #include "clang/CodeGen/CGFunctionInfo.h" #include "clang/Frontend/CodeGenOptions.h" @@ -412,10 +411,11 @@ static void GenOpenCLArgMetadata(const FunctionDecl *FD, llvm::Function *Fn, // Get image access qualifier: if (ty->isImageType()) { const OpenCLImageAccessAttr *A = parm->getAttr<OpenCLImageAccessAttr>(); - if (A && A->getAccess() == CLIA_write_only) + if (A && A->isWriteOnly()) accessQuals.push_back(llvm::MDString::get(Context, "write_only")); else accessQuals.push_back(llvm::MDString::get(Context, "read_only")); + // FIXME: what about read_write? } else accessQuals.push_back(llvm::MDString::get(Context, "none")); |
