[llvm] [dsymutil] Also detect external downloadable toolchains (PR #93872)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 13:16:31 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 61afebdacc3b980fb82ea606d78d742847a133c3 7d5c791da75d1ec29907735958b70838ec474ce6 -- llvm/include/llvm/DWARFLinker/Utils.h llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp llvm/unittests/DWARFLinkerParallel/DWARFLinkerTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/DWARFLinker/Utils.h b/llvm/include/llvm/DWARFLinker/Utils.h
index 6a26ca777d..8bf5ea1025 100644
--- a/llvm/include/llvm/DWARFLinker/Utils.h
+++ b/llvm/include/llvm/DWARFLinker/Utils.h
@@ -83,7 +83,7 @@ inline bool isInToolchainDir(StringRef Path) {
if (it == end)
return false;
if (*it != "Toolchains")
- return false;
+ return false;
++it;
if (it == end)
return false;
@@ -94,7 +94,7 @@ inline bool isInToolchainDir(StringRef Path) {
}
return false;
}
-
+
inline bool isPathAbsoluteOnWindowsOrPosix(const Twine &Path) {
// Debug info can contain paths from any OS, not necessarily
// an OS we're currently running on. Moreover different compilation units can
diff --git a/llvm/unittests/DWARFLinkerParallel/DWARFLinkerTest.cpp b/llvm/unittests/DWARFLinkerParallel/DWARFLinkerTest.cpp
index 74d5b2f6c2..50c91396d6 100644
--- a/llvm/unittests/DWARFLinkerParallel/DWARFLinkerTest.cpp
+++ b/llvm/unittests/DWARFLinkerParallel/DWARFLinkerTest.cpp
@@ -24,7 +24,11 @@ TEST(DWARFLinker, PathTest) {
"/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk"),
DEVELOPER_DIR);
EXPECT_EQ(guessDeveloperDir(DEVELOPER_DIR "/SDKs/MacOSX.sdk"), DEVELOPER_DIR);
- EXPECT_TRUE(isInToolchainDir("/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-05-15-a.xctoolchain/usr/lib/swift/macosx/_StringProcessing.swiftmodule/arm64-apple-macos.private.swiftinterface"));
+ EXPECT_TRUE(
+ isInToolchainDir("/Library/Developer/Toolchains/"
+ "swift-DEVELOPMENT-SNAPSHOT-2024-05-15-a.xctoolchain/"
+ "usr/lib/swift/macosx/_StringProcessing.swiftmodule/"
+ "arm64-apple-macos.private.swiftinterface"));
EXPECT_FALSE(isInToolchainDir("/Foo/not-an.xctoolchain/Bar/Baz"));
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/93872
More information about the llvm-commits
mailing list