[PATCH] D134235: [clang-doc] Clean up *Info constructors.

Brett Wilson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 26 19:02:26 PDT 2022


brettw added inline comments.


================
Comment at: clang-tools-extra/clang-doc/BitcodeReader.cpp:336
                         Reference *I, FieldId &F) {
   switch (ID) {
   case REFERENCE_USR:
----------------
haowei wrote:
> This block ID came from L582, which read from a bitcode file when `BI_REFERENCE_BLOCK_ID` is encountered. I am not familiar with the content of an arbitrary bitcode file. But after your patch, if this block ID is encountered, it will result in an error (a behavior change).
> 
> It looks like `REFERENCE_IS_IN_GLOBAL_NAMESPACE` is only defined in in clang-doc and not part of LLVM's bitcode header. So it looks like it is not a standardized ID to me. Could you confirm it?
> 
> If `REFERENCE_IS_IN_GLOBAL_NAMESPACE` only presents in bitcode file generated from BitcodeWriter from clang-doc and we are not expecting to provide compatibility to an arbitrary bitcode generated from elsewhere, I am OK with deleting this field (I still don't think this is the right approach to do but I don't have a strong opinion on this either). 
Correct, this whole bitcode system is used only to communicate within clang-doc between threads (!) (I think it should be entirely removed but I don't have the time for that). It is never serialized to a file and is not shared with any other component.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134235/new/

https://reviews.llvm.org/D134235



More information about the cfe-commits mailing list