Disable the preprocessing record when indexing a source file
and modules are not enabled.

llvm-svn: 165593
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp
index d2b0ab3..887b5fc 100644
--- a/clang/tools/libclang/Indexing.cpp
+++ b/clang/tools/libclang/Indexing.cpp
@@ -398,6 +398,9 @@
     PPOpts.DetailedRecord = true;
   }
 
+  if (!requestedToGetTU && !CInvok->getLangOpts()->Modules)
+    PPOpts.DetailedRecord = false;
+
   DiagnosticErrorTrap DiagTrap(*Diags);
   bool Success = ASTUnit::LoadFromCompilerInvocationAction(CInvok.getPtr(), Diags,
                                                        IndexAction.get(),