[Lldb-commits] [lldb] r114622 - in /lldb/trunk: ./ include/lldb/Expression/ include/lldb/Symbol/ scripts/ source/Expression/ source/Plugins/SymbolFile/DWARF/ source/Symbol/

Sean Callanan scallanan at apple.com
Wed Sep 22 20:01:22 PDT 2010


Author: spyffe
Date: Wed Sep 22 22:01:22 2010
New Revision: 114622

URL: http://llvm.org/viewvc/llvm-project?rev=114622&view=rev
Log:
Updated to latest LLVM.  Major LLVM changes:

 - Sema is now exported (and there was much rejoicing.)

 - Storage classes are now centrally defined.

Also fixed some bugs that the new LLVM picked up.

Modified:
    lldb/trunk/include/lldb/Expression/ASTResultSynthesizer.h
    lldb/trunk/include/lldb/Expression/ClangASTSource.h
    lldb/trunk/include/lldb/Expression/ClangExpressionParser.h
    lldb/trunk/include/lldb/Symbol/ClangASTContext.h
    lldb/trunk/llvm.zip
    lldb/trunk/scripts/build-llvm.pl
    lldb/trunk/source/Expression/ASTResultSynthesizer.cpp
    lldb/trunk/source/Expression/ASTStructExtractor.cpp
    lldb/trunk/source/Expression/ClangASTSource.cpp
    lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
    lldb/trunk/source/Expression/ClangExpressionParser.cpp
    lldb/trunk/source/Expression/IRDynamicChecks.cpp
    lldb/trunk/source/Expression/IRForTarget.cpp
    lldb/trunk/source/Expression/IRToDWARF.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Symbol/ClangASTContext.cpp
    lldb/trunk/source/Symbol/ClangASTType.cpp

Modified: lldb/trunk/include/lldb/Expression/ASTResultSynthesizer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ASTResultSynthesizer.h?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ASTResultSynthesizer.h (original)
+++ lldb/trunk/include/lldb/Expression/ASTResultSynthesizer.h Wed Sep 22 22:01:22 2010
@@ -128,7 +128,6 @@
     clang::ASTConsumer *m_passthrough;          ///< The ASTConsumer down the chain, for passthrough.  NULL if it's a SemaConsumer.
     clang::SemaConsumer *m_passthrough_sema;    ///< The SemaConsumer down the chain, for passthrough.  NULL if it's an ASTConsumer.
     clang::Sema *m_sema;                        ///< The Sema to use.
-    clang::Action *m_action;                    ///< The Sema to use, cast to an Action so it's usable.
 };
 
 }

Modified: lldb/trunk/include/lldb/Expression/ClangASTSource.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangASTSource.h?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangASTSource.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangASTSource.h Wed Sep 22 22:01:22 2010
@@ -10,6 +10,7 @@
 #ifndef liblldb_ClangASTSource_h_
 #define liblldb_ClangASTSource_h_
 
+#include "clang/Basic/IdentifierTable.h"
 #include "clang/Sema/ExternalSemaSource.h"
 
 namespace lldb_private {
@@ -88,8 +89,13 @@
     /// @return
     ///     Whatever SetExternalVisibleDeclsForName returns.
     //------------------------------------------------------------------
-    clang::DeclContext::lookup_result FindExternalVisibleDeclsByName(const clang::DeclContext *DC,
-                                                                     clang::DeclarationName Name);
+    clang::DeclContextLookupResult FindExternalVisibleDeclsByName(const clang::DeclContext *DC,
+                                                                  clang::DeclarationName Name);
+    
+    //------------------------------------------------------------------
+    /// Interface stub.
+    //------------------------------------------------------------------
+    void MaterializeVisibleDecls(const clang::DeclContext *DC);
 	
     //------------------------------------------------------------------
     /// Interface stub that returns true.

Modified: lldb/trunk/include/lldb/Expression/ClangExpressionParser.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangExpressionParser.h?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangExpressionParser.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangExpressionParser.h Wed Sep 22 22:01:22 2010
@@ -173,7 +173,6 @@
     ClangExpression                            &m_expr;                 ///< The expression to be parsed
     
     std::string                                 m_target_triple;        ///< The target triple used to initialize LLVM
-    std::auto_ptr<clang::TextDiagnosticBuffer>  m_diagnostic_buffer;    ///< The container for errors produced by the compiler
     std::auto_ptr<clang::CompilerInstance>      m_compiler;             ///< The Clang compiler used to parse expressions into IR
     std::auto_ptr<clang::Builtin::Context>      m_builtin_context;      ///< Context for Clang built-ins
     std::auto_ptr<clang::ASTContext>            m_ast_context;          ///< The AST context used to hold types and names for the parser

Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Wed Sep 22 22:01:22 2010
@@ -186,14 +186,14 @@
     AddMethodToCXXRecordType (clang::ASTContext *ast_context,
                               void *record_opaque_type,
                               const char *name,
-                              void *method_opaque_type,
+                              void *method_type,
                               lldb::AccessType access,
                               bool is_virtual);
     
     clang::CXXMethodDecl *
     AddMethodToCXXRecordType (void *record_opaque_type,
                               const char *name,
-                              void *method_opaque_type,
+                              void *method_type,
                               lldb::AccessType access,
                               bool is_virtual)
     
@@ -201,7 +201,7 @@
         return ClangASTContext::AddMethodToCXXRecordType(getASTContext(),
                                                          record_opaque_type,
                                                          name,
-                                                         method_opaque_type,
+                                                         method_type,
                                                          access,
                                                          is_virtual);
     }

Modified: lldb/trunk/llvm.zip
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/llvm.zip?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
Binary files - no diff available.

Modified: lldb/trunk/scripts/build-llvm.pl
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/build-llvm.pl?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/scripts/build-llvm.pl (original)
+++ lldb/trunk/scripts/build-llvm.pl Wed Sep 22 22:01:22 2010
@@ -25,15 +25,14 @@
 
 our $llvm_configuration = $ENV{LLVM_CONFIGURATION};
 
-our $llvm_revision = "'{2010-08-02T16:00}'";
+our $llvm_revision = "'{2010-09-22T21:20}'";
 our $llvm_source_dir = "$ENV{SRCROOT}";
 our $cc = "$ENV{DEVELOPER_BIN_DIR}/gcc-4.2";
 our $cxx = "$ENV{DEVELOPER_BIN_DIR}/g++-4.2";
 our @archs = split (/\s+/, $ENV{ARCHS});
 
 our @archive_files = (  
-	"$llvm_configuration/lib/libplugin_llvmc_Base.a",
-	"$llvm_configuration/lib/libplugin_llvmc_Clang.a",
+    "$llvm_configuration/lib/libclang.a",
 	"$llvm_configuration/lib/libclangAnalysis.a",
 	"$llvm_configuration/lib/libclangAST.a",
 	"$llvm_configuration/lib/libclangBasic.a",
@@ -45,6 +44,7 @@
 	"$llvm_configuration/lib/libclangRewrite.a",
 	"$llvm_configuration/lib/libclangParse.a",
 	"$llvm_configuration/lib/libclangSema.a",
+    "$llvm_configuration/lib/libclangSerialization.a",
 	"$llvm_configuration/lib/libCompilerDriver.a",
 	"$llvm_configuration/lib/libEnhancedDisassembly.a",
 	"$llvm_configuration/lib/libLLVMAnalysis.a",
@@ -407,6 +407,7 @@
 	}
 	close (FILES);
     do_command ("libtool -static -o '$arch_output_file' -filelist '$files'");
+    do_command ("ranlib '$arch_output_file'");
 
 	foreach $object_dir (@object_dirs)
 	{

Modified: lldb/trunk/source/Expression/ASTResultSynthesizer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ASTResultSynthesizer.cpp?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ASTResultSynthesizer.cpp (original)
+++ lldb/trunk/source/Expression/ASTResultSynthesizer.cpp Wed Sep 22 22:01:22 2010
@@ -14,9 +14,7 @@
 #include "clang/AST/DeclGroup.h"
 #include "clang/AST/Expr.h"
 #include "clang/AST/Stmt.h"
-#include "clang/Parse/Action.h"
 #include "clang/Parse/Parser.h"
-#include "clang/Parse/Scope.h"
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/raw_ostream.h"
 #include "lldb/Core/Log.h"
@@ -30,8 +28,7 @@
     m_ast_context (NULL),
     m_passthrough (passthrough),
     m_passthrough_sema (NULL),
-    m_sema (NULL),
-    m_action (NULL)
+    m_sema (NULL)
 {
     if (!m_passthrough)
         return;
@@ -73,8 +70,7 @@
     
     if (m_ast_context &&
         function_decl &&
-        !strcmp(function_decl->getNameAsCString(),
-                "___clang_expr"))
+        !function_decl->getNameInfo().getAsString().compare("___clang_expr"))
     {
         SynthesizeResult(function_decl);
     }
@@ -176,8 +172,8 @@
                                                   &result_id, 
                                                   expr_qual_type, 
                                                   NULL, 
-                                                  VarDecl::Static, 
-                                                  VarDecl::Static);
+                                                  SC_Static, 
+                                                  SC_Static);
     
     if (!result_decl)
         return false;
@@ -187,27 +183,24 @@
     ///////////////////////////////
     // call AddInitializerToDecl
     //
-    
-    Parser::DeclPtrTy result_decl_ptr;
-    result_decl_ptr.set(result_decl);
-    
-    m_action->AddInitializerToDecl(result_decl_ptr, Parser::ExprArg(*m_action, last_expr));
+        
+    m_sema->AddInitializerToDecl(result_decl, last_expr);
     
     /////////////////////////////////
     // call ConvertDeclToDeclGroup
     //
     
-    Parser::DeclGroupPtrTy result_decl_group_ptr;
+    Sema::DeclGroupPtrTy result_decl_group_ptr;
     
-    result_decl_group_ptr = m_action->ConvertDeclToDeclGroup(result_decl_ptr);
+    result_decl_group_ptr = m_sema->ConvertDeclToDeclGroup(result_decl);
     
     ////////////////////////
     // call ActOnDeclStmt
     //
     
-    Parser::OwningStmtResult result_initialization_stmt_result(m_action->ActOnDeclStmt(result_decl_group_ptr,
-                                                                                       SourceLocation(),
-                                                                                       SourceLocation()));
+    StmtResult result_initialization_stmt_result(m_sema->ActOnDeclStmt(result_decl_group_ptr,
+                                                                       SourceLocation(),
+                                                                       SourceLocation()));
     
     ////////////////////////////////////////////////
     // replace the old statement with the new one
@@ -269,7 +262,6 @@
 ASTResultSynthesizer::InitializeSema(Sema &S)
 {
     m_sema = &S;
-    m_action = reinterpret_cast<Action*>(m_sema);
     
     if (m_passthrough_sema)
         m_passthrough_sema->InitializeSema(S);
@@ -279,7 +271,6 @@
 ASTResultSynthesizer::ForgetSema() 
 {
     m_sema = NULL;
-    m_action = NULL;
     
     if (m_passthrough_sema)
         m_passthrough_sema->ForgetSema();

Modified: lldb/trunk/source/Expression/ASTStructExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ASTStructExtractor.cpp?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ASTStructExtractor.cpp (original)
+++ lldb/trunk/source/Expression/ASTStructExtractor.cpp Wed Sep 22 22:01:22 2010
@@ -15,9 +15,8 @@
 #include "clang/AST/Expr.h"
 #include "clang/AST/RecordLayout.h"
 #include "clang/AST/Stmt.h"
-#include "clang/Parse/Action.h"
 #include "clang/Parse/Parser.h"
-#include "clang/Parse/Scope.h"
+#include "clang/Sema/Sema.h"
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/raw_ostream.h"
 #include "lldb/Core/Log.h"
@@ -111,7 +110,7 @@
     
     if (m_ast_context &&
         function_decl &&
-        !m_function.m_wrapper_function_name.compare(function_decl->getNameAsCString()))
+        !m_function.m_wrapper_function_name.compare(function_decl->getNameAsString().c_str()))
     {
         ExtractFromFunctionDecl(function_decl);
     }

Modified: lldb/trunk/source/Expression/ClangASTSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangASTSource.cpp?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangASTSource.cpp (original)
+++ lldb/trunk/source/Expression/ClangASTSource.cpp Wed Sep 22 22:01:22 2010
@@ -74,6 +74,11 @@
     return SetExternalVisibleDeclsForName(DC, Name, Decls);
 }
 
+void ClangASTSource::MaterializeVisibleDecls(const DeclContext *DC)
+{
+    return;
+}
+
 // This is used to support iterating through an entire lexical context,
 // which isn't something the debugger should ever need to do.
 bool ClangASTSource::FindExternalLexicalDecls(const DeclContext *DC, llvm::SmallVectorImpl<Decl*> &Decls) {
@@ -94,8 +99,8 @@
                                              ii, 
                                              QualType::getFromOpaquePtr(type), 
                                              0, 
-                                             VarDecl::Static, 
-                                             VarDecl::Static);
+                                             SC_Static, 
+                                             SC_Static);
     Decls.push_back(Decl);
     
     return Decl;
@@ -108,8 +113,8 @@
                                                      Name.getAsIdentifierInfo(),
                                                      QualType::getFromOpaquePtr(type),
                                                      NULL,
-                                                     FunctionDecl::Static,
-                                                     FunctionDecl::Static,
+                                                     SC_Static,
+                                                     SC_Static,
                                                      false,
                                                      true);
     
@@ -138,8 +143,8 @@
                                                          NULL,
                                                          ArgQT,
                                                          NULL,
-                                                         ParmVarDecl::Static,
-                                                         ParmVarDecl::Static,
+                                                         SC_Static,
+                                                         SC_Static,
                                                          NULL);
         }
         

Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Wed Sep 22 22:01:22 2010
@@ -13,6 +13,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
+#include "clang/AST/DeclarationName.h"
 #include "lldb/lldb-private.h"
 #include "lldb/Core/Address.h"
 #include "lldb/Core/Error.h"
@@ -1205,12 +1206,12 @@
                                                                  false,
                                                                  ClangASTContext::GetTypeQualifiers(copied_type));
         
-        ClangASTContext::AddMethodToCXXRecordType (parser_ast_context,
-                                                   copied_type,
-                                                   "___clang_expr",
-                                                   method_type,
-                                                   lldb::eAccessPublic,
-                                                   false);
+        ClangASTContext::AddMethodToCXXRecordType(parser_ast_context,
+                                                  copied_type,
+                                                  "___clang_expr",
+                                                  method_type,
+                                                  lldb::eAccessPublic,
+                                                  false);
     }
     
     context.AddTypeDecl(copied_type);

Modified: lldb/trunk/source/Expression/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionParser.cpp?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionParser.cpp Wed Sep 22 22:01:22 2010
@@ -43,8 +43,8 @@
 #include "clang/Frontend/TextDiagnosticPrinter.h"
 #include "clang/Frontend/VerifyDiagnosticsClient.h"
 #include "clang/Lex/Preprocessor.h"
+#include "clang/Parse/ParseAST.h"
 #include "clang/Rewrite/FrontendActions.h"
-#include "clang/Sema/ParseAST.h"
 #include "clang/Sema/SemaConsumer.h"
 
 #include "llvm/ADT/StringRef.h"
@@ -239,8 +239,7 @@
     
     // 4. Set up the diagnostic buffer for reporting errors
     
-    m_diagnostic_buffer.reset(new clang::TextDiagnosticBuffer);
-    m_compiler->getDiagnostics().setClient(m_diagnostic_buffer.get());
+    m_compiler->getDiagnostics().setClient(new clang::TextDiagnosticBuffer);
     
     // 5. Set up the source management objects inside the compiler
     
@@ -288,12 +287,14 @@
 unsigned
 ClangExpressionParser::Parse (Stream &stream)
 {
-    m_diagnostic_buffer->FlushDiagnostics (m_compiler->getDiagnostics());
+    TextDiagnosticBuffer *diag_buf = static_cast<TextDiagnosticBuffer*>(m_compiler->getDiagnostics().getClient());
+        
+    diag_buf->FlushDiagnostics (m_compiler->getDiagnostics());
     
     MemoryBuffer *memory_buffer = MemoryBuffer::getMemBufferCopy(m_expr.Text(), __FUNCTION__);
     FileID memory_buffer_file_id = m_compiler->getSourceManager().createMainFileIDForMemBuffer (memory_buffer);
     
-    m_diagnostic_buffer->BeginSourceFile(m_compiler->getLangOpts(), &m_compiler->getPreprocessor());
+    diag_buf->BeginSourceFile(m_compiler->getLangOpts(), &m_compiler->getPreprocessor());
     
     ASTConsumer *ast_transformer = m_expr.ASTTransformer(m_code_generator.get());
     
@@ -302,21 +303,21 @@
     else 
         ParseAST(m_compiler->getPreprocessor(), m_code_generator.get(), m_compiler->getASTContext());    
     
-    m_diagnostic_buffer->EndSourceFile();
+    diag_buf->EndSourceFile();
     
     TextDiagnosticBuffer::const_iterator diag_iterator;
     
     int num_errors = 0;
         
-    for (diag_iterator = m_diagnostic_buffer->warn_begin();
-         diag_iterator != m_diagnostic_buffer->warn_end();
+    for (diag_iterator = diag_buf->warn_begin();
+         diag_iterator != diag_buf->warn_end();
          ++diag_iterator)
         stream.Printf("warning: %s\n", (*diag_iterator).second.c_str());
     
     num_errors = 0;
     
-    for (diag_iterator = m_diagnostic_buffer->err_begin();
-         diag_iterator != m_diagnostic_buffer->err_end();
+    for (diag_iterator = diag_buf->err_begin();
+         diag_iterator != diag_buf->err_end();
          ++diag_iterator)
     {
         num_errors++;

Modified: lldb/trunk/source/Expression/IRDynamicChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRDynamicChecks.cpp?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRDynamicChecks.cpp (original)
+++ lldb/trunk/source/Expression/IRDynamicChecks.cpp Wed Sep 22 22:01:22 2010
@@ -478,7 +478,7 @@
 
 IRDynamicChecks::IRDynamicChecks(DynamicCheckerFunctions &checker_functions,
                                  const char *func_name) :
-    ModulePass(&ID),
+    ModulePass(ID),
     m_checker_functions(checker_functions),
     m_func_name(func_name)
 {

Modified: lldb/trunk/source/Expression/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRForTarget.cpp?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRForTarget.cpp (original)
+++ lldb/trunk/source/Expression/IRForTarget.cpp Wed Sep 22 22:01:22 2010
@@ -34,7 +34,7 @@
                          const TargetData *target_data,
                          bool resolve_vars,
                          const char *func_name) :
-    ModulePass(&ID),
+    ModulePass(ID),
     m_decl_map(decl_map),
     m_target_data(target_data),
     m_sel_registerName(NULL),
@@ -728,12 +728,22 @@
 
 static bool isGuardVariableRef(Value *V)
 {
-    ConstantExpr *C = dyn_cast<ConstantExpr>(V);
+    Constant *C;
     
-    if (!C || C->getOpcode() != Instruction::BitCast)
+    if (!(C = dyn_cast<Constant>(V)))
         return false;
     
-    GlobalVariable *GV = dyn_cast<GlobalVariable>(C->getOperand(0));
+    ConstantExpr *CE;
+    
+    if ((CE = dyn_cast<ConstantExpr>(V)))
+    {
+        if (CE->getOpcode() != Instruction::BitCast)
+            return false;
+        
+        C = CE->getOperand(0);
+    }
+    
+    GlobalVariable *GV = dyn_cast<GlobalVariable>(C);
     
     if (!GV || !GV->hasName() || !GV->getName().startswith("_ZGV"))
         return false;

Modified: lldb/trunk/source/Expression/IRToDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRToDWARF.cpp?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRToDWARF.cpp (original)
+++ lldb/trunk/source/Expression/IRToDWARF.cpp Wed Sep 22 22:01:22 2010
@@ -30,7 +30,7 @@
                      lldb_private::ClangExpressionDeclMap *decl_map,
                      lldb_private::StreamString &strm,
                      const char *func_name) :
-    ModulePass(&ID),
+    ModulePass(ID),
     m_local_vars(local_vars),
     m_decl_map(decl_map),
     m_strm(strm),

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=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Wed Sep 22 22:01:22 2010
@@ -1126,7 +1126,7 @@
                 unsigned type_quals = 0;
                 AccessType accessibility = default_accessibility;
 
-                clang::FunctionDecl::StorageClass storage = clang::FunctionDecl::None;//, Extern, Static, PrivateExtern
+                clang::FunctionDecl::StorageClass storage = clang::SC_None;//, Extern, Static, PrivateExtern
                 const char *type_name_cstr = NULL;
                 ConstString type_name_dbstr;
 
@@ -1157,10 +1157,10 @@
                             case DW_AT_external:
                                 if (form_value.Unsigned())
                                 {
-                                    if (storage == clang::FunctionDecl::None)
-                                        storage = clang::FunctionDecl::Extern;
+                                    if (storage == clang::SC_None)
+                                        storage = clang::SC_Extern;
                                     else
-                                        storage = clang::FunctionDecl::PrivateExtern;
+                                        storage = clang::SC_PrivateExtern;
                                 }
                                 break;
                             case DW_AT_inline:
@@ -2058,7 +2058,7 @@
                     bool is_artificial = false;
                     // one of None, Auto, Register, Extern, Static, PrivateExtern
 
-                    clang::VarDecl::StorageClass storage = clang::VarDecl::None;
+                    clang::StorageClass storage = clang::SC_None;
                     uint32_t i;
                     for (i=0; i<num_attributes; ++i)
                     {
@@ -2841,7 +2841,7 @@
                     bool is_variadic = false;
                     bool is_inline = false;
                     unsigned type_quals = 0;
-                    clang::FunctionDecl::StorageClass storage = clang::FunctionDecl::None;//, Extern, Static, PrivateExtern
+                    clang::StorageClass storage = clang::SC_None;//, Extern, Static, PrivateExtern
 
 
                     const size_t num_attributes = die->GetAttributes(this, dwarf_cu, NULL, attributes);
@@ -2871,10 +2871,10 @@
                                 case DW_AT_external:
                                     if (form_value.Unsigned())
                                     {
-                                        if (storage == clang::FunctionDecl::None)
-                                            storage = clang::FunctionDecl::Extern;
+                                        if (storage == clang::SC_None)
+                                            storage = clang::SC_Extern;
                                         else
-                                            storage = clang::FunctionDecl::PrivateExtern;
+                                            storage = clang::SC_PrivateExtern;
                                     }
                                     break;
                                 case DW_AT_inline:

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed Sep 22 22:01:22 2010
@@ -847,15 +847,16 @@
     QualType method_qual_type(QualType::getFromOpaquePtr(method_opaque_type));
     
     CXXMethodDecl *cxx_method_decl = CXXMethodDecl::Create(*ast_context,
-                                                           cxx_record_decl, 
-                                                           SourceLocation(), 
-                                                           DeclarationName(&identifier_table->get(name)), 
-                                                           method_qual_type, 
+                                                           cxx_record_decl,
+                                                           DeclarationNameInfo(DeclarationName(&identifier_table->get(name)), SourceLocation()),
+                                                           method_qual_type,
                                                            NULL);
     
-    cxx_method_decl->setAccess (ConvertAccessTypeToAccessSpecifier (access));
-    cxx_method_decl->setVirtualAsWritten (is_virtual);
-
+    clang::AccessSpecifier AS = ConvertAccessTypeToAccessSpecifier(access);
+    
+    cxx_method_decl->setAccess(AS);
+    cxx_method_decl->setVirtualAsWritten(is_virtual);
+    
     // Populate the method decl with parameter decls
     clang::Type *method_type(method_qual_type.getTypePtr());
     
@@ -881,8 +882,8 @@
                                                   NULL, // anonymous
                                                   method_funprototy->getArgType(param_index), 
                                                   NULL,
-                                                  VarDecl::Auto, 
-                                                  VarDecl::Auto,
+                                                  SC_Auto, 
+                                                  SC_Auto,
                                                   NULL); 
     }
     
@@ -946,7 +947,7 @@
             if (bitfield_bit_size != 0)
             {
                 APInt bitfield_bit_size_apint(ast_context->getTypeSize(ast_context->IntTy), bitfield_bit_size);
-                bit_width = new (*ast_context)IntegerLiteral (bitfield_bit_size_apint, ast_context->IntTy, SourceLocation());
+                bit_width = new (*ast_context)IntegerLiteral (*ast_context, bitfield_bit_size_apint, ast_context->IntTy, SourceLocation());
             }
             FieldDecl *field = FieldDecl::Create (*ast_context,
                                                   record_decl,
@@ -1277,7 +1278,7 @@
                 if (bitfield_bit_size != 0)
                 {
                     APInt bitfield_bit_size_apint(ast_context->getTypeSize(ast_context->IntTy), bitfield_bit_size);
-                    bit_width = new (*ast_context)IntegerLiteral (bitfield_bit_size_apint, ast_context->IntTy, SourceLocation());
+                    bit_width = new (*ast_context)IntegerLiteral (*ast_context, bitfield_bit_size_apint, ast_context->IntTy, SourceLocation());
                 }
                 
                 ObjCIvarDecl *field = ObjCIvarDecl::Create (*ast_context,

Modified: lldb/trunk/source/Symbol/ClangASTType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTType.cpp?rev=114622&r1=114621&r2=114622&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTType.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTType.cpp Wed Sep 22 22:01:22 2010
@@ -479,7 +479,7 @@
             {
                 if (enum_pos->getInitVal() == enum_value)
                 {
-                    s->Printf("%s", enum_pos->getNameAsCString());
+                    s->Printf("%s", enum_pos->getNameAsString().c_str());
                     return;
                 }
             }
@@ -655,7 +655,7 @@
                 {
                     if (enum_pos->getInitVal() == enum_value)
                     {
-                        s->PutCString (enum_pos->getNameAsCString());
+                        s->PutCString (enum_pos->getNameAsString().c_str());
                         return true;
                     }
                 }





More information about the lldb-commits mailing list