Parse compile commands lazily in InterpolatingCompilationDatabase
authorIlya Biryukov <ibiryukov@google.com>
Tue, 28 Aug 2018 16:15:56 +0000 (16:15 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Tue, 28 Aug 2018 16:15:56 +0000 (16:15 +0000)
commit5167e2d1afc5a6c89cbbfea4243864b58a8ce37a
treea6142d04b9abae6f18539759857f3c561ce0246b
parent6a92b5e1e2a608cfb726bdcd5b043aee2cc350c5
Parse compile commands lazily in InterpolatingCompilationDatabase

Summary:
This greatly reduces the time to read 'compile_commands.json'.
For Chromium on my machine it's now 0.7 seconds vs 30 seconds before the
change.

Reviewers: sammccall, jfb

Reviewed By: sammccall

Subscribers: mgrang, jfb, cfe-commits

Differential Revision: https://reviews.llvm.org/D51314

llvm-svn: 340838
clang/lib/Tooling/InterpolatingCompilationDatabase.cpp
clang/unittests/Tooling/CompilationDatabaseTest.cpp