[lld] r275715 - Make Lazy's ctro protected because it shouldn't be instantiated directly.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 17 10:44:41 PDT 2016


Author: ruiu
Date: Sun Jul 17 12:44:41 2016
New Revision: 275715

URL: http://llvm.org/viewvc/llvm-project?rev=275715&view=rev
Log:
Make Lazy's ctro protected because it shouldn't be instantiated directly.

Modified:
    lld/trunk/ELF/Symbols.h

Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=275715&r1=275714&r2=275715&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Sun Jul 17 12:44:41 2016
@@ -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.




More information about the llvm-commits mailing list