[llvm] [SampleProfile] Support Eytzinger layout in SecNameTable (PR #211027)

David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 09:03:45 PDT 2026


================
@@ -1298,9 +1300,51 @@ std::error_code SampleProfileReaderBinary::readNameTable() {
   return sampleprof_error::success;
 }
 
+std::error_code SampleProfileReaderExtBinaryBase::readNameTableSec(
+    bool IsMD5, bool FixedLengthMD5, bool IsEytzinger) {
+  if (IsEytzinger)
+    return readNameTableSecEytzinger(IsMD5, FixedLengthMD5);
+  return readNameTableSecLegacy(IsMD5, FixedLengthMD5);
+}
+
+std::error_code SampleProfileReaderExtBinaryBase::readNameTableSecEytzinger(
+    bool IsMD5, bool FixedLengthMD5) {
+  if (!IsMD5)
----------------
david-xl wrote:

better add debug assert too. 'malformed' does not carry enough information.

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


More information about the llvm-commits mailing list