From 2571440d1e4fd86b43a65599e3ae078f92412df8 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 24 Aug 2009 02:02:58 +0000 Subject: [PATCH] Unbreak unit tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79879 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/ADT/APIntTest.cpp | 7 +++++++ unittests/Support/ConstantRangeTest.cpp | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/unittests/ADT/APIntTest.cpp b/unittests/ADT/APIntTest.cpp index a89a960a078..3fd4fd4c309 100644 --- a/unittests/ADT/APIntTest.cpp +++ b/unittests/ADT/APIntTest.cpp @@ -17,6 +17,13 @@ using namespace llvm; namespace { +// Support APInt output to an std::ostream. +inline std::ostream &operator<<(std::ostream &OS, const APInt &Value) { + raw_os_ostream RawOS(OS); + RawOS << Value; + return OS; +} + // Test that APInt shift left works when bitwidth > 64 and shiftamt == 0 TEST(APIntTest, ShiftLeftByZero) { APInt One = APInt::getNullValue(65) + 1; diff --git a/unittests/Support/ConstantRangeTest.cpp b/unittests/Support/ConstantRangeTest.cpp index f377b6f068a..56f315a09af 100644 --- a/unittests/Support/ConstantRangeTest.cpp +++ b/unittests/Support/ConstantRangeTest.cpp @@ -16,6 +16,13 @@ using namespace llvm; namespace { +// Support APInt output to an std::ostream. +inline std::ostream &operator<<(std::ostream &OS, const APInt &Value) { + raw_os_ostream RawOS(OS); + RawOS << Value; + return OS; +} + class ConstantRangeTest : public ::testing::Test { protected: static ConstantRange Full;