mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-21 19:35:28 -05:00
7722c043f05deb75b4b5ab92740d0d491101f5c2
This patch introduces a new helper to swap the contents of two doubly-linked list wrappers. The new *_swap_lists operation exchanges the first, last, and size fields, allowing two lists to be swapped efficiently without iterating over their elements. This helper is intended for cases where the ownership of a list must be exchanged but swapping wrapper pointers is not possible. For simple references to lists, when wrappers are dynamically allocated, swapping the wrapper pointers themselves is sufficient and remains the preferred approach. This change adds the necessary declaration and definition macros to doubly-linked-list.h and integrates them into the set of mutative list operations. The testsuite is updated accordingly to cover the new functionality. include/ChangeLog: * doubly-linked-list.h (LINKED_LIST_SWAP_LISTS): Add new helper. (LINKED_LIST_DECL_SWAP_LISTS): Likewise. (LINKED_LIST_DEFN_SWAP_LISTS): Likewise. (LWRAPPERTYPE##_swap_lists): Likewise. libiberty/ChangeLog: * testsuite/test-doubly-linked-list.c: Update.
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C++
30.7%
C
30.1%
Ada
14.4%
D
6.1%
Go
5.7%
Other
12.5%