Added error output to the preprocessor.
This patch distinguishes preprocessing errors with normal parsing errors and gives glslangValidator the ability to output preprocessing errors.
This commit is contained in:
parent
3a194f7ba4
commit
aae1ad8296
21 changed files with 205 additions and 135 deletions
|
|
@ -714,7 +714,13 @@ struct DoPreprocessing {
|
|||
outputStream << std::endl;
|
||||
*outputString = outputStream.str();
|
||||
|
||||
return true;
|
||||
bool success = true;
|
||||
if (parseContext.getNumErrors() > 0) {
|
||||
success = false;
|
||||
parseContext.infoSink.info.prefix(EPrefixError);
|
||||
parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors. No code generated.\n\n";
|
||||
}
|
||||
return success;
|
||||
}
|
||||
std::string* outputString;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue