Rollup merge of #127359 - GuillaumeGomez:improve-run-make-llvm-ident-code, r=jieyouxu

Improve run make llvm ident code

I took the commits that are not blocking https://github.com/rust-lang/rust/pull/127237.

r? `@Kobzol`
This commit is contained in:
Guillaume Gomez 2024-07-05 11:33:18 +02:00 committed by GitHub
commit 4fd3b123bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -75,11 +75,12 @@ pub fn arg<S>(&mut self, arg: S) -> &mut Self
/// Generic command arguments provider. Prefer specific helper methods if possible.
/// Note that for some executables, arguments might be platform specific. For C/C++
/// compilers, arguments might be platform *and* compiler specific.
pub fn args<S>(&mut self, args: &[S]) -> &mut Self
pub fn args<S, V>(&mut self, args: V) -> &mut Self
where
S: AsRef<ffi::OsStr>,
V: AsRef<[S]>,
{
self.cmd.args(args);
self.cmd.args(args.as_ref());
self
}

View File

@ -28,7 +28,7 @@ fn main() {
files.push(path.to_path_buf());
}
});
cmd(llvm_bin_dir().join("llvm-dis")).args(&files).run();
cmd(llvm_bin_dir().join("llvm-dis")).args(files).run();
// Check LLVM IR files (including temporary outputs) have `!llvm.ident`
// named metadata, reusing the related codegen test.