summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectMemory.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2015-10-18 19:34:38 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2015-10-18 19:34:38 +0000
commitba507b04e178f6a3b25003231ac2038a90d1d98c (patch)
tree890696e86092fe18fffec4c23fd7e925d51fa4f8 /lldb/source/Commands/CommandObjectMemory.cpp
parent8b8d2a4d999a392ebb90a5e6e739549314a3b52b (diff)
downloadbcm5719-llvm-ba507b04e178f6a3b25003231ac2038a90d1d98c.tar.gz
bcm5719-llvm-ba507b04e178f6a3b25003231ac2038a90d1d98c.zip
Silence -Wqual-cast warnings from GCC 5.2
There were a number of const qualifiers being cast away which caused warnings. This cluttered the output hiding real errors. Silence them by explicit casting. NFC. llvm-svn: 250662
Diffstat (limited to 'lldb/source/Commands/CommandObjectMemory.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index 35e65514abc..f91a6be6d79 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -527,20 +527,21 @@ protected:
1,
type_list);
}
-
+
if (type_list.GetSize() == 0 && lookup_type_name.GetCString() && *lookup_type_name.GetCString() == '$')
{
if (ClangPersistentVariables *persistent_vars = llvm::dyn_cast_or_null<ClangPersistentVariables>(target->GetPersistentExpressionStateForLanguage(lldb::eLanguageTypeC)))
{
clang::TypeDecl *tdecl = persistent_vars->GetPersistentType(ConstString(lookup_type_name));
-
+
if (tdecl)
{
- clang_ast_type.SetCompilerType(ClangASTContext::GetASTContext(&tdecl->getASTContext()),(const lldb::opaque_compiler_type_t)tdecl->getTypeForDecl());
+ clang_ast_type.SetCompilerType(ClangASTContext::GetASTContext(&tdecl->getASTContext()),
+ reinterpret_cast<lldb::opaque_compiler_type_t>(const_cast<clang::Type*>(tdecl->getTypeForDecl())));
}
}
}
-
+
if (clang_ast_type.IsValid() == false)
{
if (type_list.GetSize() == 0)
OpenPOWER on IntegriCloud