Skip to content

Fix a dangling-gsl warning and avoid transitively including string. #1142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lldb/include/lldb/Utility/XcodeSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class XcodeSDK {
void Merge(XcodeSDK other);

XcodeSDK &operator=(XcodeSDK other);
XcodeSDK(const XcodeSDK&) = default;
bool operator==(XcodeSDK other);

/// A parsed SDK directory name.
Expand Down
3 changes: 2 additions & 1 deletion lldb/source/Utility/XcodeSDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "lldb/Utility/XcodeSDK.h"

#include "lldb/lldb-types.h"
#include <string>

using namespace lldb;
using namespace lldb_private;
Expand Down Expand Up @@ -187,7 +188,7 @@ bool XcodeSDK::SDKSupportsModules(XcodeSDK::Type desired_type,
const std::string sdk_name_lower = sdk_name.lower();
Info info;
info.type = desired_type;
const llvm::StringRef sdk_string = GetCanonicalName(info);
const std::string sdk_string = GetCanonicalName(info);
if (!llvm::StringRef(sdk_name_lower).startswith(sdk_string))
return false;

Expand Down