[Lldb-commits] [lldb] r114111 - in /lldb/trunk: include/lldb/Symbol/ClangASTContext.h source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp source/Symbol/ClangASTContext.cpp

Sean Callanan scallanan at apple.com
Thu Sep 16 13:40:25 PDT 2010


Author: spyffe
Date: Thu Sep 16 15:40:25 2010
New Revision: 114111

URL: http://llvm.org/viewvc/llvm-project?rev=114111&view=rev
Log:
Made CreateFunctionType static.  Also fixed the spelling
for CreateParameterDeclaration.

Modified:
    lldb/trunk/include/lldb/Symbol/ClangASTContext.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=114111&r1=114110&r2=114111&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Thu Sep 16 15:40:25 2010
@@ -346,16 +346,32 @@
                                int storage,
                                bool is_inline);
     
+    static void *
+    CreateFunctionType (clang::ASTContext *ast_context,
+                        void *result_type,
+                        void **args,
+                        unsigned num_args,
+                        bool is_variadic,
+                        unsigned type_quals);
+    
     void *
-    CreateFunctionType (void * result_type,
+    CreateFunctionType (void *result_type,
                         void **args,
                         unsigned num_args,
-                        bool isVariadic,
-                        unsigned TypeQuals);
+                        bool is_variadic,
+                        unsigned type_quals)
+    {
+        return ClangASTContext::CreateFunctionType(m_ast_context_ap.get(),
+                                                   result_type,
+                                                   args,
+                                                   num_args,
+                                                   is_variadic,
+                                                   type_quals);
+    }
     
     clang::ParmVarDecl *
-    CreateParmeterDeclaration (const char *name,
-                               void * return_type,
+    CreateParameterDeclaration (const char *name,
+                               void *param_type,
                                int storage);
 
     void

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=114111&r1=114110&r2=114111&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Thu Sep 16 15:40:25 2010
@@ -1987,7 +1987,7 @@
                     {
                         function_param_types.push_back (dc_type->GetOpaqueClangQualType());
 
-                        clang::ParmVarDecl *param_var_decl = type_list->GetClangASTContext().CreateParmeterDeclaration (name, dc_type->GetOpaqueClangQualType(), storage);
+                        clang::ParmVarDecl *param_var_decl = type_list->GetClangASTContext().CreateParameterDeclaration (name, dc_type->GetOpaqueClangQualType(), storage);
                         assert(param_var_decl);
                         function_param_decls.push_back(param_var_decl);
                     }

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=114111&r1=114110&r2=114111&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Sep 16 15:40:25 2010
@@ -2497,9 +2497,13 @@
 }
 
 void *
-ClangASTContext::CreateFunctionType (void *result_type, void **args, unsigned num_args, bool isVariadic, unsigned TypeQuals)
+ClangASTContext::CreateFunctionType (clang::ASTContext *ast_context,
+                                     void *result_type, 
+                                     void **args, 
+                                     unsigned num_args, 
+                                     bool is_variadic, 
+                                     unsigned type_quals)
 {
-    ASTContext *ast_context = getASTContext();
     assert (ast_context != NULL);
     std::vector<QualType> qual_type_args;
     for (unsigned i=0; i<num_args; ++i)
@@ -2509,8 +2513,8 @@
     return ast_context->getFunctionType(QualType::getFromOpaquePtr(result_type),
                                         qual_type_args.empty() ? NULL : &qual_type_args.front(),
                                         qual_type_args.size(),
-                                        isVariadic,
-                                        TypeQuals,
+                                        is_variadic,
+                                        type_quals,
                                         false,  // hasExceptionSpec
                                         false,  // hasAnyExceptionSpec,
                                         0,      // NumExs
@@ -2519,7 +2523,7 @@
 }
 
 ParmVarDecl *
-ClangASTContext::CreateParmeterDeclaration (const char *name, void *return_type, int storage)
+ClangASTContext::CreateParameterDeclaration (const char *name, void *param_type, int storage)
 {
     ASTContext *ast_context = getASTContext();
     assert (ast_context != NULL);
@@ -2527,7 +2531,7 @@
                                 ast_context->getTranslationUnitDecl(),
                                 SourceLocation(),
                                 name && name[0] ? &ast_context->Idents.get(name) : NULL,
-                                QualType::getFromOpaquePtr(return_type),
+                                QualType::getFromOpaquePtr(param_type),
                                 NULL,
                                 (VarDecl::StorageClass)storage,
                                 (VarDecl::StorageClass)storage,





More information about the lldb-commits mailing list