diff options
author | Kazu Hirata <kazu@google.com> | 2021-01-22 23:25:05 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-01-22 23:25:05 -0800 |
commit | 49231c1f80803ae0f15963cce708cedf6e44088f (patch) | |
tree | 57ae45555f6ab4f3bd3d6110b2927495ad35ff68 /llvm/lib/Object/XCOFFObjectFile.cpp | |
parent | 5f843b2dd2ee1f36162a861ef02b2b4bc4dc79b7 (diff) | |
download | llvm-49231c1f80803ae0f15963cce708cedf6e44088f.zip llvm-49231c1f80803ae0f15963cce708cedf6e44088f.tar.gz llvm-49231c1f80803ae0f15963cce708cedf6e44088f.tar.bz2 |
[llvm] Use static_assert instead of assert (NFC)
Identified with misc-static-assert.
Diffstat (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/XCOFFObjectFile.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp index b0d772b..a16a458 100644 --- a/llvm/lib/Object/XCOFFObjectFile.cpp +++ b/llvm/lib/Object/XCOFFObjectFile.cpp @@ -655,7 +655,8 @@ XCOFFObjectFile::relocations(const XCOFFSectionHeader32 &Sec) const { uint32_t NumRelocEntries = NumRelocEntriesOrErr.get(); - assert(sizeof(XCOFFRelocation32) == XCOFF::RelocationSerializationSize32); + static_assert( + sizeof(XCOFFRelocation32) == XCOFF::RelocationSerializationSize32, ""); auto RelocationOrErr = getObject<XCOFFRelocation32>(Data, reinterpret_cast<void *>(RelocAddr), NumRelocEntries * sizeof(XCOFFRelocation32)); |