[libc++][Android] Allow testing libc++ with clang-r536225 (#116149)
[llvm-project.git] / flang / runtime / Float128Math / trunc.cpp
blob54fa33176813ca30c50b5f2a116f859b4fe2ee82
1 //===-- runtime/Float128Math/trunc.cpp ------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Round to integer, toward zero.
11 //===----------------------------------------------------------------------===//
13 #include "math-entries.h"
15 namespace Fortran::runtime {
16 extern "C" {
18 #if HAS_LDBL128 || HAS_FLOAT128
19 CppTypeFor<TypeCategory::Real, 16> RTDEF(TruncF128)(
20 CppTypeFor<TypeCategory::Real, 16> x) {
21 return Trunc<true>::invoke(x);
23 #endif
25 } // extern "C"
26 } // namespace Fortran::runtime