Extend constant folding to float and double operations.
Change-Id: I2837064b2ceea587bc171fc520507f13355292c6
diff --git a/runtime/utils.h b/runtime/utils.h
index c00db11..79e4da1 100644
--- a/runtime/utils.h
+++ b/runtime/utils.h
@@ -111,6 +111,11 @@
: std::abs(value);
}
+template <typename T>
+inline typename std::make_unsigned<T>::type MakeUnsigned(T x) {
+ return static_cast<typename std::make_unsigned<T>::type>(x);
+}
+
std::string PrintableChar(uint16_t ch);
// Returns an ASCII string corresponding to the given UTF-8 string.