diff options
Diffstat (limited to 'lldb/source/Core/Log.cpp')
-rw-r--r-- | lldb/source/Core/Log.cpp | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/lldb/source/Core/Log.cpp b/lldb/source/Core/Log.cpp index 1be3c525ae0..7bbbf4f11c3 100644 --- a/lldb/source/Core/Log.cpp +++ b/lldb/source/Core/Log.cpp @@ -32,91 +32,6 @@ using namespace lldb; using namespace lldb_private; -static Stream * -StreamForSTDOUTAccess (bool set, StreamSP &stream_sp) -{ - // Since we are in a shared library and we can't have global - // constructors, we need to control access to this static variable - // through an accessor function to get and set the value. - static StreamSP g_stream_sp; - - if (set) - g_stream_sp = stream_sp; - else - stream_sp = g_stream_sp; - - return stream_sp.get(); -} - -StreamSP -Log::GetStreamForSTDOUT () -{ - StreamSP stream_sp; - StreamForSTDOUTAccess (false, stream_sp); - return stream_sp; -} - -void -Log::SetStreamForSTDOUT (StreamSP &stream_sp) -{ - StreamForSTDOUTAccess (true, stream_sp); -} - -void -Log::STDOUT (const char *format, ...) -{ - StreamSP stream_sp; - if (StreamForSTDOUTAccess(false, stream_sp)) - { - va_list args; - va_start (args, format); - stream_sp->PrintfVarArg(format, args); - va_end (args); - } -} - -static Stream * -StreamForSTDERRAccess (bool set, StreamSP &stream_sp) -{ - // Since we are in a shared library and we can't have global - // constructors, we need to control access to this static variable - // through an accessor function to get and set the value. - static StreamSP g_stream_sp; - - if (set) - g_stream_sp = stream_sp; - else - stream_sp = g_stream_sp; - return stream_sp.get(); -} - -StreamSP -Log::GetStreamForSTDERR () -{ - StreamSP stream_sp; - StreamForSTDERRAccess (false, stream_sp); - return stream_sp; -} - -void -Log::SetStreamForSTDERR (StreamSP &stream_sp) -{ - StreamForSTDERRAccess (true, stream_sp); -} - -void -Log::STDERR (const char *format, ...) -{ - StreamSP stream_sp; - if (StreamForSTDERRAccess(false, stream_sp)) - { - va_list args; - va_start (args, format); - stream_sp->PrintfVarArg(format, args); - va_end (args); - } -} - Log::Log () : m_stream_sp(), m_options(0), |