[lld] r253633 - Make a function out-of-line.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 19 18:10:53 PST 2015
Author: ruiu
Date: Thu Nov 19 20:10:52 2015
New Revision: 253633
URL: http://llvm.org/viewvc/llvm-project?rev=253633&view=rev
Log:
Make a function out-of-line.
There's no need to write it in a .h file.
Modified:
lld/trunk/ELF/InputFiles.cpp
lld/trunk/ELF/InputFiles.h
Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=253633&r1=253632&r2=253633&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Thu Nov 19 20:10:52 2015
@@ -36,6 +36,14 @@ ELFFileBase<ELFT>::ELFFileBase(Kind K, M
: InputFile(K, M), ELFObj(MB.getBuffer(), ECRAII().getEC()) {}
template <class ELFT>
+ELFKind ELFFileBase<ELFT>::getELFKind() {
+ using llvm::support::little;
+ if (ELFT::Is64Bits)
+ return ELFT::TargetEndianness == little ? ELF64LEKind : ELF64BEKind;
+ return ELFT::TargetEndianness == little ? ELF32LEKind : ELF32BEKind;
+}
+
+template <class ELFT>
typename ELFFileBase<ELFT>::Elf_Sym_Range
ELFFileBase<ELFT>::getSymbolsHelper(bool Local) {
if (!Symtab)
Modified: lld/trunk/ELF/InputFiles.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.h?rev=253633&r1=253632&r2=253633&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.h (original)
+++ lld/trunk/ELF/InputFiles.h Thu Nov 19 20:10:52 2015
@@ -59,17 +59,7 @@ public:
return K == ObjectKind || K == SharedKind;
}
- static ELFKind getELFKind() {
- if (!ELFT::Is64Bits) {
- if (ELFT::TargetEndianness == llvm::support::little)
- return ELF32LEKind;
- return ELF32BEKind;
- }
- if (ELFT::TargetEndianness == llvm::support::little)
- return ELF64LEKind;
- return ELF64BEKind;
- }
-
+ static ELFKind getELFKind();
const llvm::object::ELFFile<ELFT> &getObj() const { return ELFObj; }
llvm::object::ELFFile<ELFT> &getObj() { return ELFObj; }
More information about the llvm-commits
mailing list