This is an archive of the discontinued LLVM Phabricator instance.

Add a tool executor that runs actions on all TUs in the compilation database.
ClosedPublic

Authored by ioeric on Jan 4 2018, 9:20 AM.

Diff Detail

Repository
rC Clang

Event Timeline

ioeric created this revision.Jan 4 2018, 9:20 AM
hokein accepted this revision.Jan 5 2018, 2:01 AM

LGTM.

include/clang/Tooling/AllTUsExecution.h
35

consider using a default parameter (= 0)? use the llvm::hardware_concurrency by default, and you don't have to pass the 0 in the unittest.

lib/Tooling/AllTUsExecution.cpp
158

also document all results are stored in memory, the result size should be suitable to be loaded in memory.

unittests/Tooling/ExecutionTest.cpp
264

nit: ++i.

This revision is now accepted and ready to land.Jan 5 2018, 2:01 AM
ioeric updated this revision to Diff 128719.Jan 5 2018, 2:32 AM
ioeric marked 2 inline comments as done.

Address review comments.

include/clang/Tooling/AllTUsExecution.h
35

The constructors aren't usually used directly (outside of unit tests; interface design shouldn't be driven by tests), so I didn't use default parameters, since they are usually disliked...

unittests/Tooling/ExecutionTest.cpp
264

Done. (I don't think this matters for simple types tho...)

This revision was automatically updated to reflect the committed changes.