summaryrefslogtreecommitdiff
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorZahira Ammarguellat <zahira.ammarguellat@intel.com>2023-03-09 09:24:01 -0500
committerTom Stellard <tstellar@redhat.com>2023-03-10 22:55:02 -0800
commitfce3e75e01babe38576b1519dab5f752955525f9 (patch)
treeca0bc3c7480a707694919ec5d677aa0eda7d1bdb /clang/lib/Lex/Preprocessor.cpp
parenta9e129ed8806cc313fcda5017f25206cf73c42ea (diff)
downloadllvmorg-16.0.0-rc4.tar.gz
Revert "Currently the control of the eval-method is mixed with fast-math."llvmorg-16.0.0-rc4
Setting __FLT_EVAL_METHOD__ to -1 with fast-math will set __GLIBC_FLT_EVAL_METHOD to 2 and long double ends up being used for float_t and double_t. This creates some ABI breakage with various C libraries. See details here: https://github.com/llvm/llvm-project/issues/60781 This reverts commit bbf0d1932a3c1be970ed8a580e51edf571b80fd5. (cherry picked from commit 2f1264260b37e9bd79737181e459ae20e10c5fea)
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index d9a51b7e9da6..0d411abf8f1c 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -207,11 +207,6 @@ void Preprocessor::Initialize(const TargetInfo &Target,
else
// Set initial value of __FLT_EVAL_METHOD__ from the command line.
setCurrentFPEvalMethod(SourceLocation(), getLangOpts().getFPEvalMethod());
- // When `-ffast-math` option is enabled, it triggers several driver math
- // options to be enabled. Among those, only one the following two modes
- // affect the eval-method: reciprocal or reassociate.
- if (getLangOpts().AllowFPReassoc || getLangOpts().AllowRecip)
- setCurrentFPEvalMethod(SourceLocation(), LangOptions::FEM_Indeterminable);
}
void Preprocessor::InitializeForModelFile() {