[lldb] Add scoped timer to HostInfoMacOSX::GetXcodeSDKPath

This commit is contained in:
Jonas Devlieghere 2021-03-01 14:57:29 -08:00
parent c35761db0f
commit 6dbea3efc5
1 changed files with 4 additions and 1 deletions

View File

@ -6,12 +6,13 @@
//
//===----------------------------------------------------------------------===//
#include "lldb/Host/macosx/HostInfoMacOSX.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Host/macosx/HostInfoMacOSX.h"
#include "lldb/Utility/Args.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/Timer.h"
#include "Utility/UuidCompatibility.h"
#include "llvm/ADT/SmallString.h"
@ -473,6 +474,8 @@ llvm::StringRef HostInfoMacOSX::GetXcodeSDKPath(XcodeSDK sdk) {
static std::mutex g_sdk_path_mutex;
std::lock_guard<std::mutex> guard(g_sdk_path_mutex);
LLDB_SCOPED_TIMER();
auto it = g_sdk_path.find(sdk.GetString());
if (it != g_sdk_path.end())
return it->second;