[lld] bccdf91 - Revert "[lld-macho] Work around odr-use of const non-inline static data member to fix -O0 build after D128298"
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 6 16:44:19 PDT 2022
Author: Fangrui Song
Date: 2022-08-06T16:44:14-07:00
New Revision: bccdf9197b6d647ccf5bbc86b25e29278aebc4e5
URL: https://github.com/llvm/llvm-project/commit/bccdf9197b6d647ccf5bbc86b25e29278aebc4e5
DIFF: https://github.com/llvm/llvm-project/commit/bccdf9197b6d647ccf5bbc86b25e29278aebc4e5.diff
LOG: Revert "[lld-macho] Work around odr-use of const non-inline static data member to fix -O0 build after D128298"
This reverts commit 20b2d3260d4a1878ca2a37cee6ee335a21a12d0f.
The workaround is no longer needed for C++17.
Added:
Modified:
lld/MachO/SyntheticSections.cpp
Removed:
################################################################################
diff --git a/lld/MachO/SyntheticSections.cpp b/lld/MachO/SyntheticSections.cpp
index 8e7ca520336cc..e8a31f904b440 100644
--- a/lld/MachO/SyntheticSections.cpp
+++ b/lld/MachO/SyntheticSections.cpp
@@ -1307,8 +1307,7 @@ void CodeSignatureSection::writeHashes(uint8_t *buf) const {
uint8_t *hashes = buf + fileOff + allHeadersSize;
parallelFor(0, getBlockCount(), [&](size_t i) {
sha256(buf + i * blockSize,
- std::min(static_cast<size_t>(fileOff - i * blockSize),
- static_cast<size_t>(blockSize)),
+ std::min(static_cast<size_t>(fileOff - i * blockSize), blockSize),
hashes + i * hashSize);
});
#if defined(__APPLE__)
More information about the llvm-commits
mailing list