[llvm] [dsymutil] Filter our swiftinterface files from the toolchain. (PR #71205)
Augusto Noronha via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 3 11:41:20 PDT 2023
================
@@ -167,6 +167,21 @@ void CompileUnit::cleanupDataAfterClonning() {
getOrigUnit().clear();
}
+/// Make a best effort to guess the
+/// Xcode.app/Contents/Developer/Toolchains/ path from an SDK path.
+static SmallString<128> guessToolChainBaseDir(StringRef SysRoot) {
+ SmallString<128> Result;
+ // Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
+ StringRef Base = SysRoot;
+ Base = sys::path::parent_path(Base);
+ if (sys::path::filename(Base) != "SDKs")
+ return Result;
+ Result = Base;
+ Base = sys::path::parent_path(Base);
----------------
augusto2112 wrote:
You set `Result` to `Base`, then update `Base`, but never reuse it. Is this correct?
https://github.com/llvm/llvm-project/pull/71205
More information about the llvm-commits
mailing list