Make Lazy's ctro protected because it shouldn't be instantiated directly.
authorRui Ueyama <ruiu@google.com>
Sun, 17 Jul 2016 17:44:41 +0000 (17:44 +0000)
committerRui Ueyama <ruiu@google.com>
Sun, 17 Jul 2016 17:44:41 +0000 (17:44 +0000)
llvm-svn: 275715

lld/ELF/Symbols.h

index a43b1a3..fb9eb68 100644 (file)
@@ -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<InputFile> 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.