Skip to content

Commit 55b2039

Browse files
committed
linking: Replace assert(...) by macros from invariant.h
While new/modified code shouldn't use assert(...) anyway, we had several existing uses of assert. Once we remove nonstd/optional.h, we will no longer implicitly include cassert, implying that a lot of #include <cassert> changes will be necessary. Instead of adding these, go all the way and fix the undesired uses of assert.
1 parent 04f25a1 commit 55b2039

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/linking/linking.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,7 @@ void linkingt::duplicate_type_symbol(
12151215
symbolt &old_symbol,
12161216
const symbolt &new_symbol)
12171217
{
1218-
assert(new_symbol.is_type);
1218+
PRECONDITION(new_symbol.is_type);
12191219

12201220
if(!old_symbol.is_type)
12211221
{
@@ -1310,7 +1310,7 @@ bool linkingt::needs_renaming_type(
13101310
const symbolt &old_symbol,
13111311
const symbolt &new_symbol)
13121312
{
1313-
assert(new_symbol.is_type);
1313+
PRECONDITION(new_symbol.is_type);
13141314

13151315
if(!old_symbol.is_type)
13161316
return true;

0 commit comments

Comments
 (0)