Skip to content

Commit 6abb6b1

Browse files
author
Erich Keane
committed
Merge from 'main' to 'sycl-web' (#6)
CONFLICT (content): Merge conflict in clang/lib/CodeGen/CodeGenFunction.cpp
2 parents 8f3cc7b + 42ae7eb commit 6abb6b1

File tree

407 files changed

+34110
-2808
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

407 files changed

+34110
-2808
lines changed

clang/docs/ClangCommandLineReference.rst

+5
Original file line numberDiff line numberDiff line change
@@ -2039,6 +2039,11 @@ Emit OpenMP code only for SIMD-based constructs.
20392039

20402040
.. option:: -fopenmp-version=<arg>
20412041

2042+
.. option:: -fopenmp-extensions, -fno-openmp-extensions
2043+
2044+
Enable or disable all Clang extensions for OpenMP directives and clauses. By
2045+
default, they are enabled.
2046+
20422047
.. program:: clang1
20432048
.. option:: -fopenmp=<arg>
20442049
.. program:: clang

clang/docs/LanguageExtensions.rst

+2-23
Original file line numberDiff line numberDiff line change
@@ -3624,7 +3624,7 @@ specification, a stack is supported so that the ``pragma float_control``
36243624
settings can be pushed or popped.
36253625
36263626
When ``pragma float_control(precise, on)`` is enabled, the section of code
3627-
governed by the pragma uses precise floating-point semantics, effectively
3627+
governed by the pragma uses precise floating point semantics, effectively
36283628
``-ffast-math`` is disabled and ``-ffp-contract=on``
36293629
(fused multiply add) is enabled.
36303630
@@ -3635,29 +3635,8 @@ when ``pragma float_control(precise, off)`` is enabled, the section of code
36353635
governed by the pragma behaves as though the command-line option
36363636
``-ffp-exception-behavior=ignore`` is enabled.
36373637
3638-
When ``pragma float_control(source, on)`` is enabled, the section of code governed
3639-
by the pragma behaves as though the command-line option
3640-
``-ffp-eval-method=source`` is enabled. Note: The default
3641-
floating-point evaluation method is target-specific, typically ``source``.
3642-
3643-
When ``pragma float_control(double, on)`` is enabled, the section of code governed
3644-
by the pragma behaves as though the command-line option
3645-
``-ffp-eval-method=double`` is enabled.
3646-
3647-
When ``pragma float_control(extended, on)`` is enabled, the section of code governed
3648-
by the pragma behaves as though the command-line option
3649-
``-ffp-eval-method=extended`` is enabled.
3650-
3651-
When ``pragma float_control(source, off)`` or
3652-
``pragma float_control(double, off)`` or
3653-
``pragma float_control(extended, off)`` is enabled,
3654-
the section of code governed
3655-
by the pragma behaves as though the command-line option
3656-
``-ffp-eval-method=source`` is enabled, returning floating-point evaluation
3657-
method to the default setting.
3658-
36593638
The full syntax this pragma supports is
3660-
``float_control(except|precise|source|double|extended, on|off [, push])`` and
3639+
``float_control(except|precise, on|off [, push])`` and
36613640
``float_control(push|pop)``.
36623641
The ``push`` and ``pop`` forms, including using ``push`` as the optional
36633642
third argument, can only occur at file scope.

clang/docs/OpenMPSupport.rst

+17
Original file line numberDiff line numberDiff line change
@@ -360,3 +360,20 @@ want to help with the implementation.
360360
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
361361
| task extension | nowait clause on taskwait | :none:`unclaimed` | |
362362
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
363+
364+
OpenMP Extensions
365+
=================
366+
367+
The following table provides a quick overview over various OpenMP
368+
extensions and their implementation status. These extensions are not
369+
currently defined by any standard, so links to associated LLVM
370+
documentation are provided. As these extensions mature, they will be
371+
considered for standardization. Please contact *openmp-dev* at
372+
*lists.llvm.org* to provide feedback.
373+
374+
+------------------------------+---------------------------------------------------------------------------+--------------------------+--------------------------------------------------------+
375+
|Category | Feature | Status | Reviews |
376+
+==============================+===========================================================================+==========================+========================================================+
377+
| device extension | `'ompx_hold' map type modifier | :good:`prototyped` | D106509, D106510 |
378+
| | <https://openmp.llvm.org/docs/openacc/OpenMPExtensions.html#ompx-hold>`_ | | |
379+
+------------------------------+---------------------------------------------------------------------------+--------------------------+--------------------------------------------------------+

clang/docs/UsersManual.rst

-11
Original file line numberDiff line numberDiff line change
@@ -1478,17 +1478,6 @@ Note that floating-point operations performed as part of constant initialization
14781478
* ``maytrap`` The compiler avoids transformations that may raise exceptions that would not have been raised by the original code. Constant folding performed by the compiler is exempt from this option.
14791479
* ``strict`` The compiler ensures that all transformations strictly preserve the floating point exception semantics of the original code.
14801480

1481-
.. option:: -ffp-eval-method=<value>
1482-
1483-
Specify the floating-point evaluation method.
1484-
1485-
Valid values are: ``source``, ``double``, and ``extended``.
1486-
The default value is target-specific, typically ``source``. Details:
1487-
1488-
* ``source`` The compiler uses the floating-point type declared in the source program as the evaluation method.
1489-
* ``double`` The compiler uses ``double`` as the floating-point evaluation method for all float expressions of type that is narrower than ``double``.
1490-
* ``extended`` The compiler uses ``long double`` as the floating-point evaluation method for all float expressions of type that is narrower than ``long double``.
1491-
14921481
.. option:: -f[no-]protect-parens:
14931482

14941483
This option pertains to floating-point types, complex types with

clang/include/clang/AST/OpenMPClause.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -5606,7 +5606,8 @@ class OMPMapClause final : public OMPMappableExprListClause<OMPMapClause>,
56065606
/// Map-type-modifiers for the 'map' clause.
56075607
OpenMPMapModifierKind MapTypeModifiers[NumberOfOMPMapClauseModifiers] = {
56085608
OMPC_MAP_MODIFIER_unknown, OMPC_MAP_MODIFIER_unknown,
5609-
OMPC_MAP_MODIFIER_unknown, OMPC_MAP_MODIFIER_unknown};
5609+
OMPC_MAP_MODIFIER_unknown, OMPC_MAP_MODIFIER_unknown,
5610+
OMPC_MAP_MODIFIER_unknown};
56105611

56115612
/// Location of map-type-modifiers for the 'map' clause.
56125613
SourceLocation MapTypeModifiersLoc[NumberOfOMPMapClauseModifiers];

clang/include/clang/Basic/DiagnosticParseKinds.td

+2-2
Original file line numberDiff line numberDiff line change
@@ -1303,8 +1303,8 @@ def err_omp_decl_in_declare_simd_variant : Error<
13031303
def err_omp_unknown_map_type : Error<
13041304
"incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'">;
13051305
def err_omp_unknown_map_type_modifier : Error<
1306-
"incorrect map type modifier, expected 'always', 'close', "
1307-
"%select{or 'mapper'|'mapper', or 'present'}0">;
1306+
"incorrect map type modifier, expected one of: 'always', 'close', 'mapper'"
1307+
"%select{|, 'present'}0%select{|, 'ompx_hold'}1">;
13081308
def err_omp_map_type_missing : Error<
13091309
"missing map type">;
13101310
def err_omp_map_type_modifier_missing : Error<

clang/include/clang/Basic/DiagnosticSemaKinds.td

+2
Original file line numberDiff line numberDiff line change
@@ -10586,6 +10586,8 @@ def err_omp_map_shared_storage : Error<
1058610586
"variable already marked as mapped in current construct">;
1058710587
def err_omp_invalid_map_type_for_directive : Error<
1058810588
"%select{map type '%1' is not allowed|map type must be specified}0 for '#pragma omp %2'">;
10589+
def err_omp_invalid_map_type_modifier_for_directive : Error<
10590+
"map type modifier '%0' is not allowed for '#pragma omp %1'">;
1058910591
def err_omp_no_clause_for_directive : Error<
1059010592
"expected at least one %0 clause for '#pragma omp %1'">;
1059110593
def err_omp_threadprivate_in_clause : Error<

clang/include/clang/Basic/FPOptions.def

-1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ OPTION(NoHonorInfs, bool, 1, NoHonorNaNs)
2323
OPTION(NoSignedZero, bool, 1, NoHonorInfs)
2424
OPTION(AllowReciprocal, bool, 1, NoSignedZero)
2525
OPTION(AllowApproxFunc, bool, 1, AllowReciprocal)
26-
OPTION(FPEvalMethod, LangOptions::FPEvalMethodKind, 2, AllowApproxFunc)
2726
#undef OPTION

clang/include/clang/Basic/LangOptions.def

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ LANGOPT(HalfArgsAndReturns, 1, 0, "half args and returns")
231231
LANGOPT(CUDA , 1, 0, "CUDA")
232232
LANGOPT(HIP , 1, 0, "HIP")
233233
LANGOPT(OpenMP , 32, 0, "OpenMP support and version of OpenMP (31, 40 or 45)")
234+
LANGOPT(OpenMPExtensions , 1, 1, "Enable all Clang extensions for OpenMP directives and clauses")
234235
LANGOPT(OpenMPSimd , 1, 0, "Use SIMD only OpenMP support.")
235236
LANGOPT(OpenMPUseTLS , 1, 0, "Use TLS for threadprivates or runtime calls")
236237
LANGOPT(OpenMPIsDevice , 1, 0, "Generate code only for OpenMP target device")
@@ -309,7 +310,6 @@ BENIGN_ENUM_LANGOPT(DefaultFPContractMode, FPModeKind, 2, FPM_Off, "FP contracti
309310
COMPATIBLE_LANGOPT(ExpStrictFP, 1, false, "Enable experimental strict floating point")
310311
BENIGN_ENUM_LANGOPT(FPRoundingMode, RoundingMode, 3, RoundingMode::NearestTiesToEven, "FP Rounding Mode type")
311312
BENIGN_ENUM_LANGOPT(FPExceptionMode, FPExceptionModeKind, 2, FPE_Ignore, "FP Exception Behavior Mode type")
312-
BENIGN_ENUM_LANGOPT(FPEvalMethod, FPEvalMethodKind, 2, FEM_TargetDefault, "FP type used for floating point arithmetic")
313313
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field type alignment")
314314
LANGOPT(HexagonQdsp6Compat , 1, 0, "hexagon-qdsp6 backward compatibility")
315315
LANGOPT(ObjCAutoRefCount , 1, 0, "Objective-C automated reference counting")

clang/include/clang/Basic/LangOptions.h

-14
Original file line numberDiff line numberDiff line change
@@ -238,19 +238,6 @@ class LangOptions : public LangOptionsBase {
238238
/// Possible exception handling behavior.
239239
enum class ExceptionHandlingKind { None, SjLj, WinEH, DwarfCFI, Wasm };
240240

241-
/// Possible float expression evaluation method choices.
242-
enum FPEvalMethodKind {
243-
/// Use the declared type for fp arithmetic.
244-
FEM_Source,
245-
/// Use the type double for fp arithmetic.
246-
FEM_Double,
247-
/// Use extended type for fp arithmetic.
248-
FEM_Extended,
249-
/// Use the default float eval method specified by Target:
250-
// most targets are defined with evaluation method FEM_Source.
251-
FEM_TargetDefault
252-
};
253-
254241
enum class LaxVectorConversionKind {
255242
/// Permit no implicit vector bitcasts.
256243
None,
@@ -568,7 +555,6 @@ class FPOptions {
568555
setAllowFEnvAccess(true);
569556
else
570557
setAllowFEnvAccess(LangOptions::FPM_Off);
571-
setFPEvalMethod(LO.getFPEvalMethod());
572558
}
573559

574560
bool allowFPContractWithinStatement() const {

clang/include/clang/Basic/OpenMPKinds.def

+2
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ OPENMP_MAP_MODIFIER_KIND(always)
123123
OPENMP_MAP_MODIFIER_KIND(close)
124124
OPENMP_MAP_MODIFIER_KIND(mapper)
125125
OPENMP_MAP_MODIFIER_KIND(present)
126+
// This is an OpenMP extension for the sake of OpenACC support.
127+
OPENMP_MAP_MODIFIER_KIND(ompx_hold)
126128

127129
// Modifiers for 'to' or 'from' clause.
128130
OPENMP_MOTION_MODIFIER_KIND(mapper)

clang/include/clang/Basic/OpenMPKinds.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef LLVM_CLANG_BASIC_OPENMPKINDS_H
1515
#define LLVM_CLANG_BASIC_OPENMPKINDS_H
1616

17+
#include "clang/Basic/LangOptions.h"
1718
#include "llvm/ADT/StringRef.h"
1819
#include "llvm/Frontend/OpenMP/OMPConstants.h"
1920

@@ -167,7 +168,7 @@ enum OpenMPReductionClauseModifier {
167168
};
168169

169170
unsigned getOpenMPSimpleClauseType(OpenMPClauseKind Kind, llvm::StringRef Str,
170-
unsigned OpenMPVersion);
171+
const LangOptions &LangOpts);
171172
const char *getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind, unsigned Type);
172173

173174
/// Checks if the specified directive is a directive with an associated

clang/include/clang/Basic/PragmaKinds.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ enum PragmaFloatControlKind {
3232
PFC_Except, // #pragma float_control(except [,on])
3333
PFC_NoExcept, // #pragma float_control(except, off)
3434
PFC_Push, // #pragma float_control(push)
35-
PFC_Pop, // #pragma float_control(pop)
36-
PFC_Source, // #pragma float_control(source, {on|off} [,push])
37-
PFC_Double, // #pragma float_control(double, {on|off} [,push])
38-
PFC_Extended, // #pragma float_control(extended, {on|off} [,push])
35+
PFC_Pop // #pragma float_control(pop)
3936
};
4037
}
4138

clang/include/clang/Basic/TargetInfo.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -684,8 +684,7 @@ class TargetInfo : public virtual TransferrableTargetInfo,
684684
}
685685

686686
/// Return the value for the C99 FLT_EVAL_METHOD macro.
687-
// Note: implementation defined values may be negative.
688-
virtual int getFPEvalMethod() const { return 0; }
687+
virtual unsigned getFloatEvalMethod() const { return 0; }
689688

690689
// getLargeArrayMinWidth/Align - Return the minimum array size that is
691690
// 'large' and its alignment.

clang/include/clang/Driver/Options.td

+6-5
Original file line numberDiff line numberDiff line change
@@ -1484,11 +1484,6 @@ def : Flag<["-"], "fextended-identifiers">, Group<clang_ignored_f_Group>;
14841484
def : Flag<["-"], "fno-extended-identifiers">, Group<f_Group>, Flags<[Unsupported]>;
14851485
def fhosted : Flag<["-"], "fhosted">, Group<f_Group>;
14861486
def fdenormal_fp_math_EQ : Joined<["-"], "fdenormal-fp-math=">, Group<f_Group>, Flags<[CC1Option]>;
1487-
def ffp_eval_method_EQ : Joined<["-"], "ffp-eval-method=">, Group<f_Group>, Flags<[CC1Option]>,
1488-
HelpText<"Specifies the evaluation method to use for floating-point arithmetic.">,
1489-
Values<"source,double,extended">, NormalizedValuesScope<"LangOptions">,
1490-
NormalizedValues<["FEM_Source", "FEM_Double", "FEM_Extended"]>,
1491-
MarshallingInfoEnum<LangOpts<"FPEvalMethod">, "FEM_TargetDefault">;
14921487
def ffp_model_EQ : Joined<["-"], "ffp-model=">, Group<f_Group>, Flags<[NoXarchOption]>,
14931488
HelpText<"Controls the semantics of floating-point calculations.">;
14941489
def ffp_exception_behavior_EQ : Joined<["-"], "ffp-exception-behavior=">, Group<f_Group>, Flags<[CC1Option]>,
@@ -2402,6 +2397,12 @@ def fopenmp : Flag<["-"], "fopenmp">, Group<f_Group>, Flags<[CC1Option, NoArgume
24022397
HelpText<"Parse OpenMP pragmas and generate parallel code.">;
24032398
def fno_openmp : Flag<["-"], "fno-openmp">, Group<f_Group>, Flags<[NoArgumentUnused]>;
24042399
def fopenmp_version_EQ : Joined<["-"], "fopenmp-version=">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>;
2400+
defm openmp_extensions: BoolFOption<"openmp-extensions",
2401+
LangOpts<"OpenMPExtensions">, DefaultTrue,
2402+
PosFlag<SetTrue, [CC1Option, NoArgumentUnused],
2403+
"Enable all Clang extensions for OpenMP directives and clauses">,
2404+
NegFlag<SetFalse, [CC1Option, NoArgumentUnused],
2405+
"Disable all Clang extensions for OpenMP directives and clauses">>;
24052406
def fopenmp_EQ : Joined<["-"], "fopenmp=">, Group<f_Group>;
24062407
def fopenmp_use_tls : Flag<["-"], "fopenmp-use-tls">, Group<f_Group>,
24072408
Flags<[NoArgumentUnused, HelpHidden]>;

clang/include/clang/Lex/Preprocessor.h

-7
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,12 @@ class Preprocessor {
179179
IdentifierInfo *Ident__is_target_vendor; // __is_target_vendor
180180
IdentifierInfo *Ident__is_target_os; // __is_target_os
181181
IdentifierInfo *Ident__is_target_environment; // __is_target_environment
182-
IdentifierInfo *Ident__FLT_EVAL_METHOD__ = nullptr; // __FLT_EVAL_METHOD__
183182

184183
// Weak, only valid (and set) while InMacroArgs is true.
185184
Token* ArgMacro;
186185

187186
SourceLocation DATELoc, TIMELoc;
188187

189-
// Corresponding to __FLT_EVAL_METHOD__. Initialized from TargetInfo
190-
// or the command line. Implementation-defined values can be negative.
191-
int CurrentFPEvalMethod = 0;
192-
193188
// Next __COUNTER__ value, starts at 0.
194189
unsigned CounterValue = 0;
195190

@@ -2008,8 +2003,6 @@ class Preprocessor {
20082003
}
20092004
unsigned getCounterValue() const { return CounterValue; }
20102005
void setCounterValue(unsigned V) { CounterValue = V; }
2011-
int getCurrentFPEvalMethod() const { return CurrentFPEvalMethod; }
2012-
void setCurrentFPEvalMethod(int V) { CurrentFPEvalMethod = V; }
20132006

20142007
/// Retrieves the module that we're currently building, if any.
20152008
Module *getCurrentModule();

clang/include/clang/Lex/PreprocessorOptions.h

-4
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@ class PreprocessorOptions {
146146
/// When enabled, the preprocessor will construct editor placeholder tokens.
147147
bool LexEditorPlaceholders = true;
148148

149-
/// When enabled, the preprocessor will expand special builtin macros.
150-
bool LexExpandSpecialBuiltins = true;
151-
152149
/// True if the SourceManager should report the original file name for
153150
/// contents of files that were remapped to other files. Defaults to true.
154151
bool RemappedFilesKeepOriginalName = true;
@@ -249,7 +246,6 @@ class PreprocessorOptions {
249246
ImplicitPCHInclude.clear();
250247
SingleFileParseMode = false;
251248
LexEditorPlaceholders = true;
252-
LexExpandSpecialBuiltins = true;
253249
RetainRemappedFileBuffers = true;
254250
PrecompiledPreambleBytes.first = 0;
255251
PrecompiledPreambleBytes.second = false;

clang/include/clang/Sema/Sema.h

+7-3
Original file line numberDiff line numberDiff line change
@@ -1687,15 +1687,19 @@ class Sema final {
16871687
/// statements.
16881688
class FPFeaturesStateRAII {
16891689
public:
1690-
FPFeaturesStateRAII(Sema &S);
1691-
~FPFeaturesStateRAII();
1690+
FPFeaturesStateRAII(Sema &S) : S(S), OldFPFeaturesState(S.CurFPFeatures) {
1691+
OldOverrides = S.FpPragmaStack.CurrentValue;
1692+
}
1693+
~FPFeaturesStateRAII() {
1694+
S.CurFPFeatures = OldFPFeaturesState;
1695+
S.FpPragmaStack.CurrentValue = OldOverrides;
1696+
}
16921697
FPOptionsOverride getOverrides() { return OldOverrides; }
16931698

16941699
private:
16951700
Sema& S;
16961701
FPOptions OldFPFeaturesState;
16971702
FPOptionsOverride OldOverrides;
1698-
int OldEvalMethod;
16991703
};
17001704

17011705
void addImplicitTypedef(StringRef Name, QualType T);

clang/lib/Basic/OpenMPKinds.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ using namespace clang;
2121
using namespace llvm::omp;
2222

2323
unsigned clang::getOpenMPSimpleClauseType(OpenMPClauseKind Kind, StringRef Str,
24-
unsigned OpenMPVersion) {
24+
const LangOptions &LangOpts) {
2525
switch (Kind) {
2626
case OMPC_default:
2727
return llvm::StringSwitch<unsigned>(Str)
@@ -59,7 +59,9 @@ unsigned clang::getOpenMPSimpleClauseType(OpenMPClauseKind Kind, StringRef Str,
5959
.Case(#Name, static_cast<unsigned>(OMPC_MAP_MODIFIER_##Name))
6060
#include "clang/Basic/OpenMPKinds.def"
6161
.Default(OMPC_MAP_unknown);
62-
if (OpenMPVersion < 51 && Type == OMPC_MAP_MODIFIER_present)
62+
if (LangOpts.OpenMP < 51 && Type == OMPC_MAP_MODIFIER_present)
63+
return OMPC_MAP_MODIFIER_unknown;
64+
if (!LangOpts.OpenMPExtensions && Type == OMPC_MAP_MODIFIER_ompx_hold)
6365
return OMPC_MAP_MODIFIER_unknown;
6466
return Type;
6567
}
@@ -70,7 +72,7 @@ unsigned clang::getOpenMPSimpleClauseType(OpenMPClauseKind Kind, StringRef Str,
7072
.Case(#Name, static_cast<unsigned>(OMPC_MOTION_MODIFIER_##Name))
7173
#include "clang/Basic/OpenMPKinds.def"
7274
.Default(OMPC_MOTION_MODIFIER_unknown);
73-
if (OpenMPVersion < 51 && Type == OMPC_MOTION_MODIFIER_present)
75+
if (LangOpts.OpenMP < 51 && Type == OMPC_MOTION_MODIFIER_present)
7476
return OMPC_MOTION_MODIFIER_unknown;
7577
return Type;
7678
}

clang/lib/Basic/Targets/OSTargets.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ class AIXTargetInfo : public OSTargetInfo<Target> {
737737
}
738738

739739
// AIX sets FLT_EVAL_METHOD to be 1.
740-
int getFPEvalMethod() const override { return 1; }
740+
unsigned getFloatEvalMethod() const override { return 1; }
741741
bool hasInt128Type() const override { return false; }
742742

743743
bool defaultsToAIXPowerAlignment() const override { return true; }

clang/lib/Basic/Targets/X86.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public TargetInfo {
166166
return LongDoubleFormat == &llvm::APFloat::IEEEquad() ? "g" : "e";
167167
}
168168

169-
int getFPEvalMethod() const override {
169+
unsigned getFloatEvalMethod() const override {
170170
// X87 evaluates with 80 bits "long double" precision.
171171
return SSELevel == NoSSE ? 2 : 0;
172172
}
@@ -469,12 +469,12 @@ class LLVM_LIBRARY_VISIBILITY NetBSDI386TargetInfo
469469
NetBSDI386TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
470470
: NetBSDTargetInfo<X86_32TargetInfo>(Triple, Opts) {}
471471

472-
int getFPEvalMethod() const override {
472+
unsigned getFloatEvalMethod() const override {
473473
unsigned Major, Minor, Micro;
474474
getTriple().getOSVersion(Major, Minor, Micro);
475475
// New NetBSD uses the default rounding mode.
476476
if (Major >= 7 || (Major == 6 && Minor == 99 && Micro >= 26) || Major == 0)
477-
return X86_32TargetInfo::getFPEvalMethod();
477+
return X86_32TargetInfo::getFloatEvalMethod();
478478
// NetBSD before 6.99.26 defaults to "double" rounding.
479479
return 1;
480480
}

0 commit comments

Comments
 (0)