Skip to content

Commit 822cfe5

Browse files
committed
Fix error handling for top function name option
1 parent 2dd2f65 commit 822cfe5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/BambuParameter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2534,6 +2534,10 @@ void BambuParameter::CheckParameters()
25342534

25352535
if(!isOption(OPT_top_functions_names))
25362536
{
2537+
if(getOption<HLSFlowStep_Type>(OPT_interface_type) == HLSFlowStep_Type::INFERRED_INTERFACE_GENERATION)
2538+
{
2539+
THROW_ERROR("Top function name must be specified when interface inferece is enabled.");
2540+
}
25372541
setOption(OPT_top_functions_names, "main");
25382542
THROW_WARNING("Top function name was not specified: main will be set as top");
25392543
}

0 commit comments

Comments
 (0)