[Lldb-commits] [lldb] 9669223 - [lldb] Remove two #ifndef linux from Platform.cpp

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 20 00:24:07 PDT 2021


Author: Pavel Labath
Date: 2021-09-20T08:30:02+02:00
New Revision: 966922320f09b8bf6e4a69a32f344b3acec36434

URL: https://github.com/llvm/llvm-project/commit/966922320f09b8bf6e4a69a32f344b3acec36434
DIFF: https://github.com/llvm/llvm-project/commit/966922320f09b8bf6e4a69a32f344b3acec36434.diff

LOG: [lldb] Remove two #ifndef linux from Platform.cpp

These have been here since r215992, guarding the calls to HostInfo, but
their purpose unclear -- HostInfoLinux provides these functions and they
work fine.

Added: 
    

Modified: 
    lldb/source/Target/Platform.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index a9b97f7957953..7f762a68710e8 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -497,24 +497,14 @@ bool Platform::GetOSBuildString(std::string &s) {
   s.clear();
 
   if (IsHost())
-#if !defined(__linux__)
     return HostInfo::GetOSBuildString(s);
-#else
-    return false;
-#endif
-  else
-    return GetRemoteOSBuildString(s);
+  return GetRemoteOSBuildString(s);
 }
 
 bool Platform::GetOSKernelDescription(std::string &s) {
   if (IsHost())
-#if !defined(__linux__)
     return HostInfo::GetOSKernelDescription(s);
-#else
-    return false;
-#endif
-  else
-    return GetRemoteOSKernelDescription(s);
+  return GetRemoteOSKernelDescription(s);
 }
 
 void Platform::AddClangModuleCompilationOptions(


        


More information about the lldb-commits mailing list