[v2,16/21] libcc1: use GCC_FE_VERSION_1 in C++ plugin

Message ID 20210428010119.806184-17-tom@tromey.com
State New
Headers show
Series
  • C++11-based improvements for libcc1
Related show

Commit Message

Tom Tromey April 28, 2021, 1:01 a.m.
The C++ plugin defaults to version 0 of the base compiler API.
However, this is a mistake -- version 1 was introduced before the C++
API was even implemented.  This switches the default to version 1.
Note that the compiler-side plugin will accept this version, so it
should remain compatible.

libcc1/ChangeLog
2021-04-27  Tom Tromey  <tom@tromey.com>

	* libcp1.cc (vtable): Use GCC_FE_VERSION_1.
---
 libcc1/ChangeLog | 4 ++++
 libcc1/libcp1.cc | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

-- 
2.26.2

Comments

Andrew Pinski via Gcc-patches April 28, 2021, 4:06 p.m. | #1
On 4/27/2021 7:01 PM, Tom Tromey wrote:
> The C++ plugin defaults to version 0 of the base compiler API.

> However, this is a mistake -- version 1 was introduced before the C++

> API was even implemented.  This switches the default to version 1.

> Note that the compiler-side plugin will accept this version, so it

> should remain compatible.

>

> libcc1/ChangeLog

> 2021-04-27  Tom Tromey  <tom@tromey.com>

>

> 	* libcp1.cc (vtable): Use GCC_FE_VERSION_1.


OK

Jeff

Patch

diff --git a/libcc1/libcp1.cc b/libcc1/libcp1.cc
index 6fb9fb4c9a6c..65e9770205c0 100644
--- a/libcc1/libcp1.cc
+++ b/libcc1/libcp1.cc
@@ -391,7 +391,7 @@  libcp1_destroy (struct gcc_base_context *s)
 
 static const struct gcc_base_vtable vtable =
 {
-  GCC_FE_VERSION_0,
+  GCC_FE_VERSION_1,
   libcp1_set_arguments_v0,
   libcp1_set_source_file,
   libcp1_set_print_callback,