summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support/truncate_fp.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/support/truncate_fp.h')
-rw-r--r--libcxx/test/support/truncate_fp.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/libcxx/test/support/truncate_fp.h b/libcxx/test/support/truncate_fp.h
new file mode 100644
index 00000000000..83b2b2cffeb
--- /dev/null
+++ b/libcxx/test/support/truncate_fp.h
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+inline long double truncate_fp(long double val) {
+ volatile long double sink = val;
+ return sink;
+}
+
+inline double truncate_fp(double val) {
+ volatile double sink = val;
+ return sink;
+}
+
+inline float truncate_fp(float val) {
+ volatile float sink = val;
+ return sink;
+}
OpenPOWER on IntegriCloud