dankm wrote:
Sounds good. Everything I want is in the pull request, I'm going to create a
new pull request to update some tests as we discussed above. I'll update the
description to be a bit more clear.
Thanks for all help.
https://github.com/llvm/llvm-project/pull/65812
_
jh7370 wrote:
I can merge it for you, but first I just want to confirm that all 4 commits in
this PR are intended to be for the PR? If not, you'll need to rebase and force
push.
There's no need for you to manually squash the fixups (although you might as
well if you do end up rebasing). When
dankm wrote:
Hm. I have "fixup" commits in this branch, should I rebase those, or can we
squash merge as-is?
https://github.com/llvm/llvm-project/pull/65812
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
dankm wrote:
No _good_ particular reason. I got hung up on the formatting issues then ran
out of steam, and busy with $job. I just ran clang-format on this change and it
came up clean.
And now that I've done that the only reason I have left is I'm unable to merge
my own changes. Would you min
jh7370 wrote:
@dankm, is there a particular reason you haven't merged this change in yet?
FWIW, the formatter check failed for some reason, but I'm not sure it's related
to any formatting issue. Please verify by running clang-format on your changes
before merging.
https://github.com/llvm/llvm
https://github.com/dankm updated https://github.com/llvm/llvm-project/pull/65812
>From 5f5e57a5c01088e7f0b9276ed02dd436a3f9cc0a Mon Sep 17 00:00:00 2001
From: Dan McGregor
Date: Mon, 14 Aug 2023 18:44:08 -0600
Subject: [PATCH 1/4] Support: hoist lld's executable name code to Path
Instead of usi
https://github.com/dankm resolved
https://github.com/llvm/llvm-project/pull/65812
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dankm updated https://github.com/llvm/llvm-project/pull/65812
>From 5f5e57a5c01088e7f0b9276ed02dd436a3f9cc0a Mon Sep 17 00:00:00 2001
From: Dan McGregor
Date: Mon, 14 Aug 2023 18:44:08 -0600
Subject: [PATCH 1/3] Support: hoist lld's executable name code to Path
Instead of usi
@@ -1696,6 +1696,40 @@ TEST(Support, ReplacePathPrefix) {
EXPECT_EQ(Path, "C:\\old/foo\\bar");
}
+TEST(Support, FindProgramName) {
+ StringRef WindowsProgName =
+ path::program_name("C:\\Test\\foo.exe", path::Style::windows);
+ EXPECT_EQ(WindowsProgName, "foo");
+
+
@@ -5,11 +5,14 @@
# RUN: mkdir %t
# RUN: ln -s llvm-ranlib %t/llvm-ranlib-9
# RUN: ln -s llvm-ranlib %t/ranlib.exe
+# RUN: ln -s llvm-ranlib %t/x86_64-unknown-freebsd13.2-llvm-ranlib
jh7370 wrote:
Let's put the new test files and deletion of this old test in a
@@ -1696,6 +1696,40 @@ TEST(Support, ReplacePathPrefix) {
EXPECT_EQ(Path, "C:\\old/foo\\bar");
}
+TEST(Support, FindProgramName) {
+ StringRef WindowsProgName =
+ path::program_name("C:\\Test\\foo.exe", path::Style::windows);
+ EXPECT_EQ(WindowsProgName, "foo");
+
+
https://github.com/jh7370 edited https://github.com/llvm/llvm-project/pull/65812
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dankm resolved
https://github.com/llvm/llvm-project/pull/65812
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dankm updated https://github.com/llvm/llvm-project/pull/65812
>From 5f5e57a5c01088e7f0b9276ed02dd436a3f9cc0a Mon Sep 17 00:00:00 2001
From: Dan McGregor
Date: Mon, 14 Aug 2023 18:44:08 -0600
Subject: [PATCH 1/2] Support: hoist lld's executable name code to Path
Instead of usi
https://github.com/dankm resolved
https://github.com/llvm/llvm-project/pull/65812
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dankm updated https://github.com/llvm/llvm-project/pull/65812
>From 4a30a862b41aa6c570b0dc4d1eb82a7feef4ed8e Mon Sep 17 00:00:00 2001
From: Dan McGregor
Date: Mon, 14 Aug 2023 18:44:08 -0600
Subject: [PATCH 1/2] Support: hoist lld's executable name code to Path
Instead of usi
@@ -5,11 +5,14 @@
# RUN: mkdir %t
# RUN: ln -s llvm-ranlib %t/llvm-ranlib-9
# RUN: ln -s llvm-ranlib %t/ranlib.exe
+# RUN: ln -s llvm-ranlib %t/x86_64-unknown-freebsd13.2-llvm-ranlib
dankm wrote:
Yep, your second point is why I didn't bother making the second
@@ -1696,6 +1696,38 @@ TEST(Support, ReplacePathPrefix) {
EXPECT_EQ(Path, "C:\\old/foo\\bar");
}
+TEST(Support, FindProgramName) {
+ StringRef WindowsProgName =
+ path::program_name("C:\\Test\\foo.exe", path::Style::windows);
+ EXPECT_EQ(WindowsProgName, "foo");
+
+
dankm wrote:
> Do any others exist on other platforms?
I don't know. I explicitly tested that `.sh` remains, but that was just because
it's relatively common (in my experience) to see tools like clang wrapped in a
shell script. On Windows there are several executable extensions but I think
th
dankm wrote:
> Just making sure I follow: the problem with `stem` is that if a filename
> includes a dot, but no ".exe" or equivalent suffix, it would drop the bit
> from the last dot onwards, even though it might be part of the tool's actual
> name. Is that correct?
Yes, that's correct. The
@@ -1696,6 +1696,38 @@ TEST(Support, ReplacePathPrefix) {
EXPECT_EQ(Path, "C:\\old/foo\\bar");
}
+TEST(Support, FindProgramName) {
+ StringRef WindowsProgName =
+ path::program_name("C:\\Test\\foo.exe", path::Style::windows);
+ EXPECT_EQ(WindowsProgName, "foo");
+
+
@@ -600,6 +600,14 @@ StringRef extension(StringRef path, Style style) {
return fname.substr(pos);
}
+StringRef program_name(StringRef path, Style style) {
+ // In the future this may need to be extended to other
+ // program suffixes.
jh7370 wrote:
Unnece
@@ -390,6 +390,21 @@ StringRef stem(StringRef path, Style style =
Style::native);
/// @result The extension of \a path.
StringRef extension(StringRef path, Style style = Style::native);
+/// Get the program's name
+///
+/// If the path ends with the string .exe, returns the s
@@ -5,16 +5,22 @@
# RUN: mkdir %t
# RUN: ln -s llvm-ar %t/llvm-ar-9
# RUN: ln -s llvm-ar %t/ar.exe
+# RUN: ln -s llvm-ar %t/x86_64-portbld-freebsd13.2-llvm-ar
+# RUN: ln -s llvm-ar %t/x86_64-portbld-freebsd13.2-llvm-ar.exe
# RUN: ln -s llvm-ar %t/arm-pokymllib32-linux-gnueabi-
@@ -390,6 +390,21 @@ StringRef stem(StringRef path, Style style =
Style::native);
/// @result The extension of \a path.
StringRef extension(StringRef path, Style style = Style::native);
+/// Get the program's name
+///
+/// If the path ends with the string .exe, returns the s
https://github.com/MaskRay approved this pull request.
LGTM, but @jh7370 usually wants to have an eye on such changes.
https://github.com/llvm/llvm-project/pull/65812
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
https://github.com/MaskRay edited
https://github.com/llvm/llvm-project/pull/65812
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
dankm wrote:
Hm. I'm happy with this file, but I also discovered a bunch of other
`tool-name` tests that can be updated. I'll add those too.
https://github.com/llvm/llvm-project/pull/65812
___
cfe-commits mailing lis
https://github.com/llvmbot labeled
https://github.com/llvm/llvm-project/pull/65812
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvmbot labeled
https://github.com/llvm/llvm-project/pull/65812
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvmbot labeled
https://github.com/llvm/llvm-project/pull/65812
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dankm updated
https://github.com/llvm/llvm-project/pull/65812:
>From 416d75e617cc87b6e497815ce6ad1da630eb14a1 Mon Sep 17 00:00:00 2001
From: Dan McGregor
Date: Mon, 14 Aug 2023 18:44:08 -0600
Subject: [PATCH 1/2] Support: hoist lld's executable name code to Path
Instead of u
https://github.com/dankm updated
https://github.com/llvm/llvm-project/pull/65812:
>From a42cbcc0731725929c60ba4c1fd5254ae5e46613 Mon Sep 17 00:00:00 2001
From: Dan McGregor
Date: Mon, 14 Aug 2023 18:44:08 -0600
Subject: [PATCH] Support: hoist lld's executable name code to Path
Instead of using
https://github.com/dankm updated
https://github.com/llvm/llvm-project/pull/65812:
>From a42cbcc0731725929c60ba4c1fd5254ae5e46613 Mon Sep 17 00:00:00 2001
From: Dan McGregor
Date: Mon, 14 Aug 2023 18:44:08 -0600
Subject: [PATCH] Support: hoist lld's executable name code to Path
Instead of using
34 matches
Mail list logo