[PATCH] D103113: [lld-macho] Deduplicate fixed-width literals
Greg McGary via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 8 17:01:35 PDT 2021
gkm accepted this revision.
gkm added a comment.
This revision is now accepted and ready to land.
This was very pleasant to read & review!
================
Comment at: lld/MachO/SyntheticSections.cpp:1129-1135
+ case S_4BYTE_LITERALS: {
+ for (size_t i = 0, e = isec->data.size() / 4; i < e; ++i) {
+ uint32_t value = *reinterpret_cast<const uint32_t *>(buf + i * 4);
+ literal4Map.emplace(value, literal4Map.size());
+ }
+ break;
+ }
----------------
What is the purpose of the braces around these `case` bodies?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103113/new/
https://reviews.llvm.org/D103113
More information about the llvm-commits
mailing list