aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRonan Desplanques <desplanques@adacore.com>2024-11-26 13:45:32 +0100
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-12-13 09:36:00 +0100
commitcdd221cefe4ca3a75b141b93113e818f5e22ac9f (patch)
tree3b1ccf0bd1ce98b30c0b79384492cda5af82079c /gcc
parent9c0382624b302be3fda8a465dd37615344f7bef6 (diff)
downloadgcc-cdd221cefe4ca3a75b141b93113e818f5e22ac9f.zip
gcc-cdd221cefe4ca3a75b141b93113e818f5e22ac9f.tar.gz
gcc-cdd221cefe4ca3a75b141b93113e818f5e22ac9f.tar.bz2
ada: Exclude library units from gnatcov instrumentation
Before this patch, we instrumented code that's only used during the build process to generate more code. This patch marks the code-generating code so it's not instrumented for coverage. gcc/ada/ChangeLog: * gnat2.gpr: Add library units to coverage exclusion list.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/gnat2.gpr19
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/ada/gnat2.gpr b/gcc/ada/gnat2.gpr
index df64846..9d9f3b5 100644
--- a/gcc/ada/gnat2.gpr
+++ b/gcc/ada/gnat2.gpr
@@ -49,6 +49,23 @@ project Gnat2 is
-- of fresh source files from the run-time library. We need gnatcov to not instrument
-- those files, so we add the clause below. It's unknown why only putting "GNAT" is sufficient???
-- We also pull in GNAT.Lists for example, but specifying it here triggers a warning.
- for Excluded_Units use ("Gnat");
+ Overridden_Runtime_Units := ("GNAT");
+
+ -- We don't want to instrument code generation tools
+ Codegen_Units :=
+ ("Gen_IL",
+ "Gen_IL.Gen",
+ "Gen_IL.Fields",
+ "Gen_IL.Gen.Gen_Entities",
+ "Gen_IL.Gen.Gen_Nodes",
+ "Gen_IL.Internals",
+ "Gen_IL.Main",
+ "Gen_IL.Types",
+ "XSnamesT",
+ "XUtil",
+ "XOSCons",
+ "XLeaps");
+
+ for Excluded_Units use Overridden_Runtime_Units & Codegen_Units;
end Coverage;
end Gnat2;