]> granicus.if.org Git - clang/commitdiff
Move 'static inline' functions GetNullarySelector() and GetUnarySelector() from CFRef...
authorTed Kremenek <kremenek@apple.com>
Tue, 3 Nov 2009 08:00:42 +0000 (08:00 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 3 Nov 2009 08:00:42 +0000 (08:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85886 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/ASTContext.h
lib/Analysis/CFRefCount.cpp

index dca55b6d3ffe30da9703c8559db1895470e150f0..a51a3d61677a075c209346bf7ddf41ab8de7c5b4 100644 (file)
@@ -1124,6 +1124,18 @@ private:
   const ASTRecordLayout &getObjCLayout(const ObjCInterfaceDecl *D,
                                        const ObjCImplementationDecl *Impl);
 };
+  
+/// @brief Utility function for constructing a nullary selector.
+static inline Selector GetNullarySelector(const char* name, ASTContext& Ctx) {
+  IdentifierInfo* II = &Ctx.Idents.get(name);
+  return Ctx.Selectors.getSelector(0, &II);
+}
+
+/// @brief Utility function for constructing an unary selector.
+static inline Selector GetUnarySelector(const char* name, ASTContext& Ctx) {
+  IdentifierInfo* II = &Ctx.Idents.get(name);
+  return Ctx.Selectors.getSelector(1, &II);
+}
 
 }  // end namespace clang
 
index 853b5823b7bbaba3e92e8d4f765b335b0fd7f318..574a61847041076bded6f238d387c69bebc0a05b 100644 (file)
@@ -192,20 +192,6 @@ public:
 };
 } // end anonymous namespace
 
-//===----------------------------------------------------------------------===//
-// Selector creation functions.
-//===----------------------------------------------------------------------===//
-
-static inline Selector GetNullarySelector(const char* name, ASTContext& Ctx) {
-  IdentifierInfo* II = &Ctx.Idents.get(name);
-  return Ctx.Selectors.getSelector(0, &II);
-}
-
-static inline Selector GetUnarySelector(const char* name, ASTContext& Ctx) {
-  IdentifierInfo* II = &Ctx.Idents.get(name);
-  return Ctx.Selectors.getSelector(1, &II);
-}
-
 //===----------------------------------------------------------------------===//
 // Type querying functions.
 //===----------------------------------------------------------------------===//