From 49231c1f80803ae0f15963cce708cedf6e44088f Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 22 Jan 2021 23:25:05 -0800 Subject: [llvm] Use static_assert instead of assert (NFC) Identified with misc-static-assert. --- llvm/lib/Object/XCOFFObjectFile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp') 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(Data, reinterpret_cast(RelocAddr), NumRelocEntries * sizeof(XCOFFRelocation32)); -- cgit v1.1