Remove Config::Binary.

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

llvm-svn: 284696
This commit is contained in:
Rui Ueyama 2016-10-20 05:12:29 +00:00
parent d6877631d6
commit c3d15128de
3 changed files with 5 additions and 3 deletions

View File

@ -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;

View File

@ -125,7 +125,7 @@ void LinkerDriver::addFile(StringRef Path) {
return;
MemoryBufferRef MBRef = *Buffer;
if (Config->Binary) {
if (InBinary) {
Files.push_back(new BinaryFile(MBRef));
return;
}
@ -611,7 +611,7 @@ void LinkerDriver::createFiles(opt::InputArgList &Args) {
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;

View File

@ -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;