From: Rui Ueyama Date: Mon, 27 Jul 2015 20:39:04 +0000 (+0000) Subject: ELF2: Inline very small functions. X-Git-Tag: studio-1.4~1498 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fdbbcdad871a5a6e998e88051573dc58df80feea;p=platform%2Fupstream%2Fllvm.git ELF2: Inline very small functions. llvm-svn: 243323 --- diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp index c711785..9b3bc30 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -15,10 +15,6 @@ using namespace llvm::object; using namespace lld; using namespace lld::elf2; -template -DefinedRegular::DefinedRegular(StringRef Name) - : Defined(DefinedRegularKind), Name(Name) {} - // Returns 1, 0 or -1 if this symbol should take precedence // over the Other, tie or lose, respectively. int SymbolBody::compare(SymbolBody *Other) { @@ -47,8 +43,6 @@ int SymbolBody::compare(SymbolBody *Other) { } } -template StringRef DefinedRegular::getName() { return Name; } - namespace lld { namespace elf2 { template class DefinedRegular; diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h index de6f806..7ae51cd 100644 --- a/lld/ELF/Symbols.h +++ b/lld/ELF/Symbols.h @@ -86,13 +86,13 @@ public: // Regular defined symbols read from object file symbol tables. template class DefinedRegular : public Defined { public: - DefinedRegular(StringRef Name); + DefinedRegular(StringRef Name) : Defined(DefinedRegularKind), Name(Name) {} static bool classof(const SymbolBody *S) { return S->kind() == DefinedRegularKind; } - StringRef getName() override; + StringRef getName() override { return Name; } private: StringRef Name;