[lld] [CGData][lld-macho] Merge CG Data by LLD (PR #112674)

Kyungwoo Lee via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 08:58:05 PST 2024


================
@@ -1337,10 +1338,25 @@ static void codegenDataGenerate() {
       // Merge it to the global hash tree.
       globalOutlineRecord.merge(localOutlineRecord);
     }
+    if (isec->getSegName() == segment_names::data &&
+        isec->getName() == section_names::functionmap) {
+      // Read stable functions from each section.
+      StableFunctionMapRecord localMergeRecord;
+      auto *data = isec->data.data();
----------------
kyulee-com wrote:

Yes because of `void deserialize(const unsigned char *&Ptr)` which modifies/advances the pointer. I added a comment above.

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


More information about the llvm-commits mailing list