Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Feb 2014 20:31:51 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r262193 - in projects/lldb-r201577/contrib/llvm/tools/lldb/source: Expression Symbol
Message-ID:  <201402182031.s1IKVpdM035379@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Tue Feb 18 20:31:51 2014
New Revision: 262193
URL: http://svnweb.freebsd.org/changeset/base/262193

Log:
  Clang/LLVM 3.4 compatibility for the LLDB snapshot
  
  Revert commits that tracked Clang/LLVM API changes after the 3.4 branch
  point:
  
    Git    SVN
  3ad0a1a 199408
  05be72c 199689
  9ad47a9 200085

Modified:
  projects/lldb-r201577/contrib/llvm/tools/lldb/source/Expression/ClangASTSource.cpp
  projects/lldb-r201577/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp

Modified: projects/lldb-r201577/contrib/llvm/tools/lldb/source/Expression/ClangASTSource.cpp
==============================================================================
--- projects/lldb-r201577/contrib/llvm/tools/lldb/source/Expression/ClangASTSource.cpp	Tue Feb 18 20:27:17 2014	(r262192)
+++ projects/lldb-r201577/contrib/llvm/tools/lldb/source/Expression/ClangASTSource.cpp	Tue Feb 18 20:31:51 2014	(r262193)
@@ -1778,14 +1778,14 @@ NameSearchContext::AddFunDecl (const Cla
     
     if (func_proto_type)
     {        
-        unsigned NumArgs = func_proto_type->getNumParams();
+        unsigned NumArgs = func_proto_type->getNumArgs();
         unsigned ArgIndex;
         
         SmallVector<ParmVarDecl *, 5> parm_var_decls;
                 
         for (ArgIndex = 0; ArgIndex < NumArgs; ++ArgIndex)
         {
-            QualType arg_qual_type (func_proto_type->getParamType(ArgIndex));
+            QualType arg_qual_type (func_proto_type->getArgType(ArgIndex));
             
             parm_var_decls.push_back(ParmVarDecl::Create (*ast,
                                                           const_cast<DeclContext*>(m_decl_context),

Modified: projects/lldb-r201577/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp
==============================================================================
--- projects/lldb-r201577/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp	Tue Feb 18 20:27:17 2014	(r262192)
+++ projects/lldb-r201577/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp	Tue Feb 18 20:31:51 2014	(r262193)
@@ -414,7 +414,7 @@ ClangASTType::GetNumberOfFunctionArgumen
         QualType qual_type (GetCanonicalQualType());
         const FunctionProtoType* func = dyn_cast<FunctionProtoType>(qual_type.getTypePtr());
         if (func)
-            return func->getNumParams();
+            return func->getNumArgs();
     }
     return 0;
 }
@@ -428,8 +428,8 @@ ClangASTType::GetFunctionArgumentAtIndex
         const FunctionProtoType* func = dyn_cast<FunctionProtoType>(qual_type.getTypePtr());
         if (func)
         {
-            if (index < func->getNumParams())
-                return ClangASTType(m_ast, func->getParamType(index).getAsOpaquePtr());
+            if (index < func->getNumArgs())
+                return ClangASTType(m_ast, func->getArgType(index).getAsOpaquePtr());
         }
     }
     return ClangASTType();
@@ -1596,7 +1596,7 @@ ClangASTType::GetFunctionArgumentCount (
     {
         const FunctionProtoType* func = dyn_cast<FunctionProtoType>(GetCanonicalQualType());
         if (func)
-            return func->getNumParams();
+            return func->getNumArgs();
     }
     return -1;
 }
@@ -1609,9 +1609,9 @@ ClangASTType::GetFunctionArgumentTypeAtI
         const FunctionProtoType* func = dyn_cast<FunctionProtoType>(GetCanonicalQualType());
         if (func)
         {
-            const uint32_t num_args = func->getNumParams();
+            const uint32_t num_args = func->getNumArgs();
             if (idx < num_args)
-                return ClangASTType(m_ast, func->getParamType(idx));
+                return ClangASTType(m_ast, func->getArgType(idx));
         }
     }
     return ClangASTType();
@@ -1625,7 +1625,7 @@ ClangASTType::GetFunctionReturnType () c
         QualType qual_type(GetCanonicalQualType());
         const FunctionProtoType* func = dyn_cast<FunctionProtoType>(qual_type.getTypePtr());
         if (func)
-            return ClangASTType(m_ast, func->getReturnType());
+            return ClangASTType(m_ast, func->getResultType());
     }
     return ClangASTType();
 }
@@ -4648,7 +4648,7 @@ ClangASTType::AddMethodToCXXRecordType (
     if (!method_function_prototype)
         return NULL;
     
-    unsigned int num_params = method_function_prototype->getNumParams();
+    unsigned int num_params = method_function_prototype->getNumArgs();
     
     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->getReturnType())), SourceLocation()),
+                                                             DeclarationNameInfo (m_ast->DeclarationNames.getCXXConversionFunctionName (m_ast->getCanonicalType (function_type->getResultType())), 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(clang::UsedAttr::CreateImplicit(*m_ast));
+        cxx_method_decl->addAttr(::new (*m_ast) UsedAttr(SourceRange(), *m_ast));
     
     // Populate the method decl with parameter decls
     
@@ -4761,7 +4761,7 @@ ClangASTType::AddMethodToCXXRecordType (
                                                SourceLocation(),
                                                SourceLocation(),
                                                NULL, // anonymous
-                                               method_function_prototype->getParamType(param_index),
+                                               method_function_prototype->getArgType(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->getNumParams();
+    const unsigned num_args = method_function_prototype->getNumArgs();
     
     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->getReturnType(),
+                                                               method_function_prototype->getResultType(),
                                                                NULL, // TypeSourceInfo *ResultTInfo,
                                                                GetDeclContextForType (),
                                                                name[0] == '-',
@@ -5169,7 +5169,7 @@ ClangASTType::AddMethodToObjCObjectType 
                                                    SourceLocation(),
                                                    SourceLocation(),
                                                    NULL, // anonymous
-                                                   method_function_prototype->getParamType(param_index),
+                                                   method_function_prototype->getArgType(param_index),
                                                    NULL,
                                                    SC_Auto,
                                                    NULL));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402182031.s1IKVpdM035379>