summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangExpressionDeclMap.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2012-02-18 02:01:03 +0000
committerSean Callanan <scallanan@apple.com>2012-02-18 02:01:03 +0000
commit5056ab04ad14df500b58c077313505bdd02984b3 (patch)
tree63494da2fd93293e50e0a9fd0f96a5d9e5df08f8 /lldb/source/Expression/ClangExpressionDeclMap.cpp
parent991aa50e448bde261128dd5efb54a9b42923aee9 (diff)
downloadbcm5719-llvm-5056ab04ad14df500b58c077313505bdd02984b3.tar.gz
bcm5719-llvm-5056ab04ad14df500b58c077313505bdd02984b3.zip
Ignore the constness of the object pointer when
fetching it. llvm-svn: 150861
Diffstat (limited to 'lldb/source/Expression/ClangExpressionDeclMap.cpp')
-rw-r--r--lldb/source/Expression/ClangExpressionDeclMap.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp
index 4e52d8f528c..02c93cb18f3 100644
--- a/lldb/source/Expression/ClangExpressionDeclMap.cpp
+++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp
@@ -1208,9 +1208,12 @@ ClangExpressionDeclMap::GetObjectPointer
return false;
}
+ const bool ignore_const = true;
+
VariableSP object_ptr_var = FindVariableInScope (*frame,
object_name,
- (suppress_type_check ? NULL : &m_struct_vars->m_object_pointer_type));
+ (suppress_type_check ? NULL : &m_struct_vars->m_object_pointer_type),
+ ignore_const);
if (!object_ptr_var)
{
@@ -2158,7 +2161,8 @@ ClangExpressionDeclMap::FindVariableInScope
(
StackFrame &frame,
const ConstString &name,
- TypeFromUser *type
+ TypeFromUser *type,
+ bool ignore_const
)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
@@ -2183,7 +2187,10 @@ ClangExpressionDeclMap::FindVariableInScope
{
if (type->GetASTContext() == var_sp->GetType()->GetClangAST())
{
- if (!ClangASTContext::AreTypesSame(type->GetASTContext(), type->GetOpaqueQualType(), var_sp->GetType()->GetClangFullType()))
+ if (!ClangASTContext::AreTypesSame(type->GetASTContext(),
+ type->GetOpaqueQualType(),
+ var_sp->GetType()->GetClangFullType(),
+ ignore_const))
return lldb::VariableSP();
}
else
OpenPOWER on IntegriCloud