llvm.org GIT mirror llvm / 6700316
Define an operator<< for APInt to be used with std::ostream. This will allow it to be used in unittests that use gtest's EXPECT_EQ. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74494 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 10 years ago
2 changed file(s) with 8 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
14251425 return OS;
14261426 }
14271427
1428 std::ostream &operator<<(std::ostream &o, const APInt &I);
1429
14281430 namespace APIntOps {
14291431
14301432 /// @brief Determine the smaller of two APInts considered to be signed.
21772177 OS << S.c_str();
21782178 }
21792179
2180 std::ostream &operator<<(std::ostream &o, const APInt &I) {
2181 raw_os_ostream OS(o);
2182 OS << I;
2183 return o;
2184 }
2185
21802186 // This implements a variety of operations on a representation of
21812187 // arbitrary precision, two's-complement, bignum integer values.
21822188