[lld] r284696 - Remove Config::Binary.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 19 22:12:29 PDT 2016


Author: ruiu
Date: Thu Oct 20 00:12:29 2016
New Revision: 284696

URL: http://llvm.org/viewvc/llvm-project?rev=284696&view=rev
Log:
Remove Config::Binary.

This member is used only by LinkerDriver, so move it to LinkerDriver.

Modified:
    lld/trunk/ELF/Config.h
    lld/trunk/ELF/Driver.cpp
    lld/trunk/ELF/Driver.h

Modified: lld/trunk/ELF/Config.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Config.h?rev=284696&r1=284695&r2=284696&view=diff
==============================================================================
--- lld/trunk/ELF/Config.h (original)
+++ lld/trunk/ELF/Config.h Thu Oct 20 00:12:29 2016
@@ -91,7 +91,6 @@ struct Configuration {
   std::vector<uint8_t> BuildIdVector;
   bool AllowMultipleDefinition;
   bool AsNeeded = false;
-  bool Binary = false;
   bool Bsymbolic;
   bool BsymbolicFunctions;
   bool Demangle = true;

Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=284696&r1=284695&r2=284696&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Thu Oct 20 00:12:29 2016
@@ -125,7 +125,7 @@ void LinkerDriver::addFile(StringRef Pat
     return;
   MemoryBufferRef MBRef = *Buffer;
 
-  if (Config->Binary) {
+  if (InBinary) {
     Files.push_back(new BinaryFile(MBRef));
     return;
   }
@@ -611,7 +611,7 @@ void LinkerDriver::createFiles(opt::Inpu
       Config->AsNeeded = true;
       break;
     case OPT_format:
-      Config->Binary = getBinaryOption(Arg->getValue());
+      InBinary = getBinaryOption(Arg->getValue());
       break;
     case OPT_no_as_needed:
       Config->AsNeeded = false;

Modified: lld/trunk/ELF/Driver.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.h?rev=284696&r1=284695&r2=284696&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.h (original)
+++ lld/trunk/ELF/Driver.h Thu Oct 20 00:12:29 2016
@@ -47,6 +47,9 @@ private:
   // True if we are in --start-lib and --end-lib.
   bool InLib = false;
 
+  // True if we are in -format=binary and -format=elf.
+  bool InBinary = false;
+
   llvm::BumpPtrAllocator Alloc;
   std::vector<InputFile *> Files;
   std::vector<std::unique_ptr<MemoryBuffer>> OwningMBs;




More information about the llvm-commits mailing list