Fixed bugs in the multi-threaded access in HostInfoBase. Prior to this fix, static...
authorGreg Clayton <gclayton@apple.com>
Tue, 3 Feb 2015 02:05:44 +0000 (02:05 +0000)
committerGreg Clayton <gclayton@apple.com>
Tue, 3 Feb 2015 02:05:44 +0000 (02:05 +0000)
commitff48e4bea09afe020e1c4373f32b65a8be29503e
treead505060c757c203697691b84e72c9857762f111
parentdcfd6ed1837c4a162c8315d9f5b19cdd2a67a016
Fixed bugs in the multi-threaded access in HostInfoBase. Prior to this fix, static bool variables were used but this is not sufficient. We now use std::call_once in all places where the previous static bool code was used to try to implement thread safety.

This was causing code that opened multiple targets to try and get a path to debugserver from the GDB remote communication class, and it would get the LLDB path and some instances would return empty strings and it would cause debugserver to not be found.

<rdar://problem/18756927>

llvm-svn: 227935
lldb/source/Core/ConstString.cpp
lldb/source/Expression/ClangModulesDeclVendor.cpp
lldb/source/Host/common/HostInfoBase.cpp
lldb/source/Host/linux/HostInfoLinux.cpp
lldb/source/Host/windows/HostInfoWindows.cpp
lldb/source/Symbol/ClangASTContext.cpp