haowei added inline comments.

================
Comment at: clang-tools-extra/clang-doc/BitcodeReader.cpp:336
                         Reference *I, FieldId &F) {
   switch (ID) {
   case REFERENCE_USR:
----------------
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). 


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

https://reviews.llvm.org/D134235

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to