@@ -345,8 +345,7 @@ main_function_resultt get_main_symbol(
345
345
message.error () << " main symbol resolution failed: "
346
346
<< error_message << messaget::eom;
347
347
res.main_function =symbol;
348
- res.error_found =true ;
349
- res.stop_convert =true ;
348
+ res.status =main_function_resultt::Error;
350
349
return res;
351
350
}
352
351
@@ -364,8 +363,7 @@ main_function_resultt get_main_symbol(
364
363
message.error () << " main method `" << main_class
365
364
<< " ' has no body" << messaget::eom;
366
365
res.main_function =symbol;
367
- res.error_found =true ;
368
- res.stop_convert =true ;
366
+ res.status =main_function_resultt::Error;
369
367
return res;
370
368
}
371
369
}
@@ -378,8 +376,7 @@ main_function_resultt get_main_symbol(
378
376
if (main_class.empty ())
379
377
{
380
378
res.main_function =symbol;
381
- res.error_found =false ;
382
- res.stop_convert =true ;
379
+ res.status =main_function_resultt::NotFound;
383
380
return res; // silently ignore
384
381
}
385
382
@@ -405,8 +402,7 @@ main_function_resultt get_main_symbol(
405
402
{
406
403
// Not found, silently ignore
407
404
res.main_function =symbol;
408
- res.error_found =false ;
409
- res.stop_convert =true ;
405
+ res.status =main_function_resultt::NotFound;
410
406
return res;
411
407
}
412
408
@@ -415,8 +411,7 @@ main_function_resultt get_main_symbol(
415
411
message.error () << " main method in `" << main_class
416
412
<< " ' is ambiguous" << messaget::eom;
417
413
res.main_function =symbolt ();
418
- res.error_found =true ;
419
- res.stop_convert =true ;
414
+ res.status =main_function_resultt::Error;
420
415
return res; // give up with error, no main
421
416
}
422
417
@@ -429,16 +424,15 @@ main_function_resultt get_main_symbol(
429
424
message.error () << " main method `" << main_class
430
425
<< " ' has no body" << messaget::eom;
431
426
res.main_function =symbol;
432
- res.error_found =true ;
433
- res.stop_convert =true ;
427
+ res.status =main_function_resultt::Error;
434
428
return res; // give up with error
435
429
}
436
430
}
437
431
432
+ // Return found function
438
433
res.main_function =symbol;
439
- res.error_found =false ;
440
- res.stop_convert =false ;
441
- return res; // give up with error
434
+ res.status =main_function_resultt::Success;
435
+ return res;
442
436
}
443
437
444
438
// / Given the \p symbol_table and the \p main_class to test, this function
@@ -491,8 +485,8 @@ bool java_entry_point(
491
485
messaget message (message_handler);
492
486
main_function_resultt res=
493
487
get_main_symbol (symbol_table, main_class, message_handler);
494
- if (res.stop_convert )
495
- return res. stop_convert ;
488
+ if (res.status !=main_function_resultt::Success )
489
+ return true ;
496
490
symbolt symbol=res.main_function ;
497
491
498
492
assert (!symbol.value .is_nil ());
0 commit comments