[PECOFF] Accept /machine:x64 option.
This is the first patch to support PE32+ format, which is the image format
to use 64 bit address space on Windows/x86-64.
llvm-svn: 200029
diff --git a/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp b/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
index d1db7cd..9c929db 100644
--- a/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
+++ b/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
@@ -73,9 +73,10 @@
     return false;
   }
 
-  // Architectures other than i386 is not supported yet.
-  if (_machineType != llvm::COFF::IMAGE_FILE_MACHINE_I386) {
-    diagnostics << "Machine type other than x86 is not supported.\n";
+  // Architectures other than x86/x64 is not supported yet.
+  if (_machineType != llvm::COFF::IMAGE_FILE_MACHINE_I386 &&
+      _machineType != llvm::COFF::IMAGE_FILE_MACHINE_AMD64) {
+    diagnostics << "Machine type other than x86/x64 is not supported.\n";
     return false;
   }