[llvm-objcopy] Delete unused parameter from replaceDebugSections. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356245 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Fangrui Song 2019-03-15 10:27:28 +00:00
parent 85356e1a66
commit c2226fc117

View File

@ -229,7 +229,7 @@ static bool isCompressable(const SectionBase &Section) {
} }
static void replaceDebugSections( static void replaceDebugSections(
const CopyConfig &Config, Object &Obj, SectionPred &RemovePred, Object &Obj, SectionPred &RemovePred,
function_ref<bool(const SectionBase &)> shouldReplace, function_ref<bool(const SectionBase &)> shouldReplace,
function_ref<SectionBase *(const SectionBase *)> addSection) { function_ref<SectionBase *(const SectionBase *)> addSection) {
// Build a list of the debug sections we are going to replace. // Build a list of the debug sections we are going to replace.
@ -483,14 +483,14 @@ static Error handleArgs(const CopyConfig &Config, Object &Obj,
} }
if (Config.CompressionType != DebugCompressionType::None) if (Config.CompressionType != DebugCompressionType::None)
replaceDebugSections(Config, Obj, RemovePred, isCompressable, replaceDebugSections(Obj, RemovePred, isCompressable,
[&Config, &Obj](const SectionBase *S) { [&Config, &Obj](const SectionBase *S) {
return &Obj.addSection<CompressedSection>( return &Obj.addSection<CompressedSection>(
*S, Config.CompressionType); *S, Config.CompressionType);
}); });
else if (Config.DecompressDebugSections) else if (Config.DecompressDebugSections)
replaceDebugSections( replaceDebugSections(
Config, Obj, RemovePred, Obj, RemovePred,
[](const SectionBase &S) { return isa<CompressedSection>(&S); }, [](const SectionBase &S) { return isa<CompressedSection>(&S); },
[&Obj](const SectionBase *S) { [&Obj](const SectionBase *S) {
auto CS = cast<CompressedSection>(S); auto CS = cast<CompressedSection>(S);