[lld] r241840 - COFF: Make /machine:{i386, amd64} aliases to {x86, x64}.

Rui Ueyama ruiu at google.com
Thu Jul 9 12:43:54 PDT 2015


Author: ruiu
Date: Thu Jul  9 14:43:49 2015
New Revision: 241840

URL: http://llvm.org/viewvc/llvm-project?rev=241840&view=rev
Log:
COFF: Make /machine:{i386,amd64} aliases to {x86,x64}.

MSVC linker accepts these aliases.

Modified:
    lld/trunk/COFF/DriverUtils.cpp

Modified: lld/trunk/COFF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/DriverUtils.cpp?rev=241840&r1=241839&r2=241840&view=diff
==============================================================================
--- lld/trunk/COFF/DriverUtils.cpp (original)
+++ lld/trunk/COFF/DriverUtils.cpp Thu Jul  9 14:43:49 2015
@@ -81,9 +81,11 @@ private:
 // Returns /machine's value.
 ErrorOr<MachineTypes> getMachineType(StringRef S) {
   MachineTypes MT = StringSwitch<MachineTypes>(S.lower())
-                        .Case("arm", IMAGE_FILE_MACHINE_ARMNT)
                         .Case("x64", IMAGE_FILE_MACHINE_AMD64)
+                        .Case("amd64", IMAGE_FILE_MACHINE_AMD64)
                         .Case("x86", IMAGE_FILE_MACHINE_I386)
+                        .Case("i386", IMAGE_FILE_MACHINE_I386)
+                        .Case("arm", IMAGE_FILE_MACHINE_ARMNT)
                         .Default(IMAGE_FILE_MACHINE_UNKNOWN);
   if (MT != IMAGE_FILE_MACHINE_UNKNOWN)
     return MT;





More information about the llvm-commits mailing list