Allow ASTFile to be reset to null

Which we do in removeModules().

llvm-svn: 205491
This commit is contained in:
Ben Langmuir
2014-04-03 00:14:16 +00:00
parent f819851b65
commit 2b81e8564a

View File

@@ -341,7 +341,8 @@ public:
/// \brief Set the serialized AST file for the top-level module of this module.
void setASTFile(const FileEntry *File) {
assert((getASTFile() == 0 || getASTFile() == File) && "file path changed");
assert((File == 0 || getASTFile() == 0 || getASTFile() == File) &&
"file path changed");
getTopLevelModule()->ASTFile = File;
}