Skip to content

Commit dc7834b

Browse files
[ProfileData] Use static_assert instead of assert (NFC)
Identified with misc-static-assert.
1 parent b3c55b7 commit dc7834b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/ProfileData/InstrProfWriter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,8 @@ Error InstrProfWriter::writeImpl(ProfOStream &OS) {
657657
: IndexedInstrProf::ProfVersion::CurrentVersion;
658658
// The WritePrevVersion handling will either need to be removed or updated
659659
// if the version is advanced beyond 12.
660-
assert(IndexedInstrProf::ProfVersion::CurrentVersion ==
661-
IndexedInstrProf::ProfVersion::Version12);
660+
static_assert(IndexedInstrProf::ProfVersion::CurrentVersion ==
661+
IndexedInstrProf::ProfVersion::Version12);
662662
if (static_cast<bool>(ProfileKind & InstrProfKind::IRInstrumentation))
663663
Header.Version |= VARIANT_MASK_IR_PROF;
664664
if (static_cast<bool>(ProfileKind & InstrProfKind::ContextSensitive))

0 commit comments

Comments
 (0)