From d2feb740e3b885dc29caa6b7ea518697f5732cbd Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 7 Mar 2025 13:36:51 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-8?q?l=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Created using spr 1.3.4 --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 40 ++++++++++------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index a3556af9a683c..bddc2cd2180b1 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -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.