[PATCH] D63570: [COFF] Implement /safeseh:no and check @feat.00 flags by default

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 26 04:20:38 PDT 2019


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

Thanks for doing this1



================
Comment at: lld/COFF/Driver.cpp:1765
-  // Handle /safeseh.
-  if (Args.hasFlag(OPT_safeseh, OPT_safeseh_no, false)) {
-    for (ObjFile *File : ObjFile::Instances)
----------------
Huh, why was the default here false?


================
Comment at: lld/COFF/Writer.cpp:1431
+      // safeseh flag.
+      SetNoSEHCharacteristic = false;
+      continue;
----------------
mstorsjo wrote:
> Changing this flag for writing different output, right after flagging an error (which will, eventually, abort the writing?) feels a bit weird, but I guess it's good for completeness.
I agree, I would've expected an early return instead. (e.g. the `if (ErrorCount) return` after the loop that the lhs has)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63570





More information about the llvm-commits mailing list