diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-09-29 01:06:01 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-09-29 01:06:01 +0000 |
commit | eb788e9b49d55bbbc661f1a9db8a54525ecdd0bc (patch) | |
tree | 96022c21c14c28c65f589dc6bccb34028888a04e | |
parent | 0272622ce2061509b672f2afc11e91d83f802820 (diff) |
Add an assertion to make sure the implicitly imported module
is the same as the suggested one when looking up the include filename.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164872 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Lex/PPDirectives.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index ccbee631ae..5cff2fc48f 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -1481,6 +1481,8 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, 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) |