[cfe-commits] r164872 - /cfe/trunk/lib/Lex/PPDirectives.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Fri Sep 28 18:06:02 PDT 2012


Author: akirtzidis
Date: Fri Sep 28 20:06:01 2012
New Revision: 164872

URL: http://llvm.org/viewvc/llvm-project?rev=164872&view=rev
Log:
Add an assertion to make sure the implicitly imported module
is the same as the suggested one when looking up the include filename.

Modified:
    cfe/trunk/lib/Lex/PPDirectives.cpp

Modified: cfe/trunk/lib/Lex/PPDirectives.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=164872&r1=164871&r2=164872&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPDirectives.cpp (original)
+++ cfe/trunk/lib/Lex/PPDirectives.cpp Fri Sep 28 20:06:01 2012
@@ -1481,6 +1481,8 @@
     Module *Imported
       = TheModuleLoader.loadModule(IncludeTok.getLocation(), Path, Visibility,
                                    /*IsIncludeDirective=*/true);
+    assert((Imported == 0 || Imported == SuggestedModule) &&
+           "the imported module is different than the suggested one");
     
     // If this header isn't part of the module we're building, we're done.
     if (!BuildingImportedModule && Imported)





More information about the cfe-commits mailing list