From 363be89c7dde0b34ed43def90802abf045f66370 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 10 Aug 2023 18:44:17 -0700 Subject: [PATCH] [BOLT] Use static_assert (NFC) --- bolt/lib/Core/BinaryFunction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp index f6146d9749f595f..b92e5982efdad38 100644 --- a/bolt/lib/Core/BinaryFunction.cpp +++ b/bolt/lib/Core/BinaryFunction.cpp @@ -182,9 +182,9 @@ static SMLoc findDebugLineInformationForInstructionAt( // We use the pointer in SMLoc to store an instance of DebugLineTableRowRef, // which occupies 64 bits. Thus, we can only proceed if the struct fits into // the pointer itself. - assert(sizeof(decltype(SMLoc().getPointer())) >= - sizeof(DebugLineTableRowRef) && - "Cannot fit instruction debug line information into SMLoc's pointer"); + static_assert( + sizeof(decltype(SMLoc().getPointer())) >= sizeof(DebugLineTableRowRef), + "Cannot fit instruction debug line information into SMLoc's pointer"); SMLoc NullResult = DebugLineTableRowRef::NULL_ROW.toSMLoc(); uint32_t RowIndex = LineTable->lookupAddress(