Revert [llvm-objcopy][NFC] Refactor output target parsing

This reverts r364254 (git commit 545f001d1b9a7b58a68d75e70bfc36c841de8999)

This change causes some llvm-obcopy tests to fail with valgrind.

Following is the output for basic-keep.test
Command Output (stderr):
--

==107406== Conditional jump or move depends on uninitialised value(s)
==107406==    at 0x1A30DD: executeObjcopy(llvm::objcopy::CopyConfig const&) (llvm-objcopy.cpp:235)
==107406==    by 0x1A3935: main (llvm-objcopy.cpp:294)

llvm-svn: 364379
diff --git a/llvm/tools/llvm-objcopy/CopyConfig.h b/llvm/tools/llvm-objcopy/CopyConfig.h
index aff3631..9ae4270 100644
--- a/llvm/tools/llvm-objcopy/CopyConfig.h
+++ b/llvm/tools/llvm-objcopy/CopyConfig.h
@@ -26,13 +26,6 @@
 namespace llvm {
 namespace objcopy {
 
-enum class FileFormat {
-  Unspecified,
-  ELF,
-  Binary,
-  IHex,
-};
-
 // This type keeps track of the machine info for various architectures. This
 // lets us map architecture names to ELF types and the e_machine value of the
 // ELF file.
@@ -111,9 +104,9 @@
 struct CopyConfig {
   // Main input/output options
   StringRef InputFilename;
-  FileFormat InputFormat;
+  StringRef InputFormat;
   StringRef OutputFilename;
-  FileFormat OutputFormat;
+  StringRef OutputFormat;
 
   // Only applicable for --input-format=binary
   MachineInfo BinaryArch;