[PATCH] D95809: [lld-macho] Emit personalities in compact unwind

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 14:16:36 PST 2021


int3 marked 2 inline comments as done.
int3 added inline comments.


================
Comment at: lld/MachO/UnwindInfoSection.cpp:201
   cuPtrVector.reserve(cuCount);
-  for (const CompactUnwindEntry64 &cuEntry : cuVector)
+  for (CompactUnwindEntry64 &cuEntry : cuVector)
     cuPtrVector.emplace_back(&cuEntry);
----------------
int3 wrote:
> clayborg wrote:
> > We don't seem to modify the "cuEntry" in the loop below, can be put the "const" back and revert this change?
> oops yeah leftover change
o wait, this is actually necessary. That's because I am now modifying the CU entries that I get from iterating over cuPtrVector, so they cannot be const, and since this loop populates the cuPtrVector, the `cuEntry`s cannot be `const` here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95809/new/

https://reviews.llvm.org/D95809



More information about the llvm-commits mailing list