summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/Basic/Module.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/include/clang/Basic/Module.h b/clang/include/clang/Basic/Module.h
index 3e5f05cfeda..1f7f71d54be 100644
--- a/clang/include/clang/Basic/Module.h
+++ b/clang/include/clang/Basic/Module.h
@@ -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;
}
OpenPOWER on IntegriCloud