//===-- StreamWrapper.cpp -------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "StreamWrapper.h" #include #include #include #include namespace __llvm_libc { namespace testutils { StreamWrapper outs() { return {std::addressof(std::cout)}; } template StreamWrapper &StreamWrapper::operator<<(T t) { assert(OS); std::ostream &Stream = *reinterpret_cast(OS); Stream << t; return *this; } template StreamWrapper &StreamWrapper::operator<<(void *t); template StreamWrapper &StreamWrapper::operator<<(const char *t); template StreamWrapper &StreamWrapper::operator<<(char *t); template StreamWrapper &StreamWrapper::operator<<(char t); template StreamWrapper &StreamWrapper::operator<<(short t); template StreamWrapper &StreamWrapper::operator<<(int t); template StreamWrapper &StreamWrapper::operator<<(long t); template StreamWrapper &StreamWrapper::operator<<(long long t); template StreamWrapper & StreamWrapper::operator<<(unsigned char t); template StreamWrapper & StreamWrapper::operator<<(unsigned short t); template StreamWrapper &StreamWrapper::operator<<(unsigned int t); template StreamWrapper & StreamWrapper::operator<<(unsigned long t); template StreamWrapper & StreamWrapper::operator<<(unsigned long long t); template StreamWrapper &StreamWrapper::operator<<(bool t); template StreamWrapper &StreamWrapper::operator<<(std::string t); } // namespace testutils } // namespace __llvm_libc