79 llvm::StringRef name_ref{name};
80 if (name_ref.trim().empty())
83 llvm::StringRef value_ref{value};
85 m_opaque_up->insert_or_assign(name_ref, value_ref.str());
88 return m_opaque_up->try_emplace(name_ref, value_ref.str()).second;
94 llvm::StringRef name_ref{name};
95 if (name_ref.trim().empty())
114 auto split = llvm::StringRef(name_and_value).split(
'=');
115 m_opaque_up->insert_or_assign(split.first.str(), split.second.str());
123 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)
static std::string compose(const value_type &KeyValue)
const char * Intern(llvm::StringRef str) const
static StringPoolRef GetSystemPool()
The system pool. Only valid between Initialize and Terminate.
A class that represents a running process on the host machine.
std::unique_ptr< T > clone(const std::unique_ptr< T > &src)