================ @@ -1813,6 +1813,7 @@ void ScalarExprEmitter::EmitBinOpCheck( SanitizerHandler Check; SmallVector<llvm::Constant *, 4> StaticData; SmallVector<llvm::Value *, 2> DynamicData; + std::unique_ptr<RuntimeTrapDiagnosticBuilder> RTDB = nullptr; ---------------- Sirraide wrote:
I don’t think this is the right place to cache and reuse these. If we want caching, then `CodeGenModule::RuntimeDiag()` should handle that internally. I’m also not sure if we need caching at all—just making the inline storage of the `SmallString` in the diagnostic builder a big bigger should suffice for most diagnostics I think. https://github.com/llvm/llvm-project/pull/154618 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits