This revision was not accepted when it landed; it landed in state "Needs 
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG65aa47301372: [clang][utils] Remove StringRef lldb summary 
provider (authored by kastiglione).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116987/new/

https://reviews.llvm.org/D116987

Files:
  clang/utils/ClangDataFormat.py


Index: clang/utils/ClangDataFormat.py
===================================================================
--- clang/utils/ClangDataFormat.py
+++ clang/utils/ClangDataFormat.py
@@ -24,7 +24,6 @@
 def __lldb_init_module(debugger, internal_dict):
        debugger.HandleCommand("type summary add -F 
ClangDataFormat.SourceLocation_summary clang::SourceLocation")
        debugger.HandleCommand("type summary add -F 
ClangDataFormat.QualType_summary clang::QualType")
-       debugger.HandleCommand("type summary add -F 
ClangDataFormat.StringRef_summary llvm::StringRef")
 
 def SourceLocation_summary(srcloc, internal_dict):
        return SourceLocation(srcloc).summary()
@@ -32,9 +31,6 @@
 def QualType_summary(qualty, internal_dict):
        return QualType(qualty).summary()
 
-def StringRef_summary(strref, internal_dict):
-       return StringRef(strref).summary()
-
 class SourceLocation(object):
        def __init__(self, srcloc):
                self.srcloc = srcloc
@@ -79,23 +75,6 @@
                        return "<NULL TYPE>"
                return desc
 
-class StringRef(object):
-       def __init__(self, strref):
-               self.strref = strref
-               self.Data_value = strref.GetChildAtIndex(0)
-               self.Length = strref.GetChildAtIndex(1).GetValueAsUnsigned()
-
-       def summary(self):
-               if self.Length == 0:
-                       return '""'
-               data = self.Data_value.GetPointeeData(0, self.Length)
-               error = lldb.SBError()
-               string = data.ReadRawData(error, 0, data.GetByteSize())
-               if error.Fail():
-                       return None
-               return '"%s"' % string
-
-
 # Key is a (function address, type name) tuple, value is the expression path 
for
 # an object with such a type name from inside that function.
 FramePathMapCache = {}


Index: clang/utils/ClangDataFormat.py
===================================================================
--- clang/utils/ClangDataFormat.py
+++ clang/utils/ClangDataFormat.py
@@ -24,7 +24,6 @@
 def __lldb_init_module(debugger, internal_dict):
 	debugger.HandleCommand("type summary add -F ClangDataFormat.SourceLocation_summary clang::SourceLocation")
 	debugger.HandleCommand("type summary add -F ClangDataFormat.QualType_summary clang::QualType")
-	debugger.HandleCommand("type summary add -F ClangDataFormat.StringRef_summary llvm::StringRef")
 
 def SourceLocation_summary(srcloc, internal_dict):
 	return SourceLocation(srcloc).summary()
@@ -32,9 +31,6 @@
 def QualType_summary(qualty, internal_dict):
 	return QualType(qualty).summary()
 
-def StringRef_summary(strref, internal_dict):
-	return StringRef(strref).summary()
-
 class SourceLocation(object):
 	def __init__(self, srcloc):
 		self.srcloc = srcloc
@@ -79,23 +75,6 @@
 			return "<NULL TYPE>"
 		return desc
 
-class StringRef(object):
-	def __init__(self, strref):
-		self.strref = strref
-		self.Data_value = strref.GetChildAtIndex(0)
-		self.Length = strref.GetChildAtIndex(1).GetValueAsUnsigned()
-
-	def summary(self):
-		if self.Length == 0:
-			return '""'
-		data = self.Data_value.GetPointeeData(0, self.Length)
-		error = lldb.SBError()
-		string = data.ReadRawData(error, 0, data.GetByteSize())
-		if error.Fail():
-			return None
-		return '"%s"' % string
-
-
 # Key is a (function address, type name) tuple, value is the expression path for
 # an object with such a type name from inside that function.
 FramePathMapCache = {}
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to