Skip to content

Commit

Permalink
[BOLT] Use static_assert (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Aug 11, 2023
1 parent 3c03a15 commit 363be89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bolt/lib/Core/BinaryFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 363be89

Please sign in to comment.