[lld] 315554e - [ELF] Unify sizeof(InputSection) limits for _WIN32 and others
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 26 23:02:30 PST 2021
Author: Fangrui Song
Date: 2021-12-26T23:02:24-08:00
New Revision: 315554e873a583a4b9297e72256f87ff13539993
URL: https://github.com/llvm/llvm-project/commit/315554e873a583a4b9297e72256f87ff13539993
DIFF: https://github.com/llvm/llvm-project/commit/315554e873a583a4b9297e72256f87ff13539993.diff
LOG: [ELF] Unify sizeof(InputSection) limits for _WIN32 and others
Windows sizeof(InputSection) seems to match non-Windows now.
Added:
Modified:
lld/ELF/InputSection.h
Removed:
################################################################################
diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h
index 32c9ed26c1fd..016f2523b4a8 100644
--- a/lld/ELF/InputSection.h
+++ b/lld/ELF/InputSection.h
@@ -379,11 +379,7 @@ class InputSection : public InputSectionBase {
template <class ELFT> void copyShtGroup(uint8_t *buf);
};
-#ifdef _WIN32
-static_assert(sizeof(InputSection) <= 168, "InputSection is too big");
-#else
static_assert(sizeof(InputSection) <= 160, "InputSection is too big");
-#endif
inline bool isDebugSection(const InputSectionBase &sec) {
return (sec.flags & llvm::ELF::SHF_ALLOC) == 0 &&
More information about the llvm-commits
mailing list