summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-09-29 01:06:01 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-09-29 01:06:01 +0000
commit051b4432429c869a3505eaa74cb3cd4802ae8909 (patch)
tree8357e439a1ee8559d5ad2695b30f03bad14310c1 /clang/lib
parent6d39077fe7f42c51d3c5b76feb91b82d99e4206c (diff)
downloadbcm5719-llvm-051b4432429c869a3505eaa74cb3cd4802ae8909.tar.gz
bcm5719-llvm-051b4432429c869a3505eaa74cb3cd4802ae8909.zip
Add an assertion to make sure the implicitly imported module
is the same as the suggested one when looking up the include filename. llvm-svn: 164872
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Lex/PPDirectives.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index ccbee631ae2..5cff2fc48f3 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/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)
OpenPOWER on IntegriCloud