Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Clang][perf-training] Fix clean command in perf-helper.py #118978

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

tstellar
Copy link
Collaborator

@tstellar tstellar commented Dec 6, 2024

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 dd0356d.

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.
@tstellar tstellar requested review from petrhosek and aaupov December 6, 2024 14:12
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Dec 6, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 6, 2024

@llvm/pr-subscribers-clang

Author: Tom Stellard (tstellar)

Changes

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 dd0356d.


Full diff: https://github.com/llvm/llvm-project/pull/118978.diff

1 Files Affected:

  • (modified) clang/utils/perf-training/perf-helper.py (+1-1)
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

@tstellar tstellar merged commit 18af3fc into llvm:main Dec 7, 2024
10 checks passed
@tstellar tstellar added this to the LLVM 19.X Release milestone Dec 7, 2024
@tstellar
Copy link
Collaborator Author

tstellar commented Dec 7, 2024

/cherry-pick 18af3fc

@llvmbot
Copy link
Member

llvmbot commented Dec 7, 2024

/pull-request #119051

broxigarchen pushed a commit to broxigarchen/llvm-project that referenced this pull request Dec 10, 2024
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 dd0356d.
tru pushed a commit to llvmbot/llvm-project that referenced this pull request Dec 17, 2024
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 dd0356d.

(cherry picked from commit 18af3fc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
Development

Successfully merging this pull request may close these issues.

4 participants