aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/Rewrite/InclusionRewriter.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-03 15:20:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-03 15:20:48 +0000
commit551c698530debaae81139c7c76a29fb762793362 (patch)
tree547e0e59163c33f2142998714eb5f957e65d1a57 /lib/Frontend/Rewrite/InclusionRewriter.cpp
parent416ada0f75bab22b084a1776deb229cd4a669c4d (diff)
downloadsrc-551c698530debaae81139c7c76a29fb762793362.tar.gz
src-551c698530debaae81139c7c76a29fb762793362.zip
Vendor import of clang trunk r304659:vendor/clang/clang-trunk-r304659
Notes
Notes: svn path=/vendor/clang/dist/; revision=319525 svn path=/vendor/clang/clang-trunk-r304659/; revision=319526; tag=vendor/clang/clang-trunk-r304659
Diffstat (limited to 'lib/Frontend/Rewrite/InclusionRewriter.cpp')
-rw-r--r--lib/Frontend/Rewrite/InclusionRewriter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Frontend/Rewrite/InclusionRewriter.cpp b/lib/Frontend/Rewrite/InclusionRewriter.cpp
index d45cbc01df8c..3564cebba8a8 100644
--- a/lib/Frontend/Rewrite/InclusionRewriter.cpp
+++ b/lib/Frontend/Rewrite/InclusionRewriter.cpp
@@ -177,7 +177,9 @@ void InclusionRewriter::FileSkipped(const FileEntry &/*SkippedFile*/,
/// directives. It does not say whether the file has been included, but it
/// provides more information about the directive (hash location instead
/// of location inside the included file). It is assumed that the matching
-/// FileChanged() or FileSkipped() is called after this.
+/// FileChanged() or FileSkipped() is called after this (or neither is
+/// called if this #include results in an error or does not textually include
+/// anything).
void InclusionRewriter::InclusionDirective(SourceLocation HashLoc,
const Token &/*IncludeTok*/,
StringRef /*FileName*/,
@@ -187,9 +189,6 @@ void InclusionRewriter::InclusionDirective(SourceLocation HashLoc,
StringRef /*SearchPath*/,
StringRef /*RelativePath*/,
const Module *Imported) {
- assert(LastInclusionLocation.isInvalid() &&
- "Another inclusion directive was found before the previous one "
- "was processed");
if (Imported) {
auto P = ModuleIncludes.insert(
std::make_pair(HashLoc.getRawEncoding(), Imported));