================ @@ -324,6 +324,13 @@ class ASTContext : public RefCountedBase<ASTContext> { /// This is lazily created. This is intentionally not serialized. mutable llvm::StringMap<StringLiteral *> StringLiteralCache; + /// The next string literal "version" to allocate during constant evaluation. + /// This is used to distinguish between repeated evaluations of the same + /// string literal. + /// + /// TODO: Ensure version numbers don't collide when deserialized. ---------------- erichkeane wrote:
This seems troublesome. The modules case here is somewhat concerning to me. I wonder if we could figure out some way to encode/serialize the "how we got here" via source information to provide the number? I realize I'm being a little hand-wavy, but perhaps back to the 'line + col that caused this evaluation'? https://github.com/llvm/llvm-project/pull/109208 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits