Simplify GetGlobalProperties functions of Thread/Process/Target
authorPavel Labath <labath@google.com>
Wed, 19 Oct 2016 15:12:45 +0000 (15:12 +0000)
committerPavel Labath <labath@google.com>
Wed, 19 Oct 2016 15:12:45 +0000 (15:12 +0000)
commit5f05ea84d58d2b3044e5fad164bd7ebb22aff348
tree01c59e4597a57a510af44860eb84423947c1d1a6
parentce30b1c78ef3b7d6e5426b4ed778eccd68162c7e
Simplify GetGlobalProperties functions of Thread/Process/Target

Summary:
"Initialization of function-local statics is guaranteed to occur only once even when called from
multiple threads, and may be more efficient than the equivalent code using std::call_once."
<http://en.cppreference.com/w/cpp/thread/call_once>

I'd add that it's also more readable.

Reviewers: clayborg, zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D17710

llvm-svn: 284601
lldb/source/Target/Process.cpp
lldb/source/Target/Target.cpp
lldb/source/Target/Thread.cpp