14 llvm::StringRef
Value) {
15 const size_t size = Key.size() + 1 +
Value.size() + 1 ;
16 char *Result =
static_cast<char *
>(
17 Allocator.Allocate(
sizeof(
char) * size,
alignof(
char)));
20 Next = std::copy(Key.begin(), Key.end(), Next);
22 Next = std::copy(
Value.begin(),
Value.end(), Next);
29 Data =
static_cast<char **
>(
30 Allocator.Allocate(
sizeof(
char *) * (Env.size() + 1),
alignof(
char *)));
32 for (
const auto &KV : Env)
33 *Next++ = make_entry(KV.first(), KV.second);
45 while (first != last) {
46 try_emplace(first->first(), first->second);
char * make_entry(llvm::StringRef Key, llvm::StringRef Value)
llvm::BumpPtrAllocator Allocator
std::pair< iterator, bool > insert(llvm::StringRef KeyEqValue)
A class that represents a running process on the host machine.