]> granicus.if.org Git - clang/commitdiff
Disable the preprocessing record when indexing a source file
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 10 Oct 2012 02:12:50 +0000 (02:12 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 10 Oct 2012 02:12:50 +0000 (02:12 +0000)
and modules are not enabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165593 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/Indexing.cpp

index d2b0ab3c8ddb12ea6e65e9f0796b09b7d4482628..887b5fc1ee3b1076f7eabc77ed052e5d31a6c839 100644 (file)
@@ -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(),