[cfe-commits] r80163 - in /cfe/trunk: include/clang/AST/Attr.h lib/CodeGen/CGObjC.cpp lib/CodeGen/CodeGenFunction.cpp lib/CodeGen/CodeGenModule.cpp lib/Frontend/PCHReaderDecl.cpp lib/Frontend/PCHWriter.cpp lib/Sema/SemaDeclAttr.cpp

Mike Stump mrs at apple.com
Wed Aug 26 15:31:08 PDT 2009


Author: mrs
Date: Wed Aug 26 17:31:08 2009
New Revision: 80163

URL: http://llvm.org/viewvc/llvm-project?rev=80163&view=rev
Log:
Regularize the case and sort.

Modified:
    cfe/trunk/include/clang/AST/Attr.h
    cfe/trunk/lib/CodeGen/CGObjC.cpp
    cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
    cfe/trunk/lib/CodeGen/CodeGenModule.cpp
    cfe/trunk/lib/Frontend/PCHReaderDecl.cpp
    cfe/trunk/lib/Frontend/PCHWriter.cpp
    cfe/trunk/lib/Sema/SemaDeclAttr.cpp

Modified: cfe/trunk/include/clang/AST/Attr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Attr.h?rev=80163&r1=80162&r2=80163&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Attr.h (original)
+++ cfe/trunk/include/clang/AST/Attr.h Wed Aug 26 17:31:08 2009
@@ -63,11 +63,11 @@
     GNUInline,
     IBOutletKind, // Clang-specific.  Use "Kind" suffix to not conflict with
     Malloc,
+    NoDebug,
+    NoInline,
+    NonNull,
     NoReturn,
     NoThrow,
-    Nodebug,
-    Noinline,
-    NonNull,
     ObjCException,
     ObjCNSObject,
     CFReturnsRetained,   // Clang/Checker-specific.
@@ -496,9 +496,9 @@
   static bool classof(const CleanupAttr *A) { return true; }
 };
 
-DEF_SIMPLE_ATTR(Nodebug);
+DEF_SIMPLE_ATTR(NoDebug);
 DEF_SIMPLE_ATTR(WarnUnusedResult);  
-DEF_SIMPLE_ATTR(Noinline);
+DEF_SIMPLE_ATTR(NoInline);
 
 class RegparmAttr : public Attr {
   unsigned NumParams;

Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=80163&r1=80162&r2=80163&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjC.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjC.cpp Wed Aug 26 17:31:08 2009
@@ -126,7 +126,7 @@
 /// its pointer, name, and types registered in the class struture.  
 void CodeGenFunction::GenerateObjCMethod(const ObjCMethodDecl *OMD) {
   // Check if we should generate debug info for this method.
-  if (CGM.getDebugInfo() && !OMD->hasAttr<NodebugAttr>())
+  if (CGM.getDebugInfo() && !OMD->hasAttr<NoDebugAttr>())
     DebugInfo = CGM.getDebugInfo();
   StartObjCMethod(OMD, OMD->getClassInterface());
   EmitStmt(OMD->getBody());

Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=80163&r1=80162&r2=80163&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Wed Aug 26 17:31:08 2009
@@ -202,7 +202,7 @@
 void CodeGenFunction::GenerateCode(const FunctionDecl *FD,
                                    llvm::Function *Fn) {
   // Check if we should generate debug info for this function.
-  if (CGM.getDebugInfo() && !FD->hasAttr<NodebugAttr>())
+  if (CGM.getDebugInfo() && !FD->hasAttr<NoDebugAttr>())
     DebugInfo = CGM.getDebugInfo();
   
   FunctionArgList Args;

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=80163&r1=80162&r2=80163&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Wed Aug 26 17:31:08 2009
@@ -360,7 +360,7 @@
   if (D->hasAttr<AlwaysInlineAttr>())
     F->addFnAttr(llvm::Attribute::AlwaysInline);
   
-  if (D->hasAttr<NoinlineAttr>())
+  if (D->hasAttr<NoInlineAttr>())
     F->addFnAttr(llvm::Attribute::NoInline);
 }
 

Modified: cfe/trunk/lib/Frontend/PCHReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReaderDecl.cpp?rev=80163&r1=80162&r2=80163&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/PCHReaderDecl.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReaderDecl.cpp Wed Aug 26 17:31:08 2009
@@ -548,10 +548,10 @@
       break;
 
     SIMPLE_ATTR(Malloc);
+    SIMPLE_ATTR(NoDebug);
+    SIMPLE_ATTR(NoInline);
     SIMPLE_ATTR(NoReturn);
     SIMPLE_ATTR(NoThrow);
-    SIMPLE_ATTR(Nodebug);
-    SIMPLE_ATTR(Noinline);
     
     case Attr::NonNull: {
       unsigned Size = Record[Idx++];

Modified: cfe/trunk/lib/Frontend/PCHWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHWriter.cpp?rev=80163&r1=80162&r2=80163&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/PCHWriter.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHWriter.cpp Wed Aug 26 17:31:08 2009
@@ -1673,10 +1673,10 @@
     case Attr::GNUInline:
     case Attr::IBOutletKind:
     case Attr::Malloc:
+    case Attr::NoDebug:
     case Attr::NoReturn:
     case Attr::NoThrow:
-    case Attr::Nodebug:
-    case Attr::Noinline:
+    case Attr::NoInline:
       break;
 
     case Attr::NonNull: {

Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=80163&r1=80162&r2=80163&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Wed Aug 26 17:31:08 2009
@@ -1635,7 +1635,7 @@
     cast<ValueDecl>(D)->setType(NewTy);
 }
 
-static void HandleNodebugAttr(Decl *d, const AttributeList &Attr, Sema &S) {
+static void HandleNoDebugAttr(Decl *d, const AttributeList &Attr, Sema &S) {
   // check the attribute arguments.
   if (Attr.getNumArgs() > 0) {
     S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 0;
@@ -1648,10 +1648,10 @@
     return;
   }
 
-  d->addAttr(::new (S.Context) NodebugAttr());
+  d->addAttr(::new (S.Context) NoDebugAttr());
 }
 
-static void HandleNoinlineAttr(Decl *d, const AttributeList &Attr, Sema &S) {
+static void HandleNoInlineAttr(Decl *d, const AttributeList &Attr, Sema &S) {
   // check the attribute arguments.
   if (Attr.getNumArgs() != 0) {
     S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 0;
@@ -1664,7 +1664,7 @@
     return;
   }
 
-  d->addAttr(::new (S.Context) NoinlineAttr());
+  d->addAttr(::new (S.Context) NoInlineAttr());
 }
 
 static void HandleGNUInlineAttr(Decl *d, const AttributeList &Attr, Sema &S) {
@@ -1843,8 +1843,8 @@
   case AttributeList::AT_const:       HandleConstAttr     (D, Attr, S); break;
   case AttributeList::AT_pure:        HandlePureAttr      (D, Attr, S); break;
   case AttributeList::AT_cleanup:     HandleCleanupAttr   (D, Attr, S); break;
-  case AttributeList::AT_nodebug:     HandleNodebugAttr   (D, Attr, S); break;
-  case AttributeList::AT_noinline:    HandleNoinlineAttr  (D, Attr, S); break;
+  case AttributeList::AT_nodebug:     HandleNoDebugAttr   (D, Attr, S); break;
+  case AttributeList::AT_noinline:    HandleNoInlineAttr  (D, Attr, S); break;
   case AttributeList::AT_regparm:     HandleRegparmAttr   (D, Attr, S); break;
   case AttributeList::IgnoredAttribute:
   case AttributeList::AT_no_instrument_function:  // Interacts with -pg.





More information about the cfe-commits mailing list