From: Argyrios Kyrtzidis Date: Wed, 10 Oct 2012 02:12:50 +0000 (+0000) Subject: Disable the preprocessing record when indexing a source file X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93cd6e8e17a40ee6fe1f17ab74d841e1f4fe9351;p=clang 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 --- 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(),