forked from OSchip/llvm-project
Add check in the driver to see if a serialized AST file has been successfully
deserialized. llvm-svn: 45006
This commit is contained in:
parent
685dc9b56e
commit
31dcdb312b
|
@ -984,7 +984,14 @@ static void ProcessSerializedFile(const std::string& InFile, Diagnostic& Diag,
|
|||
exit (1);
|
||||
}
|
||||
|
||||
TranslationUnit* TU = TranslationUnit::ReadBitcodeFile(Filename,FileMgr);
|
||||
TranslationUnit* TU = TranslationUnit::ReadBitcodeFile(Filename,FileMgr);
|
||||
|
||||
if (!TU) {
|
||||
fprintf(stderr, "error: file '%s' could not be deserialized\n",
|
||||
InFile.c_str());
|
||||
exit (1);
|
||||
}
|
||||
|
||||
ASTConsumer* Consumer = CreateASTConsumer(InFile,Diag,
|
||||
FileMgr,TU->getLangOpts());
|
||||
|
||||
|
|
Loading…
Reference in New Issue