================ @@ -7650,6 +7647,16 @@ ModuleFile *ASTReader::getOwningModuleFile(GlobalDeclID ID) const { return &getModuleManager()[ModuleFileIndex - 1]; } +ModuleFile *ASTReader::getOwningModuleFile(TypeID ID) const { + if (ID < NUM_PREDEF_TYPE_IDS) + return nullptr; + + uint64_t ModuleFileIndex = ID >> 32; ---------------- ilya-biryukov wrote:
NIT: maybe we could define helper functions to extract the `ModuleFileIndex`, type index and qualifiers from `TypeID`? It would help the readability a bit (it's not too hard to remember how to do these operations, but it's a bit of code duplication and definitely makes reading a bit more involved) https://github.com/llvm/llvm-project/pull/92511 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits