[llvm] [bolt] Prevent using inplace to add compatibility (PR #206183)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 26 14:01:44 PDT 2026
https://github.com/aokblast created https://github.com/llvm/llvm-project/pull/206183
BSD sed doesn't implement -i as inplaced modify file. We use copy and replace as a workaround to avoid this.
>From 89d8634e450583d4cae80d2821362579edc66b19 Mon Sep 17 00:00:00 2001
From: ShengYi Hung <aokblast at FreeBSD.org>
Date: Sat, 27 Jun 2026 04:57:41 +0800
Subject: [PATCH] [bolt] Prevent using inplace to add compatibility
BSD sed doesn't implement -i as inplaced modify file. We use copy and
replace as a workaround to avoid this.
---
bolt/test/X86/infer_no_exits.test | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bolt/test/X86/infer_no_exits.test b/bolt/test/X86/infer_no_exits.test
index 3e208053a3c85..a902b36e0752e 100644
--- a/bolt/test/X86/infer_no_exits.test
+++ b/bolt/test/X86/infer_no_exits.test
@@ -2,7 +2,8 @@
# RUN: %clangxx %cxxflags %p/Inputs/infer_no_exits.s -o %t.exe
# RUN: link_fdata %s %t.exe %t.preagg PREAGG
# RUN: perf2bolt %t.exe -p %t.preagg --pa -o %t.fdata -w %t.yaml
-# RUN: sed -i '0,/hash:/s/0x[0-9A-Fa-f]\{16\}/0x0000000000000000/' %t.yaml
+# RUN: sed '1,/hash:/s/0x[0-9A-Fa-f]\{16\}/0x0000000000000000/' %t.yaml > %t.yaml.out
+# RUN: mv %t.yaml.out %t.yaml
# RUN: llvm-bolt %t.exe -data %t.yaml -o %t.null -v=1 -infer-stale-profile 2>&1 \
# RUN: | FileCheck %s
More information about the llvm-commits
mailing list