[lld] r197726 - Remove redundant 'classof' functions.

Joey Gouly joey.gouly at gmail.com
Thu Dec 19 13:51:14 PST 2013


Author: joey
Date: Thu Dec 19 15:51:13 2013
New Revision: 197726

URL: http://llvm.org/viewvc/llvm-project?rev=197726&view=rev
Log:
Remove redundant 'classof' functions.

Modified:
    lld/trunk/include/lld/Driver/CoreInputGraph.h
    lld/trunk/include/lld/Driver/DarwinInputGraph.h
    lld/trunk/include/lld/Driver/GnuLdInputGraph.h
    lld/trunk/include/lld/Driver/WinLinkInputGraph.h

Modified: lld/trunk/include/lld/Driver/CoreInputGraph.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/CoreInputGraph.h?rev=197726&r1=197725&r2=197726&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/CoreInputGraph.h (original)
+++ lld/trunk/include/lld/Driver/CoreInputGraph.h Thu Dec 19 15:51:13 2013
@@ -30,10 +30,6 @@ public:
   COREFileNode(CoreLinkingContext &ctx, StringRef path)
       : FileNode(path), _ctx(ctx) {}
 
-  static inline bool classof(const InputElement *a) {
-    return a->kind() == InputElement::Kind::File;
-  }
-
   /// \brief validates the Input Element
   virtual bool validate() {
     (void)_ctx;

Modified: lld/trunk/include/lld/Driver/DarwinInputGraph.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/DarwinInputGraph.h?rev=197726&r1=197725&r2=197726&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/DarwinInputGraph.h (original)
+++ lld/trunk/include/lld/Driver/DarwinInputGraph.h Thu Dec 19 15:51:13 2013
@@ -30,10 +30,6 @@ public:
   MachOFileNode(MachOLinkingContext &ctx, StringRef path, bool isWholeArchive)
       : FileNode(path), _ctx(ctx), _isWholeArchive(isWholeArchive) {}
 
-  static inline bool classof(const InputElement *a) {
-    return a->kind() == InputElement::Kind::File;
-  }
-
   /// \brief validates the Input Element
   virtual bool validate() {
     (void)_ctx;

Modified: lld/trunk/include/lld/Driver/GnuLdInputGraph.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/GnuLdInputGraph.h?rev=197726&r1=197725&r2=197726&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/GnuLdInputGraph.h (original)
+++ lld/trunk/include/lld/Driver/GnuLdInputGraph.h Thu Dec 19 15:51:13 2013
@@ -35,10 +35,6 @@ public:
         _isWholeArchive(isWholeArchive), _asNeeded(asNeeded),
         _isDashlPrefix(dashlPrefix) {}
 
-  static inline bool classof(const InputElement *a) {
-    return a->kind() == InputElement::Kind::File;
-  }
-
   virtual ErrorOr<StringRef> getPath(const LinkingContext &ctx) const;
 
   /// \brief validates the Input Element
@@ -104,10 +100,6 @@ public:
   ELFGroup(const ELFLinkingContext &ctx, int64_t ordinal)
       : Group(ordinal), _elfLinkingContext(ctx) {}
 
-  static inline bool classof(const InputElement *a) {
-    return a->kind() == InputElement::Kind::Control;
-  }
-
   /// \brief Validate the options
   virtual bool validate() {
     (void)_elfLinkingContext;
@@ -137,10 +129,6 @@ public:
         _linkerScript(nullptr)
   {}
 
-  static inline bool classof(const InputElement *a) {
-    return a->kind() == InputElement::Kind::File;
-  }
-
   /// \brief Is this node part of resolution ?
   virtual bool isHidden() const { return true; }
 

Modified: lld/trunk/include/lld/Driver/WinLinkInputGraph.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/WinLinkInputGraph.h?rev=197726&r1=197725&r2=197726&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/WinLinkInputGraph.h (original)
+++ lld/trunk/include/lld/Driver/WinLinkInputGraph.h Thu Dec 19 15:51:13 2013
@@ -31,10 +31,6 @@ public:
   PECOFFFileNode(PECOFFLinkingContext &ctx, StringRef path)
       : FileNode(path), _ctx(ctx) {}
 
-  static inline bool classof(const InputElement *a) {
-    return a->kind() == InputElement::Kind::File;
-  }
-
   virtual ErrorOr<StringRef> getPath(const LinkingContext &ctx) const;
 
   /// \brief Parse the input file to lld::File.
@@ -66,10 +62,6 @@ class PECOFFGroup : public Group {
 public:
   PECOFFGroup() : Group(0) {}
 
-  static inline bool classof(const InputElement *a) {
-    return a->kind() == InputElement::Kind::Control;
-  }
-
   virtual bool validate() { return true; }
   virtual bool dump(raw_ostream &) { return true; }
 





More information about the llvm-commits mailing list