[clang] [clang] fix uefi target for aarch64 & x86_64 (PR #120632)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 9 16:29:05 PST 2025


================
@@ -713,8 +713,8 @@ class LLVM_LIBRARY_VISIBILITY X86_64TargetInfo : public X86TargetInfo {
   X86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
       : X86TargetInfo(Triple, Opts) {
     const bool IsX32 = getTriple().isX32();
-    bool IsWinCOFF =
-        getTriple().isOSWindows() && getTriple().isOSBinFormatCOFF();
+    bool IsWinCOFF = (getTriple().isOSWindows() || getTriple().isUEFI()) &&
----------------
Prabhuk wrote:

Nit: This could simply be

getTriple().isUEFI() || (getTriple().isOSWindows() && getTriple().isOSBinFormatCOFF()) as isOSBinFormatCOFF will always be true for UEFI.

https://github.com/llvm/llvm-project/pull/120632


More information about the cfe-commits mailing list