[Lldb-commits] [lldb] r114132 - in /lldb/trunk: include/lldb/Symbol/ClangASTContext.h source/Symbol/ClangASTContext.cpp

Johnny Chen johnny.chen at apple.com
Thu Sep 16 16:51:14 PDT 2010


Author: johnny
Date: Thu Sep 16 18:51:14 2010
New Revision: 114132

URL: http://llvm.org/viewvc/llvm-project?rev=114132&view=rev
Log:
Reverted r114125, r114124, and r114123 as it broke the test suite - segfaults
when running test/class_types.

Modified:
    lldb/trunk/include/lldb/Symbol/ClangASTContext.h
    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=114132&r1=114131&r2=114132&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Thu Sep 16 18:51:14 2010
@@ -92,14 +92,8 @@
         uint32_t dw_ate,
         uint32_t bit_size);
 
-    static void *
-    GetBuiltInType_void(clang::ASTContext *ast_context);
-    
     void *
-    GetBuiltInType_void()
-    {
-        return ClangASTContext::GetBuiltInType_void(m_ast_context_ap.get());
-    }
+    GetBuiltInType_void();
 
     void *
     GetBuiltInType_objc_id();
@@ -160,23 +154,6 @@
                       lldb::LanguageType language);
 
     static bool
-    AddMethodToCXXRecordType(clang::ASTContext *ast_context,
-                             void *record_clang_type,
-                             const char *name,
-                             void *method_type);
-    
-    bool
-    AddMethodToCXXRecordType(void *record_clang_type,
-                             const char *name,
-                             void *method_type)
-    {
-        return ClangASTContext::AddMethodToCXXRecordType(m_ast_context_ap.get(),
-                                                         record_clang_type,
-                                                         name,
-                                                         method_type);
-    }
-    
-    static bool
     AddFieldToRecordType (clang::ASTContext *ast_context,
                           void *record_qual_type,
                           const char *name,

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=114132&r1=114131&r2=114132&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Sep 16 18:51:14 2010
@@ -658,9 +658,9 @@
 }
 
 void *
-ClangASTContext::GetBuiltInType_void(clang::ASTContext *ast_context)
+ClangASTContext::GetBuiltInType_void()
 {
-    return ast_context->VoidTy.getAsOpaquePtr();
+    return getASTContext()->VoidTy.getAsOpaquePtr();
 }
 
 void *
@@ -804,57 +804,6 @@
 }
 
 bool
-ClangASTContext::AddMethodToCXXRecordType
-(
-    clang::ASTContext *ast_context,
-    void *record_clang_type,
-    const char *name,
-    void *method_type
-)
-{
-    if (!record_clang_type || !method_type || !name)
-        return false;
-        
-    assert(ast_context);
-    
-    IdentifierTable *identifier_table = &ast_context->Idents;
-    
-    assert(identifier_table);
-    
-    QualType record_qual_type(QualType::getFromOpaquePtr(record_clang_type));
-    clang::Type *record_type(record_qual_type.getTypePtr());
-    
-    if (!record_type)
-        return false;
-    
-    RecordType *record_recty(dyn_cast<RecordType>(record_type));
-    
-    if (!record_recty)
-        return false;
-    
-    RecordDecl *record_decl = record_recty->getDecl();
-    
-    if (!record_decl)
-        return false;
-    
-    CXXRecordDecl *cxx_record_decl = dyn_cast<CXXRecordDecl>(record_decl);
-    
-    if (!cxx_record_decl)
-        return false;
-    
-    CXXMethodDecl *cxx_method_decl = CXXMethodDecl::Create(*ast_context,
-                                                           cxx_record_decl, 
-                                                           SourceLocation(), 
-                                                           DeclarationName(&identifier_table->get(name)), 
-                                                           QualType::getFromOpaquePtr(method_type), 
-                                                           NULL);
-    
-    cxx_record_decl->addDecl(cxx_method_decl);
-    
-    return true;
-}
-
-bool
 ClangASTContext::AddFieldToRecordType 
 (
     clang::ASTContext *ast_context,





More information about the lldb-commits mailing list