truncate_fp.h 645 B

12345678910111213141516171819202122
  1. //===----------------------------------------------------------------------===//
  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. inline long double truncate_fp(long double val) {
  9. volatile long double sink = val;
  10. return sink;
  11. }
  12. inline double truncate_fp(double val) {
  13. volatile double sink = val;
  14. return sink;
  15. }
  16. inline float truncate_fp(float val) {
  17. volatile float sink = val;
  18. return sink;
  19. }