[PATCH] Add a simple helper function to create a 64-bit integer.
Reid Kleckner
rnk at google.com
Wed May 28 15:57:06 PDT 2014
Closed by commit rL209777 (authored by @rnk).
http://reviews.llvm.org/D3941
Files:
llvm/trunk/include/llvm/Support/MathExtras.h
Index: llvm/trunk/include/llvm/Support/MathExtras.h
===================================================================
--- llvm/trunk/include/llvm/Support/MathExtras.h
+++ llvm/trunk/include/llvm/Support/MathExtras.h
@@ -258,6 +258,12 @@
return static_cast<uint32_t>(Value);
}
+/// Make_64 - This functions makes a 64-bit integer from a high / low pair of
+/// 32-bit integers.
+inline uint64_t Make_64(uint32_t High, uint32_t Low) {
+ return ((uint64_t)High << 32) | (uint64_t)Low;
+}
+
/// isInt - Checks if an integer fits into the given bit width.
template<unsigned N>
inline bool isInt(int64_t x) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3941.9891.patch
Type: text/x-patch
Size: 625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140528/adf95281/attachment.bin>
More information about the llvm-commits
mailing list