@@ -305,20 +305,6 @@ package body Instrument.C is
305
305
-- Note that while Buffers_Index is 1-based, C arrays are 0-based, hence
306
306
-- the index "off-by-1" conversion.
307
307
308
- function Make_Expr_Witness
309
- (UIC : C_Unit_Inst_Context;
310
- Buffer_Index : Positive;
311
- Bit : Bit_Id) return String;
312
- -- Create a procedure call expression on to witness execution of the low
313
- -- level SCO with the given Bit id in the statement buffer at Buffer_Index.
314
-
315
- function Make_Statement_Witness
316
- (UIC : C_Unit_Inst_Context;
317
- Buffer_Index : Positive;
318
- Bit : Bit_Id) return String;
319
- -- Create a procedure call statement to witness execution of the low level
320
- -- SCO with the given Bit id in the statement buffer at Buffer_Index.
321
-
322
308
procedure Insert_Statement_Witness
323
309
(UIC : in out C_Unit_Inst_Context;
324
310
Buffers_Index : Positive;
@@ -1317,33 +1303,6 @@ package body Instrument.C is
1317
1303
Kind);
1318
1304
end Report ;
1319
1305
1320
- -- ---------------------
1321
- -- Make_Expr_Witness --
1322
- -- ---------------------
1323
-
1324
- function Make_Expr_Witness
1325
- (UIC : C_Unit_Inst_Context;
1326
- Buffer_Index : Positive;
1327
- Bit : Bit_Id) return String is
1328
- begin
1329
- return
1330
- " gnatcov_rts_witness ("
1331
- & Statement_Buffer_Symbol (UIC.Instrumented_Unit)
1332
- & Buffers_Subscript (Buffer_Index) & " , " & Img (Bit) & " )" ;
1333
- end Make_Expr_Witness ;
1334
-
1335
- -- --------------------------
1336
- -- Make_Statement_Witness --
1337
- -- --------------------------
1338
-
1339
- function Make_Statement_Witness
1340
- (UIC : C_Unit_Inst_Context;
1341
- Buffer_Index : Positive;
1342
- Bit : Bit_Id) return String is
1343
- begin
1344
- return Make_Expr_Witness (UIC, Buffer_Index, Bit) & " ;" ;
1345
- end Make_Statement_Witness ;
1346
-
1347
1306
-- ----------------------------
1348
1307
-- Insert_Statement_Witness --
1349
1308
-- ----------------------------
@@ -1359,6 +1318,27 @@ package body Instrument.C is
1359
1318
1360
1319
Bit : constant Bit_Id :=
1361
1320
Allocate_Statement_Bit (Unit_Bits, SS.LL_SCO);
1321
+
1322
+ function Make_Expr_Witness
1323
+ (UIC : C_Unit_Inst_Context;
1324
+ Buffer_Index : Positive;
1325
+ Bit : Bit_Id) return String
1326
+ is (" gnatcov_rts_witness ("
1327
+ & Statement_Buffer_Symbol (UIC.Instrumented_Unit)
1328
+ & Buffers_Subscript (Buffer_Index) & " , " & Img (Bit) & " )" );
1329
+ -- Create a procedure call expression on to witness execution of the low
1330
+ -- level SCO with the given Bit id in the statement buffer at
1331
+ -- Buffer_Index.
1332
+
1333
+ function Make_Statement_Witness
1334
+ (UIC : C_Unit_Inst_Context;
1335
+ Buffer_Index : Positive;
1336
+ Bit : Bit_Id) return String
1337
+ is (Make_Expr_Witness (UIC, Buffer_Index, Bit) & " ;" );
1338
+ -- Create a procedure call statement to witness execution of the low
1339
+ -- level SCO with the given Bit id in the statement buffer at
1340
+ -- Buffer_Index.
1341
+
1362
1342
begin
1363
1343
-- Insert the call to the witness function: as a foregoing statement if
1364
1344
-- SS.Statement is a statement, or as a previous expression (using the
0 commit comments