[llvm] [llvm] Create UEFI helper function (PR #132462)
Prabhuk via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 21 12:59:07 PDT 2025
https://github.com/Prabhuk created https://github.com/llvm/llvm-project/pull/132462
Create useful helper function for UEFI 64 bit target that can be used in
tablegen files in future changes.
>From ad4911d25358df8089f4bc46e60cb8f77b69dee8 Mon Sep 17 00:00:00 2001
From: prabhukr <prabhukr at google.com>
Date: Fri, 21 Mar 2025 19:57:25 +0000
Subject: [PATCH] [llvm] Create UEFI helper function
Create useful helper function for UEFI 64 bit target that can be used in
tablegen files in future changes.
---
llvm/lib/Target/X86/X86Subtarget.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h
index 8f2d326a69398..78615fabee5a5 100644
--- a/llvm/lib/Target/X86/X86Subtarget.h
+++ b/llvm/lib/Target/X86/X86Subtarget.h
@@ -331,7 +331,9 @@ class X86Subtarget final : public X86GenSubtargetInfo {
bool isOSWindows() const { return TargetTriple.isOSWindows(); }
- bool isOSWindowsOrUEFI() const { return isOSWindows() || isUEFI(); }
+ bool isOSWindowsOrUEFI() const { return TargetTriple.isOSWindowsOrUEFI(); }
+
+ bool isTargetUEFI64() const { return Is64Bit && isUEFI(); }
bool isTargetWin64() const { return Is64Bit && isOSWindows(); }
More information about the llvm-commits
mailing list