Add const versions of SBFrame::GetFunctionName and SBFrame::IsInlined.
authorOleksiy Vyalov <ovyalov@google.com>
Thu, 25 Jun 2015 17:41:41 +0000 (17:41 +0000)
committerOleksiy Vyalov <ovyalov@google.com>
Thu, 25 Jun 2015 17:41:41 +0000 (17:41 +0000)
http://reviews.llvm.org/D10711

llvm-svn: 240660

lldb/include/lldb/API/SBFrame.h
lldb/scripts/interface/SBFrame.i
lldb/source/API/SBFrame.cpp

index 912765e..2ca9e06 100644 (file)
@@ -91,12 +91,18 @@ public:
     const char *
     GetFunctionName();
 
+    const char *
+    GetFunctionName() const;
+
     /// Return true if this frame represents an inlined function.
     ///
     /// See also GetFunctionName().
     bool
     IsInlined();
-    
+
+    bool
+    IsInlined() const;
+
     /// The version that doesn't supply a 'use_dynamic' value will use the
     /// target's default.
     lldb::SBValue
index 2211dd1..d87bc53 100644 (file)
@@ -128,6 +128,9 @@ public:
     const char *
     GetFunctionName();
 
+    const char *
+    GetFunctionName() const;
+
     %feature("docstring", "
     /// Return true if this frame represents an inlined function.
     ///
@@ -135,7 +138,10 @@ public:
     ") IsInlined;
     bool
     IsInlined();
-    
+
+    bool
+    IsInlined() const;
+
     %feature("docstring", "
     /// The version that doesn't supply a 'use_dynamic' value will use the
     /// target's default.
index 224b666..e845aef 100644 (file)
@@ -1501,6 +1501,12 @@ SBFrame::EvaluateExpression (const char *expr, const SBExpressionOptions &option
 bool
 SBFrame::IsInlined()
 {
+    return static_cast<const SBFrame*>(this)->IsInlined();
+}
+
+bool
+SBFrame::IsInlined() const
+{
     Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     ExecutionContext exe_ctx(m_opaque_sp.get());
     StackFrame *frame = NULL;
@@ -1538,6 +1544,12 @@ SBFrame::IsInlined()
 const char *
 SBFrame::GetFunctionName()
 {
+    return static_cast<const SBFrame*>(this)->GetFunctionName();
+}
+
+const char *
+SBFrame::GetFunctionName() const
+{
     Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     const char *name = NULL;
     ExecutionContext exe_ctx(m_opaque_sp.get());
@@ -1590,4 +1602,3 @@ SBFrame::GetFunctionName()
     }
     return name;
 }
-