34 std::optional<AsmResourceBlob> blob)
36 llvm::sys::SmartScopedWriter<true> writer(blobMapLock);
39 auto tryInsertion = [&](StringRef name) ->
BlobEntry * {
40 auto it = blobMap.try_emplace(name,
BlobEntry());
42 it.first->second.initialize(it.first->getKey(), std::move(blob));
43 return &it.first->second;
49 if (
BlobEntry *entry = tryInsertion(name))
55 nameStorage.push_back(
'_');
56 size_t nameCounter = 1;
58 Twine(nameCounter++).toVector(nameStorage);
61 if (
BlobEntry *entry = tryInsertion(nameStorage))
63 nameStorage.resize(name.size() + 1);
The class represents an individual entry of a blob.
void setBlob(AsmResourceBlob &&newBlob)
Set the blob owned by this entry.