From b06700fa7863ac667c052332aec2eaed2872a67e Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Sun, 17 Jul 2016 17:44:41 +0000 Subject: [PATCH] Make Lazy's ctro protected because it shouldn't be instantiated directly. llvm-svn: 275715 --- lld/ELF/Symbols.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h index a43b1a3..fb9eb68 100644 --- a/lld/ELF/Symbols.h +++ b/lld/ELF/Symbols.h @@ -320,14 +320,15 @@ public: // the same name, it will ask the Lazy to load a file. class Lazy : public SymbolBody { public: - Lazy(SymbolBody::Kind K, StringRef Name, uint8_t Type) - : SymbolBody(K, Name, llvm::ELF::STV_DEFAULT, Type) {} - static bool classof(const SymbolBody *S) { return S->isLazy(); } // Returns an object file for this symbol, or a nullptr if the file // was already returned. std::unique_ptr fetch(); + +protected: + Lazy(SymbolBody::Kind K, StringRef Name, uint8_t Type) + : SymbolBody(K, Name, llvm::ELF::STV_DEFAULT, Type) {} }; // LazyArchive symbols represents symbols in archive files. -- 2.7.4