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:
Andrew Woloszyn 2015-06-24 17:00:46 -04:00
parent 3a194f7ba4
commit aae1ad8296
21 changed files with 205 additions and 135 deletions

View file

@ -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;
};