https://github.com/brad0 created 
https://github.com/llvm/llvm-project/pull/122040

None

>From 881a7767c1397951bf5275682a13037cd93dfcd5 Mon Sep 17 00:00:00 2001
From: Brad Smith <b...@comstyle.com>
Date: Tue, 7 Jan 2025 21:16:56 -0500
Subject: [PATCH] [lldb][OpenBSD] Make use of Environment class

---
 lldb/source/Host/openbsd/Host.cpp | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/lldb/source/Host/openbsd/Host.cpp 
b/lldb/source/Host/openbsd/Host.cpp
index a4dc3918acfd08..e7ad18e03e19b3 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