summaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-08-05 20:26:17 +0000
committerDaniel Jasper <djasper@google.com>2013-08-05 20:26:17 +0000
commit056ec12ca14ee5014ea49786f719ceaa299a7e19 (patch)
tree3e4ecfd463230a6363dc1117a28a2687018d7bc3 /lib/Lex/Preprocessor.cpp
parentde56bb733f6934080ed8b1a7db3ce2ba1852e91e (diff)
downloadclang-056ec12ca14ee5014ea49786f719ceaa299a7e19.tar.gz
clang-056ec12ca14ee5014ea49786f719ceaa299a7e19.tar.bz2
clang-056ec12ca14ee5014ea49786f719ceaa299a7e19.tar.xz
Add option to disable module loading.
This patch was created by Lawrence Crowl and reviewed in: http://llvm-reviews.chandlerc.com/D963 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187738 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index 66f23f1018..035f751d0d 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -734,7 +734,7 @@ void Preprocessor::LexAfterModuleImport(Token &Result) {
}
// If we have a non-empty module path, load the named module.
- if (!ModuleImportPath.empty()) {
+ if (!ModuleImportPath.empty() && getLangOpts().Modules) {
Module *Imported = TheModuleLoader.loadModule(ModuleImportLoc,
ModuleImportPath,
Module::MacrosVisible,