r205491 - Allow ASTFile to be reset to null

Ben Langmuir blangmuir at apple.com
Wed Apr 2 17:14:16 PDT 2014


Author: benlangmuir
Date: Wed Apr  2 19:14:16 2014
New Revision: 205491

URL: http://llvm.org/viewvc/llvm-project?rev=205491&view=rev
Log:
Allow ASTFile to be reset to null

Which we do in removeModules().

Modified:
    cfe/trunk/include/clang/Basic/Module.h

Modified: cfe/trunk/include/clang/Basic/Module.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Module.h?rev=205491&r1=205490&r2=205491&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Module.h (original)
+++ cfe/trunk/include/clang/Basic/Module.h Wed Apr  2 19:14:16 2014
@@ -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;
   }
 





More information about the cfe-commits mailing list