summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/Indexing.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-10-10 02:12:50 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-10-10 02:12:50 +0000
commit15f6b8ebe8139d6bfc2e3ae683fd5009253ee715 (patch)
tree46a3f437256b1780846cafb453c759c0049ffc83 /clang/tools/libclang/Indexing.cpp
parente445c7236e41d854736fec37c77c915661edb8cf (diff)
downloadbcm5719-llvm-15f6b8ebe8139d6bfc2e3ae683fd5009253ee715.tar.gz
bcm5719-llvm-15f6b8ebe8139d6bfc2e3ae683fd5009253ee715.zip
Disable the preprocessing record when indexing a source file
and modules are not enabled. llvm-svn: 165593
Diffstat (limited to 'clang/tools/libclang/Indexing.cpp')
-rw-r--r--clang/tools/libclang/Indexing.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp
index d2b0ab3c8dd..887b5fc1ee3 100644
--- a/clang/tools/libclang/Indexing.cpp
+++ b/clang/tools/libclang/Indexing.cpp
@@ -398,6 +398,9 @@ static void clang_indexSourceFile_Impl(void *UserData) {
PPOpts.DetailedRecord = true;
}
+ if (!requestedToGetTU && !CInvok->getLangOpts()->Modules)
+ PPOpts.DetailedRecord = false;
+
DiagnosticErrorTrap DiagTrap(*Diags);
bool Success = ASTUnit::LoadFromCompilerInvocationAction(CInvok.getPtr(), Diags,
IndexAction.get(),
OpenPOWER on IntegriCloud