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 | 26891338050e0570041cff565d041af56eaa26cd (patch) | |
tree | 5e7566e88e23cfff35d6ef1f02fea9ee0b4b1f08 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 303eb178a9b3806563cf346ae03199192aa8720a (diff) | |
download | bcm5719-llvm-26891338050e0570041cff565d041af56eaa26cd.tar.gz bcm5719-llvm-26891338050e0570041cff565d041af56eaa26cd.zip |
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.
llvm-svn: 199229
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index a6ed8cb47e3..108c1477819 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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")); |