[PATCH] D131594: [Triple] Add triple for UEFI

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 5 23:50:55 PDT 2023


phosek accepted this revision.
phosek added a comment.
This revision is now accepted and ready to land.

Can you also provide description for this change (this should be the same you'll use for the Git message).



================
Comment at: llvm/include/llvm/MC/TargetRegistry.h:568
+      assert((T.isOSWindows() || T.isUEFI()) &&
+             "only Windows and UEFI COFF are supported");
       S = COFFStreamerCtorFn(Ctx, std::move(TAB), std::move(OW),
----------------
Nit: phrasing.


================
Comment at: llvm/lib/MC/MCContext.cpp:90
       report_fatal_error(
           "Cannot initialize MC for non-Windows COFF object files.");
 
----------------
Nit: update the error message.


================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp:1521
+    assert(TheTriple.isOSBinFormatCOFF() &&
+         "Only COFF format is supported in UEFI environment.");
+    return new WindowsX86AsmBackend(T, true, STI);
----------------
Nit: consistent case in assert messages.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131594/new/

https://reviews.llvm.org/D131594



More information about the cfe-commits mailing list