]> granicus.if.org Git - clang/commitdiff
Allow ASTFile to be reset to null
authorBen Langmuir <blangmuir@apple.com>
Thu, 3 Apr 2014 00:14:16 +0000 (00:14 +0000)
committerBen Langmuir <blangmuir@apple.com>
Thu, 3 Apr 2014 00:14:16 +0000 (00:14 +0000)
Which we do in removeModules().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205491 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/Module.h

index 3e5f05cfeda90ee41cc60396de6299edda7c1a8e..1f7f71d54be6ae4061181cd45fc36135ad98d5f3 100644 (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;
   }