From e9f34b0d521f96669217656fa8162336a7d3f00a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 12 Nov 2018 23:46:22 +0000 Subject: [PATCH] [llvm-objcopy] Don't copy Config when processing --keep llvm-svn: 346717 --- llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp b/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp index a367a30c467f..05985d3d2f1a 100644 --- a/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp +++ b/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp @@ -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;