mirror of
https://github.com/intel/llvm.git
synced 2026-02-08 17:28:30 +08:00
[lldb][NFCI] Platforms should own their SDKBuild and SDKRootDirectory strings
These don't need to be ConstStrings. They don't really benefit much from deduplication and comparing them isn't on a hot path, so they don't really benefit much from quick comparisons. Differential Revision: https://reviews.llvm.org/D152331
This commit is contained in:
@@ -210,11 +210,10 @@ Status Platform::GetSharedModule(
|
||||
Status error(eErrorTypeGeneric);
|
||||
ModuleSpec resolved_spec;
|
||||
// Check if we have sysroot set.
|
||||
if (m_sdk_sysroot) {
|
||||
if (!m_sdk_sysroot.empty()) {
|
||||
// Prepend sysroot to module spec.
|
||||
resolved_spec = spec;
|
||||
resolved_spec.GetFileSpec().PrependPathComponent(
|
||||
m_sdk_sysroot.GetStringRef());
|
||||
resolved_spec.GetFileSpec().PrependPathComponent(m_sdk_sysroot);
|
||||
// Try to get shared module with resolved spec.
|
||||
error = ModuleList::GetSharedModule(resolved_spec, module_sp,
|
||||
module_search_paths_ptr, old_modules,
|
||||
@@ -312,9 +311,9 @@ void Platform::GetStatus(Stream &strm) {
|
||||
strm.Printf(" Connected: %s\n", is_connected ? "yes" : "no");
|
||||
}
|
||||
|
||||
if (GetSDKRootDirectory()) {
|
||||
strm.Format(" Sysroot: {0}\n", GetSDKRootDirectory());
|
||||
}
|
||||
if (const std::string &sdk_root = GetSDKRootDirectory(); !sdk_root.empty())
|
||||
strm.Format(" Sysroot: {0}\n", sdk_root);
|
||||
|
||||
if (GetWorkingDirectory()) {
|
||||
strm.Printf("WorkingDir: %s\n", GetWorkingDirectory().GetPath().c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user