diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/Basic/TargetInfo.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/Basic/TargetInfo.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/llvm-project/clang/lib/Basic/TargetInfo.cpp b/contrib/llvm-project/clang/lib/Basic/TargetInfo.cpp index 96b3ad9ba2f2..29f5cd14e46e 100644 --- a/contrib/llvm-project/clang/lib/Basic/TargetInfo.cpp +++ b/contrib/llvm-project/clang/lib/Basic/TargetInfo.cpp @@ -157,6 +157,7 @@ TargetInfo::TargetInfo(const llvm::Triple &T) : Triple(T) { HasAArch64SVETypes = false; HasRISCVVTypes = false; AllowAMDGPUUnsafeFPAtomics = false; + HasUnalignedAccess = false; ARMCDECoprocMask = 0; // Default to no types using fpret. @@ -405,6 +406,16 @@ void TargetInfo::adjust(DiagnosticsEngine &Diags, LangOptions &Opts) { LongDoubleAlign = 64; } + // HLSL explicitly defines the sizes and formats of some data types, and we + // need to conform to those regardless of what architecture you are targeting. + if (Opts.HLSL) { + LongWidth = LongAlign = 64; + if (!Opts.NativeHalfType) { + HalfFormat = &llvm::APFloat::IEEEsingle(); + HalfWidth = HalfAlign = 32; + } + } + if (Opts.OpenCL) { // OpenCL C requires specific widths for types, irrespective of // what these normally are for the target. @@ -925,6 +936,10 @@ bool TargetInfo::validateInputConstraint( return true; } +bool TargetInfo::validatePointerAuthKey(const llvm::APSInt &value) const { + return false; +} + void TargetInfo::CheckFixedPointBits() const { // Check that the number of fractional and integral bits (and maybe sign) can // fit into the bits given for a fixed point type. |