summaryrefslogtreecommitdiff
path: root/lib/Frontend/Rewrite/InclusionRewriter.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:44:14 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:44:14 +0000
commit2b6b257f4e5503a7a2675bdb8735693db769f75c (patch)
treee85e046ae7003fe3bcc8b5454cd0fa3f7407b470 /lib/Frontend/Rewrite/InclusionRewriter.cpp
parentb4348ed0b7e90c0831b925fbee00b5f179a99796 (diff)
Notes
Diffstat (limited to 'lib/Frontend/Rewrite/InclusionRewriter.cpp')
-rw-r--r--lib/Frontend/Rewrite/InclusionRewriter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Frontend/Rewrite/InclusionRewriter.cpp b/lib/Frontend/Rewrite/InclusionRewriter.cpp
index ca8226251fd9..b761c34fcbde 100644
--- a/lib/Frontend/Rewrite/InclusionRewriter.cpp
+++ b/lib/Frontend/Rewrite/InclusionRewriter.cpp
@@ -450,7 +450,9 @@ bool InclusionRewriter::Process(FileID FileId,
WriteLineInfo(FileName, Line - 1, FileType, "");
StringRef LineInfoExtra;
SourceLocation Loc = HashToken.getLocation();
- if (const Module *Mod = FindModuleAtLocation(Loc))
+ if (const Module *Mod = PP.getLangOpts().ObjC2
+ ? FindModuleAtLocation(Loc)
+ : nullptr)
WriteImplicitModuleImport(Mod);
else if (const IncludedFile *Inc = FindIncludeAtLocation(Loc)) {
// include and recursively process the file