[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 16 05:28:14 PST 2025
================
@@ -3118,18 +3120,27 @@ class AttrReader {
return Reader.readVersionTuple();
}
+ void skipInts(unsigned N) { Reader.skipInts(N); }
+
+ unsigned getCurrentIdx() { return Reader.getIdx(); }
+
OMPTraitInfo *readOMPTraitInfo() { return Reader.readOMPTraitInfo(); }
template <typename T> T *readDeclAs() { return Reader.readDeclAs<T>(); }
};
}
+/// Reads one attribute from the current stream position, advancing Idx.
Attr *ASTRecordReader::readAttr() {
AttrReader Record(*this);
auto V = Record.readInt();
if (!V)
return nullptr;
+ // Read and ignore the skip count, since attribute deserialization is not
+ // deferred on this pass.
+ Record.readInt();
----------------
ChuanqiXu9 wrote:
nit: skipInt();
https://github.com/llvm/llvm-project/pull/122726
More information about the cfe-commits
mailing list