diff options
author | Kazu Hirata <kazu@google.com> | 2024-04-28 23:13:18 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2024-04-28 23:13:18 -0700 |
commit | dc7834b76c187bdf3b260c66445b750ed8d99507 (patch) | |
tree | fff00a0217c6cafae8b72b21ab1e98a566a4cfd4 /llvm/lib/ProfileData/InstrProfWriter.cpp | |
parent | b3c55b707110084a9f50a16aade34c3be6fa18da (diff) | |
download | llvm-dc7834b76c187bdf3b260c66445b750ed8d99507.zip llvm-dc7834b76c187bdf3b260c66445b750ed8d99507.tar.gz llvm-dc7834b76c187bdf3b260c66445b750ed8d99507.tar.bz2 |
[ProfileData] Use static_assert instead of assert (NFC)
Identified with misc-static-assert.
Diffstat (limited to 'llvm/lib/ProfileData/InstrProfWriter.cpp')
-rw-r--r-- | llvm/lib/ProfileData/InstrProfWriter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ProfileData/InstrProfWriter.cpp b/llvm/lib/ProfileData/InstrProfWriter.cpp index e1846fc..b61c59a 100644 --- a/llvm/lib/ProfileData/InstrProfWriter.cpp +++ b/llvm/lib/ProfileData/InstrProfWriter.cpp @@ -657,8 +657,8 @@ Error InstrProfWriter::writeImpl(ProfOStream &OS) { : IndexedInstrProf::ProfVersion::CurrentVersion; // The WritePrevVersion handling will either need to be removed or updated // if the version is advanced beyond 12. - assert(IndexedInstrProf::ProfVersion::CurrentVersion == - IndexedInstrProf::ProfVersion::Version12); + static_assert(IndexedInstrProf::ProfVersion::CurrentVersion == + IndexedInstrProf::ProfVersion::Version12); if (static_cast<bool>(ProfileKind & InstrProfKind::IRInstrumentation)) Header.Version |= VARIANT_MASK_IR_PROF; if (static_cast<bool>(ProfileKind & InstrProfKind::ContextSensitive)) |