[Lldb-commits] [lldb] 48e2d3a - [lldb][NFC] Remove an outdated comment in HostInfoBase

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 22 07:48:55 PDT 2021


Author: Raphael Isemann
Date: 2021-06-22T16:48:17+02:00
New Revision: 48e2d3a5c23f7a11972c30f92d48d85a6a6bf1bd

URL: https://github.com/llvm/llvm-project/commit/48e2d3a5c23f7a11972c30f92d48d85a6a6bf1bd
DIFF: https://github.com/llvm/llvm-project/commit/48e2d3a5c23f7a11972c30f92d48d85a6a6bf1bd.diff

LOG: [lldb][NFC] Remove an outdated comment in HostInfoBase

We should *never* use static local variables in this file as this makes
unittesting the plugin code impossible (and this whole 'testing' thing has
turned out to be rather useful so far).

Added: 
    

Modified: 
    lldb/source/Host/common/HostInfoBase.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Host/common/HostInfoBase.cpp b/lldb/source/Host/common/HostInfoBase.cpp
index d923a40cab3bb..a6239a3208bce 100644
--- a/lldb/source/Host/common/HostInfoBase.cpp
+++ b/lldb/source/Host/common/HostInfoBase.cpp
@@ -31,12 +31,7 @@ using namespace lldb;
 using namespace lldb_private;
 
 namespace {
-// The HostInfoBaseFields is a work around for windows not supporting static
-// variables correctly in a thread safe way. Really each of the variables in
-// HostInfoBaseFields should live in the functions in which they are used and
-// each one should be static, but the work around is in place to avoid this
-// restriction. Ick.
-
+/// Contains the state of the HostInfoBase plugin.
 struct HostInfoBaseFields {
   ~HostInfoBaseFields() {
     if (FileSystem::Instance().Exists(m_lldb_process_tmp_dir)) {


        


More information about the lldb-commits mailing list