[PATCH] D70606: LLD: CET shadow stack support on Windows

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 27 19:41:21 PST 2019


ruiu added inline comments.


================
Comment at: lld/COFF/Writer.cpp:175-177
+  size_t getSize() const override {
+    return sizeof(Characteristics);
+  }
----------------
penzn wrote:
> ruiu wrote:
> > Let's just return 4.
> Just curious, why this way - easier to read?
Yeah. If we return 4 the size of this record is obviously 4 bytes. Since this class is so small, I don't think that we need any abstraction to hide the magic number.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70606





More information about the llvm-commits mailing list