[Index] Add an option to collect macros from preprocesor.

Summary: Also added unit tests for the index library; lit+c-index-test is painful...

Reviewers: ilya-biryukov

Reviewed By: ilya-biryukov

Subscribers: mgorny, cfe-commits

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

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