r241526 - Update target attribute support for post-commit feedback.
Eric Christopher
echristo at gmail.com
Mon Jul 6 16:52:01 PDT 2015
Author: echristo
Date: Mon Jul 6 18:52:01 2015
New Revision: 241526
URL: http://llvm.org/viewvc/llvm-project?rev=241526&view=rev
Log:
Update target attribute support for post-commit feedback.
Use const auto rather than duplicating the type name and fix the
error message when the attribute is applied to an incorrect entity.
Modified:
cfe/trunk/include/clang/Basic/Attr.td
cfe/trunk/lib/CodeGen/CGCall.cpp
Modified: cfe/trunk/include/clang/Basic/Attr.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=241526&r1=241525&r2=241526&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Attr.td (original)
+++ cfe/trunk/include/clang/Basic/Attr.td Mon Jul 6 18:52:01 2015
@@ -1277,7 +1277,7 @@ def Target : InheritableAttr {
let Spellings = [GCC<"target">];
let Args = [StringArgument<"features">];
let Subjects =
- SubjectList<[Function], ErrorDiag, "ExpectedFunctionMethodOrClass">;
+ SubjectList<[Function], ErrorDiag, "ExpectedFunction">;
let Documentation = [Undocumented];
}
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=241526&r1=241525&r2=241526&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Mon Jul 6 18:52:01 2015
@@ -1506,7 +1506,7 @@ void CodeGenModule::ConstructAttributeLi
const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(TargetDecl);
if (FD) {
- if (const TargetAttr *TD = FD->getAttr<TargetAttr>()) {
+ if (const auto *TD = FD->getAttr<TargetAttr>()) {
StringRef FeaturesStr = TD->getFeatures();
SmallVector<StringRef, 1> AttrFeatures;
FeaturesStr.split(AttrFeatures, ",");
More information about the cfe-commits
mailing list