[Lldb-commits] [lldb] r132827 - /lldb/trunk/include/lldb/Core/ConstString.h
Greg Clayton
gclayton at apple.com
Thu Jun 9 18:32:06 PDT 2011
Author: gclayton
Date: Thu Jun 9 20:32:06 2011
New Revision: 132827
URL: http://llvm.org/viewvc/llvm-project?rev=132827&view=rev
Log:
Added an llvm::StringRef accessor.
Modified:
lldb/trunk/include/lldb/Core/ConstString.h
Modified: lldb/trunk/include/lldb/Core/ConstString.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ConstString.h?rev=132827&r1=132826&r2=132827&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ConstString.h (original)
+++ lldb/trunk/include/lldb/Core/ConstString.h Thu Jun 9 20:32:06 2011
@@ -14,6 +14,8 @@
#include <assert.h>
#include "lldb/lldb-private.h"
+#include "llvm/ADT/StringRef.h"
+
namespace lldb_private {
@@ -232,6 +234,12 @@
return m_string;
}
+ llvm::StringRef
+ GetStringRef () const
+ {
+ return llvm::StringRef (m_string, GetLength());
+ }
+
const char *
GetCString () const
{
More information about the lldb-commits
mailing list