Browse Source

[AST] Pull simple method inline.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259304 91177308-0d34-0410-b5e6-96231b3b80d8
Benjamin Kramer 9 years ago
parent
commit
b1072f2da8
2 changed files with 3 additions and 5 deletions
  1. 3 1
      include/clang/AST/ASTTypeTraits.h
  2. 0 4
      lib/AST/ASTTypeTraits.cpp

+ 3 - 1
include/clang/AST/ASTTypeTraits.h

@@ -62,7 +62,9 @@ public:
   /// \}
   /// \}
 
 
   /// \brief Returns \c true if \c this and \c Other represent the same kind.
   /// \brief Returns \c true if \c this and \c Other represent the same kind.
-  bool isSame(ASTNodeKind Other) const;
+  bool isSame(ASTNodeKind Other) const {
+    return KindId != NKI_None && KindId == Other.KindId;
+  }
 
 
   /// \brief Returns \c true only for the default \c ASTNodeKind()
   /// \brief Returns \c true only for the default \c ASTNodeKind()
   bool isNone() const { return KindId == NKI_None; }
   bool isNone() const { return KindId == NKI_None; }

+ 0 - 4
lib/AST/ASTTypeTraits.cpp

@@ -43,10 +43,6 @@ bool ASTNodeKind::isBaseOf(ASTNodeKind Other, unsigned *Distance) const {
   return isBaseOf(KindId, Other.KindId, Distance);
   return isBaseOf(KindId, Other.KindId, Distance);
 }
 }
 
 
-bool ASTNodeKind::isSame(ASTNodeKind Other) const {
-  return KindId != NKI_None && KindId == Other.KindId;
-}
-
 bool ASTNodeKind::isBaseOf(NodeKindId Base, NodeKindId Derived,
 bool ASTNodeKind::isBaseOf(NodeKindId Base, NodeKindId Derived,
                            unsigned *Distance) {
                            unsigned *Distance) {
   if (Base == NKI_None || Derived == NKI_None) return false;
   if (Base == NKI_None || Derived == NKI_None) return false;