diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-12-06 23:04:41 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-12-06 23:04:41 +0000 |
commit | 82601cf94902362949463198acac7b832d9b4135 (patch) | |
tree | 1a485e186f28d6a9882fa3bd16341a2a02eaa5fb /llvm/utils/unittest/googletest/include | |
parent | fc7f04510c843a38e1e4bf57bb815beeca67c888 (diff) | |
download | bcm5719-llvm-82601cf94902362949463198acac7b832d9b4135.tar.gz bcm5719-llvm-82601cf94902362949463198acac7b832d9b4135.zip |
Modify the LLVM checkout of googletest:
1) don't delete gtest-all.cc (which is used to gather all gtest source
files in a single file)
2) make including LLVMSupport headers optional (on by default).
Sanitizer tools may want to use their own versions of googletest
compiled with specific flags, instead of the common googletest
library used for all other LLVM/Clang unittests.
llvm-svn: 169559
Diffstat (limited to 'llvm/utils/unittest/googletest/include')
-rw-r--r-- | llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h index f8a5cc9447b..a94bf28421f 100644 --- a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h +++ b/llvm/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; } |