[PATCH] D64384: [WIP] Index-while-building

Jan Korous via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 20:22:06 PDT 2019


jkorous created this revision.
jkorous added reviewers: gribozavr, kadircet, ilya-biryukov, sammccall, akyrtzi, benlangmuir, nathawes, arphaman.
Herald added subscribers: llvm-commits, tschuett, jfb, dexonsmith, mgrang, MaskRay, kbarton, mgorny, nemanjai.
Herald added a project: LLVM.

Preview of index-while-building refactoring.

All major changes to the part of the code that produces index data have been done and I'd like to get some early feedback before I move on to fixing the small stuff.

Please don't waste your time commenting on details (comments, header includes, formatting, names, ...). I realize that these aspects of the code are still lacking.

The entry points are `EmitIndexAction` and `GenerateIndexAction`. Files of interests in general are these:

- clang/include/clang/Index/DeclOccurrenceCollector.h
- clang/include/clang/Index/EmitIndexAction.h
- clang/include/clang/Index/GenerateIndexAction.h
- clang/include/clang/Index/IndexAction.h
- clang/include/clang/Index/IndexRecordWriter.h
- clang/include/clang/Index/IndexUnitWriter.h
- clang/lib/Index/DeclOccurrenceCollector.cpp
- clang/lib/Index/EmitIndexAction.cpp
- clang/lib/Index/FileIndexRecord.cpp
- clang/lib/Index/FileIndexRecord.h
- clang/lib/Index/GenerateIndexAction.cpp
- clang/lib/Index/IndexAction.cpp
- clang/lib/Index/IndexRecordWriter.cpp
- clang/lib/Index/IndexUnitWriter.cpp

The rest of the code is attached just to provide context.

Tests are missing as we use small end-to-end tests that depend on index deserialization etc which is intentionally missing from the preview to keep the scope of the patch clear.

Also - I derived this from the swift-clang version of the code in order to have a set of tests available during incremental refactoring. This is just a very crude "port" - please ignore swift specific values in enums etc.


https://reviews.llvm.org/D64384

Files:
  clang/include/clang/Index/CodegenNameGenerator.h
  clang/include/clang/Index/DeclOccurrenceCollector.h
  clang/include/clang/Index/EmitIndexAction.h
  clang/include/clang/Index/GenerateIndexAction.h
  clang/include/clang/Index/IndexAction.h
  clang/include/clang/Index/IndexDataConsumer.h
  clang/include/clang/Index/IndexDataFormat.h
  clang/include/clang/Index/IndexDataStore.h
  clang/include/clang/Index/IndexOptions.h
  clang/include/clang/Index/IndexRecordWriter.h
  clang/include/clang/Index/IndexUnitWriter.h
  clang/include/clang/Index/IndexingContext.h
  clang/include/clang/Index/PathStorage.h
  clang/include/indexstore/Conversions.h
  clang/include/indexstore/IndexStoreCXX.h
  clang/include/indexstore/indexstore.h
  clang/lib/Index/BitstreamUtil.cpp
  clang/lib/Index/BitstreamUtil.h
  clang/lib/Index/CMakeLists.txt
  clang/lib/Index/CodegenNameGenerator.cpp
  clang/lib/Index/DeclOccurrenceCollector.cpp
  clang/lib/Index/EmitIndexAction.cpp
  clang/lib/Index/FSUtil.h
  clang/lib/Index/FileIndexRecord.cpp
  clang/lib/Index/FileIndexRecord.h
  clang/lib/Index/GenerateIndexAction.cpp
  clang/lib/Index/IndexAction.cpp
  clang/lib/Index/IndexOptions.cpp
  clang/lib/Index/IndexPPCallbacks.h
  clang/lib/Index/IndexRecordWriter.cpp
  clang/lib/Index/IndexUnitWriter.cpp
  clang/lib/Index/IndexingContext.cpp
  clang/lib/Index/PathStorage.cpp
  clang/lib/IndexDataStore/CMakeLists.txt
  clang/lib/IndexDataStore/IndexDataStore.cpp
  llvm/include/llvm/ADT/ArrayRef.h
  llvm/include/llvm/Bitstream/BitCodes.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64384.208580.patch
Type: text/x-patch
Size: 194981 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190709/cbab258b/attachment-0001.bin>


More information about the llvm-commits mailing list