From c2e4d07208a9a1bf5ea16af0b68756e1dbe48fbb Mon Sep 17 00:00:00 2001 From: Jordan Rupprecht Date: Tue, 23 Oct 2018 20:54:51 +0000 Subject: [PATCH] [llvm-objcopy] Fix use-after-move clang-tidy warning git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345079 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-objcopy/CopyConfig.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/llvm-objcopy/CopyConfig.cpp b/tools/llvm-objcopy/CopyConfig.cpp index 9746110cd45..24c72de8882 100644 --- a/tools/llvm-objcopy/CopyConfig.cpp +++ b/tools/llvm-objcopy/CopyConfig.cpp @@ -345,8 +345,6 @@ DriverConfig parseObjcopyOptions(ArrayRef ArgsArr) { Config.PreserveDates = InputArgs.hasArg(OBJCOPY_preserve_dates); - DriverConfig DC; - DC.CopyConfigs.push_back(std::move(Config)); if (Config.DecompressDebugSections && Config.CompressionType != DebugCompressionType::None) { error("Cannot specify --compress-debug-sections at the same time as " @@ -356,6 +354,8 @@ DriverConfig parseObjcopyOptions(ArrayRef ArgsArr) { if (Config.DecompressDebugSections && !zlib::isAvailable()) error("LLVM was not compiled with LLVM_ENABLE_ZLIB: cannot decompress."); + DriverConfig DC; + DC.CopyConfigs.push_back(std::move(Config)); return DC; } -- 2.11.0