[llvm-objcopy] Fix use-after-move clang-tidy warning

llvm-svn: 345079
diff --git a/llvm/tools/llvm-objcopy/CopyConfig.cpp b/llvm/tools/llvm-objcopy/CopyConfig.cpp
index 9746110..24c72de 100644
--- a/llvm/tools/llvm-objcopy/CopyConfig.cpp
+++ b/llvm/tools/llvm-objcopy/CopyConfig.cpp
@@ -345,8 +345,6 @@
 
   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 @@
   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;
 }