[lld] r299516 - Do not make ScriptParser class public.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 22:08:01 PDT 2017


Author: ruiu
Date: Wed Apr  5 00:08:01 2017
New Revision: 299516

URL: http://llvm.org/viewvc/llvm-project?rev=299516&view=rev
Log:
Do not make ScriptParser class public.

This class is used only within this file, so it can be file-local.

Modified:
    lld/trunk/ELF/LinkerScript.h
    lld/trunk/ELF/ScriptParser.cpp

Modified: lld/trunk/ELF/LinkerScript.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.h?rev=299516&r1=299515&r2=299516&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.h (original)
+++ lld/trunk/ELF/LinkerScript.h Wed Apr  5 00:08:01 2017
@@ -29,7 +29,6 @@ namespace lld {
 namespace elf {
 
 class DefinedCommon;
-class ScriptParser;
 class SymbolBody;
 class InputSectionBase;
 class InputSection;

Modified: lld/trunk/ELF/ScriptParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/ScriptParser.cpp?rev=299516&r1=299515&r2=299516&view=diff
==============================================================================
--- lld/trunk/ELF/ScriptParser.cpp (original)
+++ lld/trunk/ELF/ScriptParser.cpp Wed Apr  5 00:08:01 2017
@@ -36,7 +36,8 @@ using namespace lld::elf;
 
 static bool isUnderSysroot(StringRef Path);
 
-class elf::ScriptParser final : ScriptLexer {
+namespace {
+class ScriptParser final : ScriptLexer {
 public:
   ScriptParser(MemoryBufferRef MB)
       : ScriptLexer(MB),
@@ -101,6 +102,7 @@ private:
 
   bool IsUnderSysroot;
 };
+} // namespace
 
 static bool isUnderSysroot(StringRef Path) {
   if (Config->Sysroot == "")




More information about the llvm-commits mailing list