[Lldb-commits] [PATCH] D81210: Teach GetXcodeSDK to look in the Xcode that contains LLDB
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 5 11:10:49 PDT 2020
aprantl marked 2 inline comments as done.
aprantl added inline comments.
================
Comment at: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm:364
+ Environment env = Host::GetEnvironment();
+ std::string developer_dir = env.lookup("DEVELOPER_DIR");
+ if (developer_dir.empty()) {
----------------
JDevlieghere wrote:
> Above we use `getenv`, here we use `Host::GetEnvironment`. We should pick one and be consistent.
I will create a follow-up patch for above.
================
Comment at: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm:365
+ if (developer_dir.empty())
+ if (FileSpec fspec = HostInfo::GetShlibDir())
+ if (FileSystem::Instance().Exists(fspec)) {
----------------
JDevlieghere wrote:
> Any reason you choose to leave this inline and not making it a separate function? If we did we could also cache the result like we do for some of the other paths.
This function is going to be called at most ~7*2 times, once for each XcodeSDK kind * Internal. So caching isn't really relevant. i also would like to refactor the other function after this patch, which would make factoring this out first really awkward.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81210/new/
https://reviews.llvm.org/D81210
More information about the lldb-commits
mailing list