Skip to content

Commit b652204

Browse files
committed
Enable C++ instrumentation by default
1 parent 5f6bcbc commit b652204

File tree

4 files changed

+6
-22
lines changed

4 files changed

+6
-22
lines changed

testsuite/SUITE/tutils.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -735,15 +735,6 @@ def xcov(args, out=None, err=None, inp=None, env=None, register_failure=True,
735735
covcmd = args[0]
736736
covargs = args[1:]
737737

738-
# gnatcov testsuite exercises C/C++ instrumentation, which are not
739-
# activated by default.
740-
if (
741-
auto_languages
742-
and not thistest.options.qualif_level
743-
and covcmd == "instrument"
744-
):
745-
covargs = ['--restricted-to-languages=Ada,C,C++'] + covargs
746-
747738
if thistest.options.all_warnings:
748739
covargs = ['--all-warnings'] + covargs
749740

tools/gnatcov/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,19 +177,19 @@ ifdef INSTRUMENTED
177177
# use the version that was not instrumented as a main to compile
178178
# gnatcov32, running gnatcov32 will not dump execution traces.
179179

180-
gnatcov instrument -j0 -P gnatcov.gpr -XPART=gnatcov64
180+
gnatcov instrument -j0 -P gnatcov.gpr -XPART=gnatcov64 --c++-opts=$(CXXFLAGS)
181181
$(GPRBUILD) $(BIN_COMMON_BUILD_ARGS) -XPART=gnatcov64 \
182182
--src-subdirs=gnatcov-instr
183183

184-
gnatcov instrument -j0 -P gnatcov.gpr -XPART=gnatcov32
184+
gnatcov instrument -j0 -P gnatcov.gpr -XPART=gnatcov32 --c++-opts=$(CXXFLAGS)
185185
$(GPRBUILD) $(BIN_COMMON_BUILD_ARGS) -XPART=gnatcov32 \
186186
--src-subdirs=gnatcov-instr
187187

188-
gnatcov instrument -j0 -P gnatcov.gpr -XPART=driver
188+
gnatcov instrument -j0 -P gnatcov.gpr -XPART=driver --c++-opts=$(CXXFLAGS)
189189
$(GPRBUILD) $(BIN_COMMON_BUILD_ARGS) -XPART=driver \
190190
--src-subdirs=gnatcov-instr
191191

192-
gnatcov instrument -j0 -P gnatcov.gpr -XPART=compiler
192+
gnatcov instrument -j0 -P gnatcov.gpr -XPART=compiler --c++-opts=$(CXXFLAGS)
193193
$(GPRBUILD) $(BIN_COMMON_BUILD_ARGS) -XPART=compiler \
194194
--src-subdirs=gnatcov-instr
195195
else

tools/gnatcov/command_line.ads

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,9 +1277,7 @@ package Command_Line is
12771277
Pattern => "[LANGUAGE|LIST|@LISTFILE]",
12781278
Help =>
12791279
"Restrict the set of languages for instrumentation. Supports Ada, C"
1280-
& " and C++. As C++ support is still in beta state, the default is"
1281-
& " --restricted-to-languages=Ada,C. To enable C++, pass"
1282-
& " --restricted-to-languages=Ada,C,C++.",
1280+
& " and C++.",
12831281
Commands => (Cmd_Setup
12841282
| Cmd_Instrument_Project => True,
12851283
others => False),

tools/gnatcov/gnatcov_bits_specific.adb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -498,15 +498,10 @@ procedure GNATcov_Bits_Specific is
498498
-- just the default ones.
499499

500500
if Args.String_List_Args (Opt_Restricted_To_Languages).Is_Empty then
501-
502-
-- C++ instrumentation is a beta feature and not yet fully
503-
-- functional. It will thus not be part of the languages enabled by
504-
-- default.
505-
506501
Src_Enabled_Languages :=
507502
(Ada_Language => True,
508503
C_Language => True,
509-
CPP_Language => False);
504+
CPP_Language => True);
510505
else
511506
for Arg of Args.String_List_Args (Opt_Restricted_To_Languages) loop
512507
Src_Enabled_Languages (To_Language (+Arg)) := True;

0 commit comments

Comments
 (0)