[Lldb-commits] [lldb] r316526 - Remove some dead code from ClangExpressionDeclMap.cpp

Stephane Sezer via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 24 15:56:05 PDT 2017


Author: sas
Date: Tue Oct 24 15:56:05 2017
New Revision: 316526

URL: http://llvm.org/viewvc/llvm-project?rev=316526&view=rev
Log:
Remove some dead code from ClangExpressionDeclMap.cpp

Modified:
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp?rev=316526&r1=316525&r2=316526&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp Tue Oct 24 15:56:05 2017
@@ -1540,17 +1540,17 @@ void ClangExpressionDeclMap::FindExterna
       // 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::FindExterna
   }
 }
 
-// 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<PointerType>(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<RecordType>(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::GetVariable
           "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();
 




More information about the lldb-commits mailing list