aboutsummaryrefslogtreecommitdiff
path: root/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
commit93cd6e8e17a40ee6fe1f17ab74d841e1f4fe9351 (patch)
tree0cc91ef5f501b762546b76f0f56fccdda944d75d /tools/libclang/Indexing.cpp
parent62288edde26ff4af9fc079c979a0e1bdc577ce9d (diff)
Disable the preprocessing record when indexing a source file
and modules are not enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165593 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/Indexing.cpp')
-rw-r--r--tools/libclang/Indexing.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/libclang/Indexing.cpp b/tools/libclang/Indexing.cpp
index d2b0ab3c8d..887b5fc1ee 100644
--- a/tools/libclang/Indexing.cpp
+++ b/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(),