[lld] r270534 - Inline SymbolBody::init. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon May 23 21:51:51 PDT 2016
Author: ruiu
Date: Mon May 23 23:51:49 2016
New Revision: 270534
URL: http://llvm.org/viewvc/llvm-project?rev=270534&view=rev
Log:
Inline SymbolBody::init. NFC.
I think this function was too short to be an independent function.
Modified:
lld/trunk/ELF/Symbols.cpp
lld/trunk/ELF/Symbols.h
Modified: lld/trunk/ELF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=270534&r1=270533&r2=270534&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.cpp (original)
+++ lld/trunk/ELF/Symbols.cpp Mon May 23 23:51:49 2016
@@ -92,20 +92,12 @@ static typename ELFT::uint getSymVA(cons
SymbolBody::SymbolBody(Kind K, uint32_t NameOffset, uint8_t StOther,
uint8_t Type)
- : SymbolKind(K), IsLocal(true), Type(Type), StOther(StOther),
- NameOffset(NameOffset) {
- init();
-}
+ : SymbolKind(K), NeedsCopyOrPltAddr(false), IsLocal(true), Type(Type),
+ StOther(StOther), NameOffset(NameOffset) {}
SymbolBody::SymbolBody(Kind K, StringRef Name, uint8_t StOther, uint8_t Type)
- : SymbolKind(K), IsLocal(false), Type(Type), StOther(StOther),
- Name({Name.data(), Name.size()}) {
- init();
-}
-
-void SymbolBody::init() {
- NeedsCopyOrPltAddr = false;
-}
+ : SymbolKind(K), NeedsCopyOrPltAddr(false), IsLocal(false), Type(Type),
+ StOther(StOther), Name({Name.data(), Name.size()}) {}
// Returns true if a symbol can be replaced at load-time by a symbol
// with the same name defined in other ELF executable or DSO.
Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=270534&r1=270533&r2=270534&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Mon May 23 23:51:49 2016
@@ -43,8 +43,6 @@ struct Symbol;
// The base class for real symbol classes.
class SymbolBody {
- void init();
-
public:
enum Kind {
DefinedFirst,
More information about the llvm-commits
mailing list