[PATCH] D107533: Handle encoding personalities of same names but different kinds.

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 9 18:04:42 PDT 2021


oontvoo marked an inline comment as done.
oontvoo added inline comments.


================
Comment at: lld/MachO/UnwindInfoSection.cpp:238
+            oldToNew[iSym->gotIndex + 1] = ds->gotIndex + 1;
+            personality = const_cast<Symbol *>(s);
+          }
----------------
thevinster wrote:
> Probably it's just my lack of knowledge here, but is this line useful? It eventually gets overridden in the start of the loop on L228 right?
No, it's a reference to the entry into the map. I guess it would've been clearer to have written:

```
Line: 228: auto it = personalityTable.find(....);
< .... >

HERE: it->second = s; 

```


================
Comment at: lld/MachO/UnwindInfoSection.cpp:402
     auto it = find(personalities, cu->personality);
-    uint32_t personalityIndex; // 1-based index
+    uint32_t personalityIndex = 0; // 1-based index
+
----------------
thevinster wrote:
> Why does this need to be initialized to 0? Isn't it always going to be eventually defined below?
sorry - spurious change . 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107533



More information about the llvm-commits mailing list