Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 18 additions & 22 deletions llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5064,33 +5064,29 @@ void IndexBitcodeWriter::writeCombinedGlobalValueSummary() {
getReferencedTypeIds(FS, ReferencedTypeIds);
}

if (!Index.cfiFunctionDefs().empty()) {
for (auto &S : Index.cfiFunctionDefs()) {
if (DefOrUseGUIDs.contains(
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(S)))) {
NameVals.push_back(StrtabBuilder.add(S));
NameVals.push_back(S.size());
}
}
if (!NameVals.empty()) {
Stream.EmitRecord(bitc::FS_CFI_FUNCTION_DEFS, NameVals);
NameVals.clear();
for (auto &S : Index.cfiFunctionDefs()) {
if (DefOrUseGUIDs.contains(
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(S)))) {
NameVals.push_back(StrtabBuilder.add(S));
NameVals.push_back(S.size());
}
}
if (!NameVals.empty()) {
Stream.EmitRecord(bitc::FS_CFI_FUNCTION_DEFS, NameVals);
NameVals.clear();
}

if (!Index.cfiFunctionDecls().empty()) {
for (auto &S : Index.cfiFunctionDecls()) {
if (DefOrUseGUIDs.contains(
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(S)))) {
NameVals.push_back(StrtabBuilder.add(S));
NameVals.push_back(S.size());
}
}
if (!NameVals.empty()) {
Stream.EmitRecord(bitc::FS_CFI_FUNCTION_DECLS, NameVals);
NameVals.clear();
for (auto &S : Index.cfiFunctionDecls()) {
if (DefOrUseGUIDs.contains(
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(S)))) {
NameVals.push_back(StrtabBuilder.add(S));
NameVals.push_back(S.size());
}
}
if (!NameVals.empty()) {
Stream.EmitRecord(bitc::FS_CFI_FUNCTION_DECLS, NameVals);
NameVals.clear();
}

// Walk the GUIDs that were referenced, and write the
// corresponding type id records.
Expand Down
Loading