[PATCH] D50439: [Tooling] Switch JSONCompilationDatabase to use JSON parser.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 8 05:28:53 PDT 2018


sammccall created this revision.
sammccall added reviewers: ioeric, klimek.
Herald added a subscriber: cfe-commits.

Rather than hold all the JSON source in memory, as well as the YAML structures
needed to index into it, we parse eagerly into CompileCommand structures, which
simplifies the implementation a lot.

Possibly at the cost of performance/memory usage, need to measure that.
(I'd expect that eager parsing with string deduplication would be fine at least)


Repository:
  rC Clang

https://reviews.llvm.org/D50439

Files:
  include/clang/Tooling/JSONCompilationDatabase.h
  lib/Tooling/JSONCompilationDatabase.cpp
  test/Index/skip-parsed-bodies/compile_commands.json
  test/Index/skip-parsed-bodies/compile_commands.test
  test/Index/skip-parsed-bodies/lit.local.cfg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50439.159689.patch
Type: text/x-patch
Size: 18617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180808/58c70cf5/attachment-0001.bin>


More information about the cfe-commits mailing list