[llvm-objcopy] Don't copy Config when processing --keep

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346717 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Fangrui Song 2018-11-12 23:46:22 +00:00
parent 2b46d375af
commit 3201558074

View File

@ -386,7 +386,7 @@ static void handleArgs(const CopyConfig &Config, Object &Obj,
}
if (!Config.Keep.empty()) {
RemovePred = [Config, RemovePred](const SectionBase &Sec) {
RemovePred = [&Config, RemovePred](const SectionBase &Sec) {
// Explicitly keep these sections regardless of previous removes.
if (is_contained(Config.Keep, Sec.Name))
return false;