aprantl created this revision. aprantl added reviewers: JDevlieghere, friss. JDevlieghere accepted this revision. This revision is now accepted and ready to land.
I'm sorry, I just introduced this in https://reviews.llvm.org/D80595. Thanks Jonas for noticing! https://reviews.llvm.org/D80666 Files: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm Index: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm =================================================================== --- lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm +++ lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm @@ -370,7 +370,6 @@ auto it = g_sdk_path.find(sdk.GetString()); if (it != g_sdk_path.end()) return it->second; - std::string path = GetXcodeSDK(sdk); - g_sdk_path.insert({sdk.GetString(), path}); - return path; + auto it_new = g_sdk_path.insert({sdk.GetString(), GetXcodeSDK(sdk)}); + return it_new.first->second; }
Index: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm =================================================================== --- lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm +++ lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm @@ -370,7 +370,6 @@ auto it = g_sdk_path.find(sdk.GetString()); if (it != g_sdk_path.end()) return it->second; - std::string path = GetXcodeSDK(sdk); - g_sdk_path.insert({sdk.GetString(), path}); - return path; + auto it_new = g_sdk_path.insert({sdk.GetString(), GetXcodeSDK(sdk)}); + return it_new.first->second; }
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits