/* C preprocessor macro expansion for GDB.
- Copyright (C) 2002-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2019 Free Software Foundation, Inc.
Contributed by Red Hat, Inc.
This file is part of GDB.
#include "defs.h"
#include "gdb_obstack.h"
-#include "bcache.h"
#include "macrotab.h"
#include "macroexp.h"
#include "c-lang.h"
shared = true;
}
+ macro_buffer& operator= (const macro_buffer &src)
+ {
+ gdb_assert (src.shared);
+ gdb_assert (shared);
+ set_shared (src.text, src.len);
+ last_token = src.last_token;
+ is_identifier = src.is_identifier;
+ return *this;
+ }
+
~macro_buffer ()
{
if (! shared && size)
/* Release the text of the buffer to the caller, which is now
responsible for freeing it. */
- char *release ()
+ ATTRIBUTE_UNUSED_RESULT char *release ()
{
gdb_assert (! shared);
gdb_assert (size);