Cosmetic change to reduce repetitions. NFC.
authorRui Ueyama <ruiu@google.com>
Sun, 13 Mar 2016 04:40:17 +0000 (04:40 +0000)
committerRui Ueyama <ruiu@google.com>
Sun, 13 Mar 2016 04:40:17 +0000 (04:40 +0000)
llvm-svn: 263366

lld/ELF/Symbols.h

index e72c717..d7b4544 100644 (file)
@@ -46,6 +46,8 @@ struct Symbol {
 
 // The base class for real symbol classes.
 class SymbolBody {
+  template <class ELFT> using ELFFile = llvm::object::ELFFile<ELFT>;
+
 public:
   enum Kind {
     DefinedFirst,
@@ -90,17 +92,13 @@ public:
   bool isInGot() const { return GotIndex != -1U; }
   bool isInPlt() const { return PltIndex != -1U; }
 
-  template <class ELFT>
-  typename llvm::object::ELFFile<ELFT>::uintX_t
-  getVA(typename llvm::object::ELFFile<ELFT>::uintX_t Addend = 0) const;
-  template <class ELFT>
-  typename llvm::object::ELFFile<ELFT>::uintX_t getGotVA() const;
-  template <class ELFT>
-  typename llvm::object::ELFFile<ELFT>::uintX_t getGotPltVA() const;
-  template <class ELFT>
-  typename llvm::object::ELFFile<ELFT>::uintX_t getPltVA() const;
-  template <class ELFT>
-  typename llvm::object::ELFFile<ELFT>::uintX_t getSize() const;
+  template <class ELFT> typename ELFFile<ELFT>::uintX_t
+  getVA(typename ELFFile<ELFT>::uintX_t Addend = 0) const;
+
+  template <class ELFT> typename ELFFile<ELFT>::uintX_t getGotVA() const;
+  template <class ELFT> typename ELFFile<ELFT>::uintX_t getGotPltVA() const;
+  template <class ELFT> typename ELFFile<ELFT>::uintX_t getPltVA() const;
+  template <class ELFT> typename ELFFile<ELFT>::uintX_t getSize() const;
 
   // A SymbolBody has a backreference to a Symbol. Originally they are
   // doubly-linked. A backreference will never change. But the pointer