From 30fa7e21826d4b9211d5e75daff704d339977cd7 Mon Sep 17 00:00:00 2001 From: Stephane Sezer Date: Tue, 24 Oct 2017 22:56:05 +0000 Subject: [PATCH] Remove some dead code from ClangExpressionDeclMap.cpp llvm-svn: 316526 --- .../Clang/ClangExpressionDeclMap.cpp | 50 ++-------------------- 1 file changed, 3 insertions(+), 47 deletions(-) diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp index e2a660c..07ff2e9 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp @@ -1540,17 +1540,17 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls( // a generic // data symbol, and -- if it is found -- treat it as a variable. Status error; - + const Symbol *data_symbol = m_parser_vars->m_sym_ctx.FindBestGlobalDataSymbol(name, error); - + if (!error.Success()) { const unsigned diag_id = m_ast_context->getDiagnostics().getCustomDiagID( clang::DiagnosticsEngine::Level::Error, "%0"); m_ast_context->getDiagnostics().Report(diag_id) << error.AsCString(); } - + if (data_symbol) { std::string warning("got name from symbols: "); warning.append(name.AsCString()); @@ -1565,49 +1565,6 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls( } } -// static opaque_compiler_type_t -// MaybePromoteToBlockPointerType -//( -// ASTContext *ast_context, -// opaque_compiler_type_t candidate_type -//) -//{ -// if (!candidate_type) -// return candidate_type; -// -// QualType candidate_qual_type = QualType::getFromOpaquePtr(candidate_type); -// -// const PointerType *candidate_pointer_type = -// dyn_cast(candidate_qual_type); -// -// if (!candidate_pointer_type) -// return candidate_type; -// -// QualType pointee_qual_type = candidate_pointer_type->getPointeeType(); -// -// const RecordType *pointee_record_type = -// dyn_cast(pointee_qual_type); -// -// if (!pointee_record_type) -// return candidate_type; -// -// RecordDecl *pointee_record_decl = pointee_record_type->getDecl(); -// -// if (!pointee_record_decl->isRecord()) -// return candidate_type; -// -// if -// (!pointee_record_decl->getName().startswith(llvm::StringRef("__block_literal_"))) -// return candidate_type; -// -// QualType generic_function_type = -// ast_context->getFunctionNoProtoType(ast_context->UnknownAnyTy); -// QualType block_pointer_type = -// ast_context->getBlockPointerType(generic_function_type); -// -// return block_pointer_type.getAsOpaquePtr(); -//} - bool ClangExpressionDeclMap::GetVariableValue(VariableSP &var, lldb_private::Value &var_location, TypeFromUser *user_type, @@ -1647,7 +1604,6 @@ bool ClangExpressionDeclMap::GetVariableValue(VariableSP &var, "There is no AST context for the current execution context"); return false; } - // var_clang_type = MaybePromoteToBlockPointerType (ast, var_clang_type); DWARFExpression &var_location_expr = var->LocationExpression(); -- 2.7.4