[lld] r263366 - Cosmetic change to reduce repetitions. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 12 20:40:17 PST 2016
Author: ruiu
Date: Sat Mar 12 22:40:17 2016
New Revision: 263366
URL: http://llvm.org/viewvc/llvm-project?rev=263366&view=rev
Log:
Cosmetic change to reduce repetitions. NFC.
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=263366&r1=263365&r2=263366&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Sat Mar 12 22:40:17 2016
@@ -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
More information about the llvm-commits
mailing list