Fix a dangling-gsl warning and avoid transitively including string.
authorEric Christopher <echristo@gmail.com>
Fri, 24 Apr 2020 23:02:52 +0000 (16:02 -0700)
committerEric Christopher <echristo@gmail.com>
Fri, 24 Apr 2020 23:03:17 +0000 (16:03 -0700)
lldb/source/Utility/XcodeSDK.cpp

index a34eac6..197eef1 100644 (file)
@@ -10,6 +10,7 @@
 #include "lldb/Utility/XcodeSDK.h"
 
 #include "lldb/lldb-types.h"
+#include <string>
 
 using namespace lldb;
 using namespace lldb_private;
@@ -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;