[Lldb-commits] [lldb] 6a9edce - Fix a dangling-gsl warning and avoid transitively including string.

Eric Christopher via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 24 16:03:30 PDT 2020


Author: Eric Christopher
Date: 2020-04-24T16:03:17-07:00
New Revision: 6a9edce25778e6c131914ab2e6c3f8528785a8df

URL: https://github.com/llvm/llvm-project/commit/6a9edce25778e6c131914ab2e6c3f8528785a8df
DIFF: https://github.com/llvm/llvm-project/commit/6a9edce25778e6c131914ab2e6c3f8528785a8df.diff

LOG: Fix a dangling-gsl warning and avoid transitively including string.

Added: 
    

Modified: 
    lldb/source/Utility/XcodeSDK.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Utility/XcodeSDK.cpp b/lldb/source/Utility/XcodeSDK.cpp
index a34eac6b2c95..197eef182f69 100644
--- a/lldb/source/Utility/XcodeSDK.cpp
+++ b/lldb/source/Utility/XcodeSDK.cpp
@@ -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;
 


        


More information about the lldb-commits mailing list