[PATCH] D124746: Make BinaryStreamWriter::padToAlignment write blocks vs bytes.

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 15:53:20 PDT 2022


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

Seems ok.



================
Comment at: llvm/lib/Support/BinaryStreamWriter.cpp:100
+  const uint64_t ZerosSize = 64;
+  char Zeros[ZerosSize];
+  std::memset(Zeros, 0, ZerosSize);
----------------
nit: If you do

```
constexpr uint64_t ZerosSize = 64;
constexpr char Zeros[ZerosSize] = {};
```

then I think you don't need the memset call (and it's all constant zeroed data).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124746



More information about the llvm-commits mailing list