From ba507b04e178f6a3b25003231ac2038a90d1d98c Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sun, 18 Oct 2015 19:34:38 +0000 Subject: 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 --- lldb/source/Commands/CommandObjectMemory.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lldb/source/Commands/CommandObjectMemory.cpp') diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index 35e6551..f91a6be 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(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(const_cast(tdecl->getTypeForDecl()))); } } } - + if (clang_ast_type.IsValid() == false) { if (type_list.GetSize() == 0) -- cgit v1.1