From owner-svn-src-projects@FreeBSD.ORG Wed Nov 26 16:23:33 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CFC8335; Wed, 26 Nov 2014 16:23:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E265E18; Wed, 26 Nov 2014 16:23:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQGNX4X035409; Wed, 26 Nov 2014 16:23:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQGNWq1035405; Wed, 26 Nov 2014 16:23:32 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201411261623.sAQGNWq1035405@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 26 Nov 2014 16:23:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r275125 - in projects/clang350-import/contrib/llvm/tools/lldb/source: Expression Symbol X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 16:23:33 -0000 Author: emaste Date: Wed Nov 26 16:23:32 2014 New Revision: 275125 URL: https://svnweb.freebsd.org/changeset/base/275125 Log: Revert Clang 3.4 API compatibility changes Re-apply previously reverted changes to restore LLDB to parity with the last update as of upstream revision 202189. This is the first step an LLDB update to correspond with the Clang 3.5 import and re-applies the following upstream revisions: SVN git 199408 3ad0a1a1 199689 05be72c3 200085 9ad47a93 Sponsored by: DARPA, AFRL Modified: projects/clang350-import/contrib/llvm/tools/lldb/source/Expression/ClangASTSource.cpp projects/clang350-import/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp Modified: projects/clang350-import/contrib/llvm/tools/lldb/source/Expression/ClangASTSource.cpp ============================================================================== --- projects/clang350-import/contrib/llvm/tools/lldb/source/Expression/ClangASTSource.cpp Wed Nov 26 16:05:01 2014 (r275124) +++ projects/clang350-import/contrib/llvm/tools/lldb/source/Expression/ClangASTSource.cpp Wed Nov 26 16:23:32 2014 (r275125) @@ -1778,14 +1778,14 @@ NameSearchContext::AddFunDecl (const Cla if (func_proto_type) { - unsigned NumArgs = func_proto_type->getNumArgs(); + unsigned NumArgs = func_proto_type->getNumParams(); unsigned ArgIndex; SmallVector parm_var_decls; for (ArgIndex = 0; ArgIndex < NumArgs; ++ArgIndex) { - QualType arg_qual_type (func_proto_type->getArgType(ArgIndex)); + QualType arg_qual_type (func_proto_type->getParamType(ArgIndex)); parm_var_decls.push_back(ParmVarDecl::Create (*ast, const_cast(m_decl_context), Modified: projects/clang350-import/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp ============================================================================== --- projects/clang350-import/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp Wed Nov 26 16:05:01 2014 (r275124) +++ projects/clang350-import/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp Wed Nov 26 16:23:32 2014 (r275125) @@ -414,7 +414,7 @@ ClangASTType::GetNumberOfFunctionArgumen QualType qual_type (GetCanonicalQualType()); const FunctionProtoType* func = dyn_cast(qual_type.getTypePtr()); if (func) - return func->getNumArgs(); + return func->getNumParams(); } return 0; } @@ -428,8 +428,8 @@ ClangASTType::GetFunctionArgumentAtIndex const FunctionProtoType* func = dyn_cast(qual_type.getTypePtr()); if (func) { - if (index < func->getNumArgs()) - return ClangASTType(m_ast, func->getArgType(index).getAsOpaquePtr()); + if (index < func->getNumParams()) + return ClangASTType(m_ast, func->getParamType(index).getAsOpaquePtr()); } } return ClangASTType(); @@ -1596,7 +1596,7 @@ ClangASTType::GetFunctionArgumentCount ( { const FunctionProtoType* func = dyn_cast(GetCanonicalQualType()); if (func) - return func->getNumArgs(); + return func->getNumParams(); } return -1; } @@ -1609,9 +1609,9 @@ ClangASTType::GetFunctionArgumentTypeAtI const FunctionProtoType* func = dyn_cast(GetCanonicalQualType()); if (func) { - const uint32_t num_args = func->getNumArgs(); + const uint32_t num_args = func->getNumParams(); if (idx < num_args) - return ClangASTType(m_ast, func->getArgType(idx)); + return ClangASTType(m_ast, func->getParamType(idx)); } } return ClangASTType(); @@ -1625,7 +1625,7 @@ ClangASTType::GetFunctionReturnType () c QualType qual_type(GetCanonicalQualType()); const FunctionProtoType* func = dyn_cast(qual_type.getTypePtr()); if (func) - return ClangASTType(m_ast, func->getResultType()); + return ClangASTType(m_ast, func->getReturnType()); } return ClangASTType(); } @@ -4648,7 +4648,7 @@ ClangASTType::AddMethodToCXXRecordType ( if (!method_function_prototype) return NULL; - unsigned int num_params = method_function_prototype->getNumArgs(); + unsigned int num_params = method_function_prototype->getNumParams(); CXXDestructorDecl *cxx_dtor_decl(NULL); CXXConstructorDecl *cxx_ctor_decl(NULL); @@ -4715,7 +4715,7 @@ ClangASTType::AddMethodToCXXRecordType ( cxx_method_decl = CXXConversionDecl::Create (*m_ast, cxx_record_decl, SourceLocation(), - DeclarationNameInfo (m_ast->DeclarationNames.getCXXConversionFunctionName (m_ast->getCanonicalType (function_type->getResultType())), SourceLocation()), + DeclarationNameInfo (m_ast->DeclarationNames.getCXXConversionFunctionName (m_ast->getCanonicalType (function_type->getReturnType())), SourceLocation()), method_qual_type, NULL, // TypeSourceInfo * is_inline, @@ -4746,7 +4746,7 @@ ClangASTType::AddMethodToCXXRecordType ( cxx_method_decl->setVirtualAsWritten (is_virtual); if (is_attr_used) - cxx_method_decl->addAttr(::new (*m_ast) UsedAttr(SourceRange(), *m_ast)); + cxx_method_decl->addAttr(clang::UsedAttr::CreateImplicit(*m_ast)); // Populate the method decl with parameter decls @@ -4761,7 +4761,7 @@ ClangASTType::AddMethodToCXXRecordType ( SourceLocation(), SourceLocation(), NULL, // anonymous - method_function_prototype->getArgType(param_index), + method_function_prototype->getParamType(param_index), NULL, SC_None, NULL)); @@ -5134,7 +5134,7 @@ ClangASTType::AddMethodToObjCObjectType bool is_defined = false; ObjCMethodDecl::ImplementationControl imp_control = ObjCMethodDecl::None; - const unsigned num_args = method_function_prototype->getNumArgs(); + const unsigned num_args = method_function_prototype->getNumParams(); if (num_args != num_selectors_with_args) return NULL; // some debug information is corrupt. We are not going to deal with it. @@ -5143,7 +5143,7 @@ ClangASTType::AddMethodToObjCObjectType SourceLocation(), // beginLoc, SourceLocation(), // endLoc, method_selector, - method_function_prototype->getResultType(), + method_function_prototype->getReturnType(), NULL, // TypeSourceInfo *ResultTInfo, GetDeclContextForType (), name[0] == '-', @@ -5169,7 +5169,7 @@ ClangASTType::AddMethodToObjCObjectType SourceLocation(), SourceLocation(), NULL, // anonymous - method_function_prototype->getArgType(param_index), + method_function_prototype->getParamType(param_index), NULL, SC_Auto, NULL));