[PATCH] D11007: LLD: COFF: Move inferMachineType from Writer to Driver

Peter Collingbourne peter at pcc.me.uk
Tue Jul 7 11:36:32 PDT 2015


pcc accepted this revision.

This revision is now accepted and ready to land.

LGTM with nits.


================
Comment at: COFF/Driver.cpp:239
@@ +238,3 @@
+  for (ObjectFile *F : Symtab.ObjectFiles) {
+    // Try to infer machine type from the magic byte of the object file.
+    auto MT = static_cast<MachineTypes>(F->getCOFFObj()->getMachine());
----------------
Preserve the TODO about diagnosing conflicts?

================
Comment at: COFF/Driver.cpp:636
@@ -627,1 +635,3 @@
 
+  // Windows specific -- if no /machine is givne, infer that.
+  if (Config->MachineType == IMAGE_FILE_MACHINE_UNKNOWN) {
----------------
Typo: given


http://reviews.llvm.org/D11007







More information about the llvm-commits mailing list