[llvm-branch-commits] [clang] release/19.x: [Clang][perf-training] Fix clean command in perf-helper.py (#118978) (PR #119051)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Dec 6 18:41:39 PST 2024


https://github.com/llvmbot created https://github.com/llvm/llvm-project/pull/119051

Backport 18af3fc1bf8855e1e166e64a9210ed07d610aa54

Requested by: @tstellar

>From 0b1ed9168731f0bee35542988ec9867ebd3cfc47 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 6 Dec 2024 18:34:59 -0800
Subject: [PATCH] [Clang][perf-training] Fix clean command in perf-helper.py
 (#118978)

The first path argument was always being ignored, and since most calls
to this command only passed one path, it wasn't actually doing anything
in most cases.

This bug was introduced by dd0356d741aefa25ece973d6cc4b55dcb73b84b4.

(cherry picked from commit 18af3fc1bf8855e1e166e64a9210ed07d610aa54)
---
 clang/utils/perf-training/perf-helper.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/utils/perf-training/perf-helper.py b/clang/utils/perf-training/perf-helper.py
index 3ed42a187fd803..d76c6ede3fe5a2 100644
--- a/clang/utils/perf-training/perf-helper.py
+++ b/clang/utils/perf-training/perf-helper.py
@@ -36,7 +36,7 @@ def clean(args):
             + "\tRemoves all files with extension from <path>."
         )
         return 1
-    for path in args[1:-1]:
+    for path in args[0:-1]:
         for filename in findFilesWithExtension(path, args[-1]):
             os.remove(filename)
     return 0



More information about the llvm-branch-commits mailing list