authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-07-22 18:02:24-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-07-25 18:52:20-07:00
log3256df2ff80be565095993b03f8e1edfd5072367
tree7d28da04bf79ade42139ab77dfbdf7dafc675d2e
parent5058beb1793aafaaf63cb5b9ef4c751fba08a62c

llvm: always include instrumentation function attributes


1 files changed, 4 insertions(+), 8 deletions(-)

src/codegen/llvm.zig+4-8
......@@ -1392,16 +1392,12 @@ pub const Object = struct {
13921392 }
13931393 if (owner_mod.fuzz and !func_analysis.disable_instrumentation) {
13941394 try attributes.addFnAttr(.optforfuzzing, &o.builder);
1395 if (comp.config.any_fuzz) {
1396 _ = try attributes.removeFnAttr(.skipprofile);
1397 _ = try attributes.removeFnAttr(.nosanitize_coverage);
1398 }
1395 _ = try attributes.removeFnAttr(.skipprofile);
1396 _ = try attributes.removeFnAttr(.nosanitize_coverage);
13991397 } else {
14001398 _ = try attributes.removeFnAttr(.optforfuzzing);
1401 if (comp.config.any_fuzz) {
1402 try attributes.addFnAttr(.skipprofile, &o.builder);
1403 try attributes.addFnAttr(.nosanitize_coverage, &o.builder);
1404 }
1399 try attributes.addFnAttr(.skipprofile, &o.builder);
1400 try attributes.addFnAttr(.nosanitize_coverage, &o.builder);
14051401 }
14061402
14071403 // TODO: disable this if safety is off for the function scope