diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:41:23 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:41:23 +0000 |
commit | 169d2bd06003c39970bc94c99669a34b61bb7e45 (patch) | |
tree | 06099edc18d30894081a822b756f117cbe0b8207 /utils/unittest/googletest/include | |
parent | 0ac5f94c68a3d8fbd1380dbba26d891ea7816b5e (diff) | |
download | FreeBSD-src-169d2bd06003c39970bc94c99669a34b61bb7e45.zip FreeBSD-src-169d2bd06003c39970bc94c99669a34b61bb7e45.tar.gz |
Vendor import of llvm trunk r178860:
http://llvm.org/svn/llvm-project/llvm/trunk@178860
Diffstat (limited to 'utils/unittest/googletest/include')
-rw-r--r-- | utils/unittest/googletest/include/gtest/internal/gtest-internal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/unittest/googletest/include/gtest/internal/gtest-internal.h b/utils/unittest/googletest/include/gtest/internal/gtest-internal.h index f8a5cc9..a94bf28 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-internal.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-internal.h @@ -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 @@ -100,6 +102,7 @@ // 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; } |