================
@@ -4424,6 +4454,51 @@ void ASTReader::loadPendingDeclChain(Decl *FirstLocal, 
uint64_t LocalOffset) {
   ASTDeclReader::attachLatestDecl(CanonDecl, MostRecent);
 }
 
+void ASTReader::loadPreferredNameAttribute(
+    const PendingPreferredNameAttribute &PreferredNameAttribute) {
+  Decl *D = PreferredNameAttribute.D;
+  ModuleFile *M = getOwningModuleFile(D);
+
+  unsigned LocalDeclIndex = D->getGlobalID().getLocalDeclIndex();
----------------
ilya-biryukov wrote:

I thought we might need to store the indices separately, but having the 
declaration around we actually have enough to look up the bitstream position.

Nice trick, kudos for coming up with this!


https://github.com/llvm/llvm-project/pull/122726
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to