[Lldb-commits] [PATCH] D98272: [lldb/Platform] Skip very slow xcrun queries for simulator platforms, NFC

Vedant Kumar via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 10 12:13:58 PST 2021


vsk added inline comments.


================
Comment at: lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp:534
+    if (arch && arch->IsValid() && !arch->TripleEnvironmentWasSpecified())
+      return nullptr; // Avoid very slow xcrun query for non-simulator archs.
     llvm::StringRef sdk;
----------------
JDevlieghere wrote:
> Is it equivalent to return nullptr here to passing an empty string as the `sdk`? 
I don't know, but I don't think so -- shouldn't that amount to dropping the -sdk argument here?:
```
  auto xcrun = [](const std::string &sdk,
                  llvm::StringRef developer_dir = "") -> std::string {
    std::string xcrun_cmd = "xcrun --show-sdk-path --sdk " + sdk;
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98272/new/

https://reviews.llvm.org/D98272



More information about the lldb-commits mailing list