[PATCH] D40581: COFF: Simplify construction of safe SEH table. NFCI.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 14:46:04 PST 2017


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM. Nice!



================
Comment at: lld/COFF/Writer.cpp:802
       return;
-    for (Symbol *B : File->SEHandlers) {
-      // Make sure the handler is still live.
-      if (B->isLive())
-        Handlers.insert(cast<Defined>(B));
-    }
+    for (ulittle32_t I : File->SXData)
+      if (Symbol *B = File->getSymbol(I))
----------------
You are creating a copy of ulittle32_t from ulittle32_t. I think it makes more sense if you change the type of I to `ulittle32_t &` or just `uint32_t`.


https://reviews.llvm.org/D40581





More information about the llvm-commits mailing list