Modify the LLVM checkout of googletest:
[oota-llvm.git] / utils / unittest / googletest / include / gtest / internal / gtest-internal.h
index f8a5cc9447b1f35fce32f885e61b3e8871e5a4a8..a94bf28421fb4e363874b588d4b7fb76b11a5406 100644 (file)
@@ -56,7 +56,9 @@
 #include "gtest/internal/gtest-filepath.h"
 #include "gtest/internal/gtest-type-util.h"
 
+#if !GTEST_NO_LLVM_RAW_OSTREAM
 #include "llvm/Support/raw_os_ostream.h"
+#endif
 
 // Due to C++ preprocessor weirdness, we need double indirection to
 // concatenate two tokens when one of them is __LINE__.  Writing
 // std::ostream with an implicit conversion to raw_ostream& and stream
 // to that.  This causes the compiler to prefer std::ostream overloads
 // but still find raw_ostream& overloads.
+#if !GTEST_NO_LLVM_RAW_OSTREAM
 namespace llvm {
 class convertible_fwd_ostream : public std::ostream {
   raw_os_ostream ros_;
@@ -115,6 +118,12 @@ inline void GTestStreamToHelper(std::ostream* os, const T& val) {
   llvm::convertible_fwd_ostream cos(*os);
   cos << val;
 }
+#else
+template <typename T>
+inline void GTestStreamToHelper(std::ostream* os, const T& val) {
+  *os << val;
+}
+#endif
 
 class ProtocolMessage;
 namespace proto2 { class Message; }