================ @@ -1660,7 +1660,7 @@ class Record { // this record. SmallVector<SMLoc, 4> Locs; SmallVector<SMLoc, 0> ForwardDeclarationLocs; - SmallVector<SMRange, 0> ReferenceLocs; + mutable SmallVector<SMRange, 0> ReferenceLocs; ---------------- jurahul wrote:
This was needed in `ParseIDValue`: ``` if (Init *I = Records.getGlobal(Name->getValue())) { // Add a reference to the global if it's a record. if (TrackReferenceLocs) { if (auto *Def = dyn_cast<DefInit>(I)) const_cast<Record *>(Def->getDef())->appendReferenceLoc(NameLoc); } return I; } Def->getDef() is not a const pointer. I can change the code to what is shown above and make the function non-const. https://github.com/llvm/llvm-project/pull/110747 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits