Generalize "main" to a settable entry point name.
This commit is contained in:
parent
6cc7674b6d
commit
4d65ee31a6
8 changed files with 38 additions and 8 deletions
|
|
@ -975,7 +975,7 @@ TIntermAggregate* TParseContext::handleFunctionDefinition(const TSourceLoc& loc,
|
|||
//
|
||||
// Raise error message if main function takes any parameters or returns anything other than void
|
||||
//
|
||||
if (function.getName() == "main") {
|
||||
if (function.getName() == intermediate.getEntryPoint()) {
|
||||
if (function.getParamCount() > 0)
|
||||
error(loc, "function cannot take any parameter(s)", function.getName().c_str(), "");
|
||||
if (function.getType().getBasicType() != EbtVoid)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue