libcc1: share basic context code
Both plugins in libcc1 share a fair amount of boilerplate. They both share error-emission code, context management code, and tree GC code. This patch unifies these two bodies of code, avoiding needless duplication. libcc1 * libcc1plugin.cc: Move code to context.cc. * libcp1plugin.cc: Move code to context.cc. * context.hh: New file. * context.cc: New file. * Makefile.in: Rebuild. * Makefile.am (AM_CPPFLAGS): Add more gcc flags. (CPPFLAGS_FOR_C, CPPFLAGS_FOR_CXX): Update. (libcc1plugin_la_SOURCES): Add context.hh, context.cc. (libcp1plugin_la_SOURCES): Likewise.
Showing
- libcc1/Makefile.am 8 additions, 7 deletionslibcc1/Makefile.am
- libcc1/Makefile.in 15 additions, 12 deletionslibcc1/Makefile.in
- libcc1/context.cc 171 additions, 0 deletionslibcc1/context.cc
- libcc1/context.hh 121 additions, 0 deletionslibcc1/context.hh
- libcc1/libcc1plugin.cc 3 additions, 201 deletionslibcc1/libcc1plugin.cc
- libcc1/libcp1plugin.cc 3 additions, 200 deletionslibcc1/libcp1plugin.cc
Loading
Please register or sign in to comment