blob: 27d0dd02498df598a937de20216571957fa5492e [file] [log] [blame]
Jim Stichnoth7da431b2014-08-05 11:22:37 -07001//===- subzero/crosstest/test_cast.h - Test prototypes ----------*- C++ -*-===//
2//
3// The Subzero Code Generator
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file declares the function prototypes used for crosstesting cast
11// operations.
12//
13//===----------------------------------------------------------------------===//
14
15// The driver and the test program may be compiled by different
16// versions of clang, with different standard libraries that have
17// different definitions of int8_t. Specifically, int8_t may be
18// typedef'd as either 'char' or 'signed char', which mangle to
19// different strings. Avoid int8_t and use an explicit myint8_t.
20typedef signed char myint8_t;
21
Jim Stichnoth5bc2b1d2014-05-22 13:38:48 -070022template <typename FromType, typename ToType> ToType cast(FromType a);
23template <typename FromType, typename ToType> ToType castBits(FromType a);