[PATCH] D134235: [clang-doc] Clean up *Info constructors.
Haowei Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 26 17:17:42 PDT 2022
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
More information about the cfe-commits
mailing list