summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2016-06-10 21:51:18 +0000
committerPirama Arumuga Nainar <pirama@google.com>2016-06-10 21:51:18 +0000
commite5d2d71a60fbe4cddcb7a070f0eed1648b3d40c6 (patch)
tree142fe9c170ff63b95ff19741bf38cc5c05976224 /clang/lib
parent97609bb2fdb1db561b2ca0f32ff4fa413ef4e094 (diff)
downloadbcm5719-llvm-e5d2d71a60fbe4cddcb7a070f0eed1648b3d40c6.tar.gz
bcm5719-llvm-e5d2d71a60fbe4cddcb7a070f0eed1648b3d40c6.zip
Revise RenderScript attribute declaration
Summary: Address post-patch comments to r272342. - Rename the 'kernel' attribute's name - Idiomatically restrict the attribute to the 'RenderScript' LangOpt. Reviewers: aaron.ballman, rsmith Subscribers: cfe-commits, srhines Differential Revision: http://reviews.llvm.org/D21240 llvm-svn: 272438
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index b3846157ffc..ec8746b681c 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -4185,17 +4185,6 @@ static void handleTypeTagForDatatypeAttr(Sema &S, Decl *D,
Attr.getAttributeSpellingListIndex()));
}
-static void handleKernelAttr(Sema &S, Decl *D, const AttributeList &Attr) {
- if (S.LangOpts.RenderScript) {
- D->addAttr(::new (S.Context)
- KernelAttr(Attr.getRange(), S.Context,
- Attr.getAttributeSpellingListIndex()));
- } else {
- S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << "kernel";
- }
-}
-
-
//===----------------------------------------------------------------------===//
// Checker-specific attribute handlers.
//===----------------------------------------------------------------------===//
@@ -5925,8 +5914,8 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
handleTypeTagForDatatypeAttr(S, D, Attr);
break;
- case AttributeList::AT_Kernel:
- handleKernelAttr(S, D, Attr);
+ case AttributeList::AT_RenderScriptKernel:
+ handleSimpleAttribute<RenderScriptKernelAttr>(S, D, Attr);
break;
}
}
OpenPOWER on IntegriCloud