Author: Brad Smith
Date: 2025-01-08T16:18:11-05:00
New Revision: 647e8d8dee8c2b68f0b9da7956e4af272b52149b

URL: 
https://github.com/llvm/llvm-project/commit/647e8d8dee8c2b68f0b9da7956e4af272b52149b
DIFF: 
https://github.com/llvm/llvm-project/commit/647e8d8dee8c2b68f0b9da7956e4af272b52149b.diff

LOG: [lldb][OpenBSD] Make use of Environment class (#122040)

Added: 
    

Modified: 
    lldb/source/Host/openbsd/Host.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Host/openbsd/Host.cpp 
b/lldb/source/Host/openbsd/Host.cpp
index 76d8c4faa3863c..24650ff97075ea 100644
--- a/lldb/source/Host/openbsd/Host.cpp
+++ b/lldb/source/Host/openbsd/Host.cpp
@@ -41,18 +41,7 @@ namespace lldb_private {
 class ProcessLaunchInfo;
 }
 
-Environment Host::GetEnvironment() {
-  Environment env;
-  char *v;
-  char **var = environ;
-  for (; var != NULL && *var != NULL; ++var) {
-    v = strchr(*var, (int)'-');
-    if (v == NULL)
-      continue;
-    env.insert(v);
-  }
-  return env;
-}
+Environment Host::GetEnvironment() { return Environment(environ); }
 
 static bool
 GetOpenBSDProcessArgs(const ProcessInstanceInfoMatch *match_info_ptr,


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to