[Lldb-commits] [lldb] [lldb][OpenBSD] Make use of Environment class (PR #122040)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 7 18:24:34 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Brad Smith (brad0)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/122040.diff
1 Files Affected:
- (modified) lldb/source/Host/openbsd/Host.cpp (+1-12)
``````````diff
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,
``````````
</details>
https://github.com/llvm/llvm-project/pull/122040
More information about the lldb-commits
mailing list