[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

Yuri Iozzelli via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 1 08:38:30 PDT 2025


================
@@ -165,14 +165,17 @@ void Writer::createCustomSections() {
   for (auto &pair : customSectionMapping) {
     StringRef name = pair.first;
     LLVM_DEBUG(dbgs() << "createCustomSection: " << name << "\n");
-
-    OutputSection *sec = make<CustomSection>(std::string(name), pair.second);
+    OutputSection *Sec;
+    if (name == "metadata.code.branch_hint")
+      Sec = make<CodeMetaDataSection>(std::string(name), pair.second);
----------------
yuri91 wrote:

Yes, it's a missing point in the spec. The constraint is there to help streaming compilation. I will add it to the spec, thanks for pointing this out!

https://github.com/llvm/llvm-project/pull/146230


More information about the llvm-commits mailing list