https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/127290
>From 3e6122744f355954edb6a5450ae4220ba39bc9c1 Mon Sep 17 00:00:00 2001 From: prabhukr <prabh...@google.com> Date: Fri, 14 Feb 2025 16:53:33 -0800 Subject: [PATCH 01/12] [clang] Fix UEFI Target info For X64 UEFI targets, making the integer size and va_list kind fixes. --- clang/include/clang/Basic/TargetOSMacros.def | 3 +++ clang/lib/Basic/Targets/X86.h | 16 +++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/clang/include/clang/Basic/TargetOSMacros.def b/clang/include/clang/Basic/TargetOSMacros.def index 58dce330f9c8f..f4f3276ad1c25 100644 --- a/clang/include/clang/Basic/TargetOSMacros.def +++ b/clang/include/clang/Basic/TargetOSMacros.def @@ -53,4 +53,7 @@ TARGET_OS(TARGET_OS_NANO, Triple.isWatchOS()) TARGET_OS(TARGET_IPHONE_SIMULATOR, Triple.isSimulatorEnvironment()) TARGET_OS(TARGET_OS_UIKITFORMAC, Triple.isMacCatalystEnvironment()) +// UEFI target. +TARGET_OS(TARGET_OS_UEFI, Triple.isUEFI()) + #undef TARGET_OS diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index 205edcab9ccb3..20fcb25defba2 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -835,16 +835,22 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo public: UEFIX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : UEFITargetInfo<X86_64TargetInfo>(Triple, Opts) { + LongWidth = LongAlign = 32; + DoubleAlign = LongLongAlign = 64; + IntMaxType = SignedLongLong; + Int64Type = SignedLongLong; + SizeType = UnsignedLongLong; + PtrDiffType = SignedLongLong; + IntPtrType = SignedLongLong; + LongDoubleWidth = LongDoubleAlign = 64; + LongDoubleFormat = &llvm::APFloat::IEEEdouble(); + WCharType = UnsignedShort; + WIntType = UnsignedShort; this->TheCXXABI.set(TargetCXXABI::Microsoft); - this->MaxTLSAlign = 8192u * this->getCharWidth(); this->resetDataLayout("e-m:w-p270:32:32-p271:32:32-p272:64:64-" "i64:64-i128:128-f80:128-n8:16:32:64-S128"); } - BuiltinVaListKind getBuiltinVaListKind() const override { - return TargetInfo::CharPtrBuiltinVaList; - } - CallingConvCheckResult checkCallingConvention(CallingConv CC) const override { switch (CC) { case CC_C: >From fa23204cb0eb6826f8866e497ff4d6ed96dbb8df Mon Sep 17 00:00:00 2001 From: prabhukr <prabh...@google.com> Date: Wed, 26 Feb 2025 09:59:47 -0800 Subject: [PATCH 02/12] More cleanups. Add test. --- clang/lib/Basic/Targets/X86.h | 10 ---------- clang/test/Preprocessor/init.c | 1 + 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index 20fcb25defba2..be07ae05f326c 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -851,16 +851,6 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo "i64:64-i128:128-f80:128-n8:16:32:64-S128"); } - CallingConvCheckResult checkCallingConvention(CallingConv CC) const override { - switch (CC) { - case CC_C: - case CC_Win64: - return CCCR_OK; - default: - return CCCR_Warning; - } - } - TargetInfo::CallingConvKind getCallingConvKind(bool ClangABICompat4) const override { return CCK_MicrosoftWin64; diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c index 1ac325d444662..4c8d519c2b664 100644 --- a/clang/test/Preprocessor/init.c +++ b/clang/test/Preprocessor/init.c @@ -2835,6 +2835,7 @@ // RISCV64-LINUX: #define unix 1 // RUN: %clang_cc1 -dM -triple=x86_64-uefi -E /dev/null | FileCheck -match-full-lines -check-prefix UEFI %s +// RUN: %clang_cc1 -dM -triple=x86_64-unknown-uefi -E /dev/null | FileCheck -match-full-lines -check-prefix UEFI %s // UEFI: #define __UEFI__ 1 >From 6305ac501a8b862486de7ea551ff77ff49d91dac Mon Sep 17 00:00:00 2001 From: prabhukr <prabh...@google.com> Date: Wed, 5 Mar 2025 18:14:04 +0000 Subject: [PATCH 03/12] Include all allowed callingconventions in checkCallingConvention --- clang/lib/Basic/Targets/X86.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index be07ae05f326c..58753e0c4d904 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -851,6 +851,30 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo "i64:64-i128:128-f80:128-n8:16:32:64-S128"); } + CallingConvCheckResult checkCallingConvention(CallingConv CC) const override { + switch (CC) { + case CC_X86StdCall: + case CC_X86ThisCall: + case CC_X86FastCall: + return CCCR_Ignore; + case CC_C: + case CC_X86VectorCall: + case CC_IntelOclBicc: + case CC_PreserveMost: + case CC_PreserveAll: + case CC_PreserveNone: + case CC_X86_64SysV: + case CC_Swift: + case CC_SwiftAsync: + case CC_X86RegCall: + case CC_OpenCLKernel: + case CC_Win64: + return CCCR_OK; + default: + return CCCR_Warning; + } + } + TargetInfo::CallingConvKind getCallingConvKind(bool ClangABICompat4) const override { return CCK_MicrosoftWin64; >From 3fda27d8c98a897caf38c2b6f8d1ef6a7e0bc574 Mon Sep 17 00:00:00 2001 From: prabhukr <prabh...@google.com> Date: Mon, 17 Mar 2025 16:38:44 +0000 Subject: [PATCH 04/12] Revert calling convention fix --- clang/lib/Basic/Targets/X86.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index 58753e0c4d904..cc1f11189108b 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -396,20 +396,9 @@ class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public TargetInfo { CallingConvCheckResult checkCallingConvention(CallingConv CC) const override { // Most of the non-ARM calling conventions are i386 conventions. switch (CC) { - case CC_X86ThisCall: - case CC_X86FastCall: - case CC_X86StdCall: - case CC_X86VectorCall: - case CC_X86RegCall: case CC_C: - case CC_PreserveMost: - case CC_Swift: - case CC_X86Pascal: - case CC_IntelOclBicc: - case CC_OpenCLKernel: + case CC_Win64: return CCCR_OK; - case CC_SwiftAsync: - return CCCR_Error; default: return CCCR_Warning; } >From 0e51347e5ccd717df8ff500da0e9b9dcde88298d Mon Sep 17 00:00:00 2001 From: prabhukr <prabh...@google.com> Date: Mon, 17 Mar 2025 16:40:54 +0000 Subject: [PATCH 05/12] Fix uefi calling convention --- clang/lib/Basic/Targets/X86.h | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index cc1f11189108b..20fcb25defba2 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -396,9 +396,20 @@ class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public TargetInfo { CallingConvCheckResult checkCallingConvention(CallingConv CC) const override { // Most of the non-ARM calling conventions are i386 conventions. switch (CC) { + case CC_X86ThisCall: + case CC_X86FastCall: + case CC_X86StdCall: + case CC_X86VectorCall: + case CC_X86RegCall: case CC_C: - case CC_Win64: + case CC_PreserveMost: + case CC_Swift: + case CC_X86Pascal: + case CC_IntelOclBicc: + case CC_OpenCLKernel: return CCCR_OK; + case CC_SwiftAsync: + return CCCR_Error; default: return CCCR_Warning; } @@ -842,21 +853,7 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo CallingConvCheckResult checkCallingConvention(CallingConv CC) const override { switch (CC) { - case CC_X86StdCall: - case CC_X86ThisCall: - case CC_X86FastCall: - return CCCR_Ignore; case CC_C: - case CC_X86VectorCall: - case CC_IntelOclBicc: - case CC_PreserveMost: - case CC_PreserveAll: - case CC_PreserveNone: - case CC_X86_64SysV: - case CC_Swift: - case CC_SwiftAsync: - case CC_X86RegCall: - case CC_OpenCLKernel: case CC_Win64: return CCCR_OK; default: >From 8f9ef6da36ef40cefdea5c5261256a2ae1daa7b3 Mon Sep 17 00:00:00 2001 From: prabhukr <prabh...@google.com> Date: Mon, 17 Mar 2025 20:59:04 +0000 Subject: [PATCH 06/12] Remove floating point related target defaults. Add comments. --- clang/lib/Basic/Targets/X86.h | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index 20fcb25defba2..01ad834ec74a5 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -835,20 +835,30 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo public: UEFIX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : UEFITargetInfo<X86_64TargetInfo>(Triple, Opts) { - LongWidth = LongAlign = 32; - DoubleAlign = LongLongAlign = 64; + this->setABIDefaults(); + this->resetDataLayout("e-m:w-p270:32:32-p271:32:32-p272:64:64-" + "i64:64-i128:128-f80:128-n8:16:32:64-S128"); + } + + // The UEFI spec does not mandate specific C++ ABI, integer widths, or + // alignment. We are setting these defaults to match the Windows target as it + // is the only way to build EFI applications with Clang/LLVM today. We intend + // to offer flexibility by supporting choices that are not default in Windows + // target in the future. + void setABIDefaults() { + // Set C++ ABI. + this->TheCXXABI.set(TargetCXXABI::Microsoft); + // Set Integer types and alignment. IntMaxType = SignedLongLong; Int64Type = SignedLongLong; SizeType = UnsignedLongLong; PtrDiffType = SignedLongLong; IntPtrType = SignedLongLong; - LongDoubleWidth = LongDoubleAlign = 64; - LongDoubleFormat = &llvm::APFloat::IEEEdouble(); WCharType = UnsignedShort; WIntType = UnsignedShort; - this->TheCXXABI.set(TargetCXXABI::Microsoft); - this->resetDataLayout("e-m:w-p270:32:32-p271:32:32-p272:64:64-" - "i64:64-i128:128-f80:128-n8:16:32:64-S128"); + LongWidth = LongAlign = 32; + DoubleAlign = LongLongAlign = 64; + LongDoubleWidth = LongDoubleAlign = 64; } CallingConvCheckResult checkCallingConvention(CallingConv CC) const override { >From e92e603fe2b3d49f244d38b322eedb211af12bd4 Mon Sep 17 00:00:00 2001 From: prabhukr <prabh...@google.com> Date: Thu, 20 Mar 2025 00:03:35 +0000 Subject: [PATCH 07/12] Remove setABIDefaults method. --- clang/lib/Basic/Targets/X86.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index 01ad834ec74a5..542633815338d 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -835,17 +835,12 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo public: UEFIX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : UEFITargetInfo<X86_64TargetInfo>(Triple, Opts) { - this->setABIDefaults(); - this->resetDataLayout("e-m:w-p270:32:32-p271:32:32-p272:64:64-" - "i64:64-i128:128-f80:128-n8:16:32:64-S128"); - } - - // The UEFI spec does not mandate specific C++ ABI, integer widths, or + // The UEFI spec does not mandate specific C++ ABI, integer widths, or // alignment. We are setting these defaults to match the Windows target as it // is the only way to build EFI applications with Clang/LLVM today. We intend // to offer flexibility by supporting choices that are not default in Windows // target in the future. - void setABIDefaults() { + // Set C++ ABI. this->TheCXXABI.set(TargetCXXABI::Microsoft); // Set Integer types and alignment. @@ -858,7 +853,8 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo WIntType = UnsignedShort; LongWidth = LongAlign = 32; DoubleAlign = LongLongAlign = 64; - LongDoubleWidth = LongDoubleAlign = 64; + this->resetDataLayout("e-m:w-p270:32:32-p271:32:32-p272:64:64-" + "i64:64-i128:128-f80:128-n8:16:32:64-S128"); } CallingConvCheckResult checkCallingConvention(CallingConv CC) const override { >From afdf2954adfa112d6f35dcfed64f6ed8f8de08ba Mon Sep 17 00:00:00 2001 From: prabhukr <prabh...@google.com> Date: Thu, 20 Mar 2025 00:06:38 +0000 Subject: [PATCH 08/12] Remove floating point types. Format code --- clang/lib/Basic/Targets/X86.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index 542633815338d..70a909759cc7a 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -836,11 +836,11 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo UEFIX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : UEFITargetInfo<X86_64TargetInfo>(Triple, Opts) { // The UEFI spec does not mandate specific C++ ABI, integer widths, or - // alignment. We are setting these defaults to match the Windows target as it - // is the only way to build EFI applications with Clang/LLVM today. We intend - // to offer flexibility by supporting choices that are not default in Windows - // target in the future. - + // alignment. We are setting these defaults to match the Windows target as + // it is the only way to build EFI applications with Clang/LLVM today. We + // intend to offer flexibility by supporting choices that are not default in + // Windows target in the future. + // Set C++ ABI. this->TheCXXABI.set(TargetCXXABI::Microsoft); // Set Integer types and alignment. @@ -852,7 +852,7 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo WCharType = UnsignedShort; WIntType = UnsignedShort; LongWidth = LongAlign = 32; - DoubleAlign = LongLongAlign = 64; + this->resetDataLayout("e-m:w-p270:32:32-p271:32:32-p272:64:64-" "i64:64-i128:128-f80:128-n8:16:32:64-S128"); } >From 93eba6d56caa598ddcf99c60c0b5dc95543a74dc Mon Sep 17 00:00:00 2001 From: prabhukr <prabh...@google.com> Date: Thu, 20 Mar 2025 00:07:46 +0000 Subject: [PATCH 09/12] Fix builtinvalistkind --- clang/lib/Basic/Targets/X86.h | 4 ++++ clang/lib/CodeGen/Targets/X86.cpp | 32 ++++++++++++++++++++++--------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index 70a909759cc7a..d6d30fe8a3691 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -857,6 +857,10 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo "i64:64-i128:128-f80:128-n8:16:32:64-S128"); } + BuiltinVaListKind getBuiltinVaListKind() const override { + return TargetInfo::CharPtrBuiltinVaList; + } + CallingConvCheckResult checkCallingConvention(CallingConv CC) const override { switch (CC) { case CC_C: diff --git a/clang/lib/CodeGen/Targets/X86.cpp b/clang/lib/CodeGen/Targets/X86.cpp index b36a6e1396653..477058e0b961f 100644 --- a/clang/lib/CodeGen/Targets/X86.cpp +++ b/clang/lib/CodeGen/Targets/X86.cpp @@ -3038,8 +3038,30 @@ static Address EmitX86_64VAArgFromMemory(CodeGenFunction &CGF, return Address(Res, LTy, Align); } +static RValue EmitMSABIVAArg(CodeGenFunction &CGF, Address VAListAddr, + QualType Ty, AggValueSlot Slot, + ASTContext &context) { + // MS x64 ABI requirement: "Any argument that doesn't fit in 8 bytes, or is + // not 1, 2, 4, or 8 bytes, must be passed by reference." + uint64_t Width = context.getTypeSize(Ty); + bool IsIndirect = Width > 64 || !llvm::isPowerOf2_64(Width); + + return emitVoidPtrVAArg(CGF, VAListAddr, Ty, IsIndirect, + CGF.getContext().getTypeInfoInChars(Ty), + CharUnits::fromQuantity(8), + /*allowHigherAlign*/ false, Slot); +} + RValue X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, QualType Ty, AggValueSlot Slot) const { + + // Emit MS ABI compliant va_list for X86_64 targets which use Microsoft CXX + // ABI and CharPtrBuiltinVaList. + if (CGF.getTarget().getCXXABI().isMicrosoft() && + CGF.getTarget().getBuiltinVaListKind() == + clang::TargetInfo::CharPtrBuiltinVaList) + return EmitMSABIVAArg(CGF, VAListAddr, Ty, Slot, getContext()); + // Assume that va_list type is correct; should be pointer to LLVM type: // struct { // i32 gp_offset; @@ -3486,15 +3508,7 @@ void WinX86_64ABIInfo::computeInfo(CGFunctionInfo &FI) const { RValue WinX86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, QualType Ty, AggValueSlot Slot) const { - // MS x64 ABI requirement: "Any argument that doesn't fit in 8 bytes, or is - // not 1, 2, 4, or 8 bytes, must be passed by reference." - uint64_t Width = getContext().getTypeSize(Ty); - bool IsIndirect = Width > 64 || !llvm::isPowerOf2_64(Width); - - return emitVoidPtrVAArg(CGF, VAListAddr, Ty, IsIndirect, - CGF.getContext().getTypeInfoInChars(Ty), - CharUnits::fromQuantity(8), - /*allowHigherAlign*/ false, Slot); + return EmitMSABIVAArg(CGF, VAListAddr, Ty, Slot, getContext()); } std::unique_ptr<TargetCodeGenInfo> CodeGen::createX86_32TargetCodeGenInfo( >From 4da832b2ace0df62c2b014832d2dd684a3d87d32 Mon Sep 17 00:00:00 2001 From: prabhukr <prabh...@google.com> Date: Thu, 20 Mar 2025 01:29:07 +0000 Subject: [PATCH 10/12] Don't need TBAA --- clang/lib/Driver/ToolChains/Clang.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index fe172d923ac07..2bc1cecb53c38 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -5959,7 +5959,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // We turn strict aliasing off by default if we're Windows MSVC since MSVC // doesn't do any TBAA. if (!Args.hasFlag(options::OPT_fstrict_aliasing, StrictAliasingAliasOption, - options::OPT_fno_strict_aliasing, !IsWindowsMSVC)) + options::OPT_fno_strict_aliasing, + !IsWindowsMSVC && !IsUEFI)) CmdArgs.push_back("-relaxed-aliasing"); if (Args.hasFlag(options::OPT_fno_pointer_tbaa, options::OPT_fpointer_tbaa, false)) >From 74b1c106da3e54bdfbae5a88ec7ea5e92e897664 Mon Sep 17 00:00:00 2001 From: Prabhuk <prabhukrl...@gmail.com> Date: Wed, 19 Mar 2025 22:56:19 -0700 Subject: [PATCH 11/12] Update clang/lib/Basic/Targets/X86.h Co-authored-by: Petr Hosek <pho...@google.com> --- clang/lib/Basic/Targets/X86.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index d6d30fe8a3691..eb9f99b6f7416 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -843,7 +843,10 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo // Set C++ ABI. this->TheCXXABI.set(TargetCXXABI::Microsoft); - // Set Integer types and alignment. + LongWidth = LongAlign = 32; + DoubleAlign = LongLongAlign = 64; + LongDoubleWidth = LongDoubleAlign = 64; + LongDoubleFormat = &llvm::APFloat::IEEEdouble(); IntMaxType = SignedLongLong; Int64Type = SignedLongLong; SizeType = UnsignedLongLong; @@ -851,7 +854,6 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo IntPtrType = SignedLongLong; WCharType = UnsignedShort; WIntType = UnsignedShort; - LongWidth = LongAlign = 32; this->resetDataLayout("e-m:w-p270:32:32-p271:32:32-p272:64:64-" "i64:64-i128:128-f80:128-n8:16:32:64-S128"); >From 5c4c294e66ae0fe285bb8451f9ca33f7ddf66aea Mon Sep 17 00:00:00 2001 From: Prabhuk <prabhukrl...@gmail.com> Date: Wed, 19 Mar 2025 22:57:51 -0700 Subject: [PATCH 12/12] Update X86.h --- clang/lib/Basic/Targets/X86.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index eb9f99b6f7416..fd38ae98fdfaf 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -840,8 +840,6 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo // it is the only way to build EFI applications with Clang/LLVM today. We // intend to offer flexibility by supporting choices that are not default in // Windows target in the future. - - // Set C++ ABI. this->TheCXXABI.set(TargetCXXABI::Microsoft); LongWidth = LongAlign = 32; DoubleAlign = LongLongAlign = 64; @@ -854,7 +852,6 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo IntPtrType = SignedLongLong; WCharType = UnsignedShort; WIntType = UnsignedShort; - this->resetDataLayout("e-m:w-p270:32:32-p271:32:32-p272:64:64-" "i64:64-i128:128-f80:128-n8:16:32:64-S128"); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits