78 llvm::StringRef name_ref{name};
79 if (name_ref.trim().empty())
82 llvm::StringRef value_ref{value};
84 m_opaque_up->insert_or_assign(name_ref, value_ref.str());
87 return m_opaque_up->try_emplace(name_ref, value_ref.str()).second;
93 llvm::StringRef name_ref{name};
94 if (name_ref.trim().empty())
113 auto split = llvm::StringRef(name_and_value).split(
'=');
114 m_opaque_up->insert_or_assign(split.first.str(), split.second.str());
122 for (
size_t i = 0; i < entries.
GetSize(); i++) {
#define LLDB_INSTRUMENT_VA(...)
const char * GetValueAtIndex(size_t index)
Return the value of the environment variable at a given index from the internal list of environment v...
void PutEntry(const char *name_and_value)
Add or replace an existing environment variable.
bool Set(const char *name, const char *value, bool overwrite)
Set the value of a given environment variable.
void Clear()
Delete all the environment variables.
SBStringList GetEntries()
Return all environment variables contained in this object.
const char * GetNameAtIndex(size_t index)
Return the name of the environment variable at a given index from the internal list of environment va...
bool Unset(const char *name)
Unset an environment variable if exists.
lldb_private::Environment & ref() const
std::unique_ptr< lldb_private::Environment > m_opaque_up
const lldb::SBEnvironment & operator=(const lldb::SBEnvironment &rhs)
const char * Get(const char *name)
Return the value of a given environment variable.
void SetEntries(const SBStringList &entries, bool append)
Update this object with the given environment variables.
void AppendString(const char *str)
const char * GetStringAtIndex(size_t idx)
A uniqued constant string class.
const char * AsCString(const char *value_if_empty) const
Get the string value as a C string.
static std::string compose(const value_type &KeyValue)
A class that represents a running process on the host machine.
std::unique_ptr< T > clone(const std::unique_ptr< T > &src)