[spirv] Stop translation if there are errors in previous stages (#632)
This commit is contained in:
Родитель
479f1cd9bf
Коммит
88cca461de
|
@ -186,6 +186,10 @@ SPIRVEmitter::SPIRVEmitter(CompilerInstance &ci,
|
|||
}
|
||||
|
||||
void SPIRVEmitter::HandleTranslationUnit(ASTContext &context) {
|
||||
// Stop translating if there are errors in previous compilation stages.
|
||||
if (context.getDiagnostics().hasErrorOccurred())
|
||||
return;
|
||||
|
||||
AddRequiredCapabilitiesForShaderModel();
|
||||
|
||||
// Addressing and memory model are required in a valid SPIR-V module.
|
||||
|
|
Загрузка…
Ссылка в новой задаче