[lld] r316812 - Remove unnecessary namespace specifiers.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 27 16:29:58 PDT 2017


Author: ruiu
Date: Fri Oct 27 16:29:58 2017
New Revision: 316812

URL: http://llvm.org/viewvc/llvm-project?rev=316812&view=rev
Log:
Remove unnecessary namespace specifiers.

Modified:
    lld/trunk/ELF/Symbols.h

Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=316812&r1=316811&r2=316812&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Fri Oct 27 16:29:58 2017
@@ -168,12 +168,11 @@ class DefinedCommon : public Defined {
 public:
   DefinedCommon(StringRef Name, uint64_t Size, uint32_t Alignment,
                 uint8_t StOther, uint8_t Type)
-      : Defined(SymbolBody::DefinedCommonKind, Name, /*IsLocal=*/false, StOther,
-                Type),
+      : Defined(DefinedCommonKind, Name, /*IsLocal=*/false, StOther, Type),
         Alignment(Alignment), Size(Size) {}
 
   static bool classof(const SymbolBody *S) {
-    return S->kind() == SymbolBody::DefinedCommonKind;
+    return S->kind() == DefinedCommonKind;
   }
 
   // The maximum alignment we have seen for this symbol.
@@ -190,14 +189,14 @@ class DefinedRegular : public Defined {
 public:
   DefinedRegular(StringRefZ Name, bool IsLocal, uint8_t StOther, uint8_t Type,
                  uint64_t Value, uint64_t Size, SectionBase *Section)
-      : Defined(SymbolBody::DefinedRegularKind, Name, IsLocal, StOther, Type),
-        Value(Value), Size(Size), Section(Section) {}
+      : Defined(DefinedRegularKind, Name, IsLocal, StOther, Type), Value(Value),
+        Size(Size), Section(Section) {}
 
   // Return true if the symbol is a PIC function.
   template <class ELFT> bool isMipsPIC() const;
 
   static bool classof(const SymbolBody *S) {
-    return S->kind() == SymbolBody::DefinedRegularKind;
+    return S->kind() == DefinedRegularKind;
   }
 
   uint64_t Value;
@@ -208,7 +207,7 @@ public:
 class Undefined : public SymbolBody {
 public:
   Undefined(StringRefZ Name, bool IsLocal, uint8_t StOther, uint8_t Type)
-      : SymbolBody(SymbolBody::UndefinedKind, Name, IsLocal, StOther, Type) {}
+      : SymbolBody(UndefinedKind, Name, IsLocal, StOther, Type) {}
 
   static bool classof(const SymbolBody *S) {
     return S->kind() == UndefinedKind;
@@ -217,13 +216,11 @@ public:
 
 class SharedSymbol : public Defined {
 public:
-  static bool classof(const SymbolBody *S) {
-    return S->kind() == SymbolBody::SharedKind;
-  }
+  static bool classof(const SymbolBody *S) { return S->kind() == SharedKind; }
 
   SharedSymbol(StringRef Name, uint8_t StOther, uint8_t Type,
                const void *ElfSym, const void *Verdef)
-      : Defined(SymbolBody::SharedKind, Name, /*IsLocal=*/false, StOther, Type),
+      : Defined(SharedKind, Name, /*IsLocal=*/false, StOther, Type),
         Verdef(Verdef), ElfSym(ElfSym) {
     // GNU ifunc is a mechanism to allow user-supplied functions to
     // resolve PLT slot values at load-time. This is contrary to the
@@ -295,7 +292,7 @@ public:
   InputFile *fetch();
 
 protected:
-  Lazy(SymbolBody::Kind K, StringRef Name, uint8_t Type)
+  Lazy(Kind K, StringRef Name, uint8_t Type)
       : SymbolBody(K, Name, /*IsLocal=*/false, llvm::ELF::STV_DEFAULT, Type) {}
 };
 




More information about the llvm-commits mailing list