public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-1697] jit: Make recording::memento non-copyable Date: Thu, 14 Jul 2022 20:21:12 +0000 (GMT) [thread overview] Message-ID: <20220714202112.550463858C55@sourceware.org> (raw) https://gcc.gnu.org/g:b4f81085d1ef5776be30f95c102ec67daf03c35c commit r13-1697-gb4f81085d1ef5776be30f95c102ec67daf03c35c Author: Jonathan Wakely <jwakely@redhat.com> Date: Wed Jul 13 12:28:11 2022 +0100 jit: Make recording::memento non-copyable gcc/jit/ChangeLog: * jit-recording.h (recording::memento): Define copy constructor and copy assignment operator as deleted. (recording::string): Likewise. (recording::string::c_str): Add const qualifier. Diff: --- gcc/jit/jit-recording.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/jit/jit-recording.h b/gcc/jit/jit-recording.h index 0dfb42f2676..8610ea988bd 100644 --- a/gcc/jit/jit-recording.h +++ b/gcc/jit/jit-recording.h @@ -405,6 +405,9 @@ public: virtual void write_reproducer (reproducer &r) = 0; virtual location *dyn_cast_location () { return NULL; } + memento (const memento&) = delete; + memento& operator= (const memento&) = delete; + protected: memento (context *ctxt) : m_ctxt (ctxt), @@ -436,13 +439,16 @@ public: string (context *ctxt, const char *text, bool escaped); ~string (); - const char *c_str () { return m_buffer; } + const char *c_str () const { return m_buffer; } static string * from_printf (context *ctxt, const char *fmt, ...) GNU_PRINTF(2, 3); void replay_into (replayer *) final override {} + string (const string&) = delete; + string& operator= (const string&) = delete; + private: string * make_debug_string () final override; void write_reproducer (reproducer &r) final override;
reply other threads:[~2022-07-14 20:21 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220714202112.550463858C55@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).