diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2013-12-04 22:02:33 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2013-12-04 22:02:33 +0000 |
commit | d9c5c5cb3f207b4ca3894406431b81d8460b28e5 (patch) | |
tree | 7d1d9ca68032144bbe0bb4f1b3042d72eeb0ec71 /clang/lib/Sema/TargetAttributesSema.cpp | |
parent | 155f88118b462d276d1c54dbff603eaf380a73c0 (diff) | |
download | bcm5719-llvm-d9c5c5cb3f207b4ca3894406431b81d8460b28e5.tar.gz bcm5719-llvm-d9c5c5cb3f207b4ca3894406431b81d8460b28e5.zip |
Getting rid of some hard-coded strings. No functional changes intended, though some test cases needed to be updated for attribute names becoming quoted.
llvm-svn: 196417
Diffstat (limited to 'clang/lib/Sema/TargetAttributesSema.cpp')
-rw-r--r-- | clang/lib/Sema/TargetAttributesSema.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Sema/TargetAttributesSema.cpp b/clang/lib/Sema/TargetAttributesSema.cpp index 375e39cae07..1469e1247f6 100644 --- a/clang/lib/Sema/TargetAttributesSema.cpp +++ b/clang/lib/Sema/TargetAttributesSema.cpp @@ -61,7 +61,7 @@ namespace { ARMAttributesSema() { } bool ProcessDeclAttribute(Scope *scope, Decl *D, const AttributeList &Attr, Sema &S) const { - if (Attr.getName()->getName() == "interrupt") { + if (Attr.getKind() == AttributeList::AT_ARMInterrupt) { HandleARMInterruptAttr(D, Attr, S); return true; } @@ -195,7 +195,7 @@ static void HandleDLLImportAttr(Decl *D, const AttributeList &Attr, Sema &S) { // Currently, the dllimport attribute is ignored for inlined functions. // Warning is emitted. if (FD && FD->isInlineSpecified()) { - S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << "dllimport"; + S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << Attr.getName(); return; } @@ -239,7 +239,7 @@ static void HandleDLLExportAttr(Decl *D, const AttributeList &Attr, Sema &S) { // the -fkeep-inline-functions flag has been used. Warning is emitted; if (FD && FD->isInlineSpecified()) { // FIXME: ... unless the -fkeep-inline-functions flag has been used. - S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << "dllexport"; + S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << Attr.getName(); return; } @@ -317,10 +317,10 @@ namespace { MipsAttributesSema() { } bool ProcessDeclAttribute(Scope *scope, Decl *D, const AttributeList &Attr, Sema &S) const { - if (Attr.getName()->getName() == "mips16") { + if (Attr.getKind() == AttributeList::AT_Mips16) { HandleMips16Attr(D, Attr, S); return true; - } else if (Attr.getName()->getName() == "nomips16") { + } else if (Attr.getKind() == AttributeList::AT_NoMips16) { HandleNoMips16Attr(D, Attr, S); return true; } |