diff options
-rw-r--r-- | lldb/include/lldb/Expression/ASTResultSynthesizer.h | 1 | ||||
-rw-r--r-- | lldb/include/lldb/Expression/ClangASTSource.h | 10 | ||||
-rw-r--r-- | lldb/include/lldb/Expression/ClangExpressionParser.h | 1 | ||||
-rw-r--r-- | lldb/include/lldb/Symbol/ClangASTContext.h | 6 | ||||
-rw-r--r-- | lldb/scripts/build-llvm.pl | 7 | ||||
-rw-r--r-- | lldb/source/Expression/ASTResultSynthesizer.cpp | 31 | ||||
-rw-r--r-- | lldb/source/Expression/ASTStructExtractor.cpp | 5 | ||||
-rw-r--r-- | lldb/source/Expression/ClangASTSource.cpp | 17 | ||||
-rw-r--r-- | lldb/source/Expression/ClangExpressionDeclMap.cpp | 13 | ||||
-rw-r--r-- | lldb/source/Expression/ClangExpressionParser.cpp | 21 | ||||
-rw-r--r-- | lldb/source/Expression/IRDynamicChecks.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Expression/IRForTarget.cpp | 18 | ||||
-rw-r--r-- | lldb/source/Expression/IRToDWARF.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 18 | ||||
-rw-r--r-- | lldb/source/Symbol/ClangASTContext.cpp | 23 | ||||
-rw-r--r-- | lldb/source/Symbol/ClangASTType.cpp | 4 |
16 files changed, 96 insertions, 83 deletions
diff --git a/lldb/include/lldb/Expression/ASTResultSynthesizer.h b/lldb/include/lldb/Expression/ASTResultSynthesizer.h index 9953ec8bc90..3a3bb8456e3 100644 --- a/lldb/include/lldb/Expression/ASTResultSynthesizer.h +++ b/lldb/include/lldb/Expression/ASTResultSynthesizer.h @@ -128,7 +128,6 @@ private: 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. }; } diff --git a/lldb/include/lldb/Expression/ClangASTSource.h b/lldb/include/lldb/Expression/ClangASTSource.h index d9ea2a23360..1a761096c53 100644 --- a/lldb/include/lldb/Expression/ClangASTSource.h +++ b/lldb/include/lldb/Expression/ClangASTSource.h @@ -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 @@ public: /// @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. diff --git a/lldb/include/lldb/Expression/ClangExpressionParser.h b/lldb/include/lldb/Expression/ClangExpressionParser.h index b9e8c479594..1184b80a7bc 100644 --- a/lldb/include/lldb/Expression/ClangExpressionParser.h +++ b/lldb/include/lldb/Expression/ClangExpressionParser.h @@ -173,7 +173,6 @@ private: 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 diff --git a/lldb/include/lldb/Symbol/ClangASTContext.h b/lldb/include/lldb/Symbol/ClangASTContext.h index 1053147ed2c..ed41f166ca8 100644 --- a/lldb/include/lldb/Symbol/ClangASTContext.h +++ b/lldb/include/lldb/Symbol/ClangASTContext.h @@ -186,14 +186,14 @@ public: 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 @@ public: return ClangASTContext::AddMethodToCXXRecordType(getASTContext(), record_opaque_type, name, - method_opaque_type, + method_type, access, is_virtual); } diff --git a/lldb/scripts/build-llvm.pl b/lldb/scripts/build-llvm.pl index e7fe80e8855..782b20bc951 100644 --- a/lldb/scripts/build-llvm.pl +++ b/lldb/scripts/build-llvm.pl @@ -25,15 +25,14 @@ our @llvm_clang_slices; # paths to the single architecture static libraries (arc 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 @@ our @archive_files = ( "$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 @@ sub create_single_llvm_arhive_for_arch } close (FILES); do_command ("libtool -static -o '$arch_output_file' -filelist '$files'"); + do_command ("ranlib '$arch_output_file'"); foreach $object_dir (@object_dirs) { diff --git a/lldb/source/Expression/ASTResultSynthesizer.cpp b/lldb/source/Expression/ASTResultSynthesizer.cpp index f03430bc491..0cdcf2a110d 100644 --- a/lldb/source/Expression/ASTResultSynthesizer.cpp +++ b/lldb/source/Expression/ASTResultSynthesizer.cpp @@ -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 @@ ASTResultSynthesizer::ASTResultSynthesizer(ASTConsumer *passthrough) : 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 @@ ASTResultSynthesizer::TransformTopLevelDecl(Decl* D) 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 @@ ASTResultSynthesizer::SynthesizeResult (FunctionDecl *FunDecl) &result_id, expr_qual_type, NULL, - VarDecl::Static, - VarDecl::Static); + SC_Static, + SC_Static); if (!result_decl) return false; @@ -187,27 +183,24 @@ ASTResultSynthesizer::SynthesizeResult (FunctionDecl *FunDecl) /////////////////////////////// // 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 @@ void 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 @@ void ASTResultSynthesizer::ForgetSema() { m_sema = NULL; - m_action = NULL; if (m_passthrough_sema) m_passthrough_sema->ForgetSema(); diff --git a/lldb/source/Expression/ASTStructExtractor.cpp b/lldb/source/Expression/ASTStructExtractor.cpp index 84a97c8e5df..8635ffe6ce2 100644 --- a/lldb/source/Expression/ASTStructExtractor.cpp +++ b/lldb/source/Expression/ASTStructExtractor.cpp @@ -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 @@ ASTStructExtractor::ExtractFromTopLevelDecl(Decl* D) 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); } diff --git a/lldb/source/Expression/ClangASTSource.cpp b/lldb/source/Expression/ClangASTSource.cpp index 423f759be40..3d71da5341f 100644 --- a/lldb/source/Expression/ClangASTSource.cpp +++ b/lldb/source/Expression/ClangASTSource.cpp @@ -74,6 +74,11 @@ DeclContext::lookup_result ClangASTSource::FindExternalVisibleDeclsByName(const 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 @@ clang::NamedDecl *NameSearchContext::AddVarDecl(void *type) { ii, QualType::getFromOpaquePtr(type), 0, - VarDecl::Static, - VarDecl::Static); + SC_Static, + SC_Static); Decls.push_back(Decl); return Decl; @@ -108,8 +113,8 @@ clang::NamedDecl *NameSearchContext::AddFunDecl(void *type) { Name.getAsIdentifierInfo(), QualType::getFromOpaquePtr(type), NULL, - FunctionDecl::Static, - FunctionDecl::Static, + SC_Static, + SC_Static, false, true); @@ -138,8 +143,8 @@ clang::NamedDecl *NameSearchContext::AddFunDecl(void *type) { NULL, ArgQT, NULL, - ParmVarDecl::Static, - ParmVarDecl::Static, + SC_Static, + SC_Static, NULL); } diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index bed235241ee..189249f5680 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -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 @@ ClangExpressionDeclMap::AddOneType(NameSearchContext &context, 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); diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp index 90598063add..ec385a4cd04 100644 --- a/lldb/source/Expression/ClangExpressionParser.cpp +++ b/lldb/source/Expression/ClangExpressionParser.cpp @@ -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 @@ ClangExpressionParser::ClangExpressionParser(const char *target_triple, // 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 @@ ClangExpressionParser::~ClangExpressionParser() 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 @@ ClangExpressionParser::Parse (Stream &stream) 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++; diff --git a/lldb/source/Expression/IRDynamicChecks.cpp b/lldb/source/Expression/IRDynamicChecks.cpp index b5a706d67ec..53cabcb11fa 100644 --- a/lldb/source/Expression/IRDynamicChecks.cpp +++ b/lldb/source/Expression/IRDynamicChecks.cpp @@ -478,7 +478,7 @@ private: IRDynamicChecks::IRDynamicChecks(DynamicCheckerFunctions &checker_functions, const char *func_name) : - ModulePass(&ID), + ModulePass(ID), m_checker_functions(checker_functions), m_func_name(func_name) { diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp index cec358381d5..626cd547bfe 100644 --- a/lldb/source/Expression/IRForTarget.cpp +++ b/lldb/source/Expression/IRForTarget.cpp @@ -34,7 +34,7 @@ IRForTarget::IRForTarget(lldb_private::ClangExpressionDeclMap *decl_map, 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 @@ IRForTarget::resolveExternals(Module &M, BasicBlock &BB) 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; diff --git a/lldb/source/Expression/IRToDWARF.cpp b/lldb/source/Expression/IRToDWARF.cpp index b158da6c1f5..d4a4a3fbc24 100644 --- a/lldb/source/Expression/IRToDWARF.cpp +++ b/lldb/source/Expression/IRToDWARF.cpp @@ -30,7 +30,7 @@ IRToDWARF::IRToDWARF(lldb_private::ClangExpressionVariableStore &local_vars, 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), diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index b3199ccfe57..8a4b136d51f 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -1126,7 +1126,7 @@ SymbolFileDWARF::ParseChildMembers 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 @@ SymbolFileDWARF::ParseChildMembers 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 @@ SymbolFileDWARF::ParseChildParameters 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 @@ SymbolFileDWARF::ParseType(const SymbolContext& sc, const DWARFCompileUnit* dwar 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 @@ SymbolFileDWARF::ParseType(const SymbolContext& sc, const DWARFCompileUnit* dwar 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: diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index f9d85ac1100..7debcb69925 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -847,15 +847,16 @@ ClangASTContext::AddMethodToCXXRecordType 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 @@ ClangASTContext::AddMethodToCXXRecordType NULL, // anonymous method_funprototy->getArgType(param_index), NULL, - VarDecl::Auto, - VarDecl::Auto, + SC_Auto, + SC_Auto, NULL); } @@ -946,7 +947,7 @@ ClangASTContext::AddFieldToRecordType 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 @@ ClangASTContext::AddObjCClassIVar 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, diff --git a/lldb/source/Symbol/ClangASTType.cpp b/lldb/source/Symbol/ClangASTType.cpp index 367aac8a5e1..f356d4238b2 100644 --- a/lldb/source/Symbol/ClangASTType.cpp +++ b/lldb/source/Symbol/ClangASTType.cpp @@ -479,7 +479,7 @@ ClangASTType::DumpValue { 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 @@ ClangASTType::DumpTypeValue { if (enum_pos->getInitVal() == enum_value) { - s->PutCString (enum_pos->getNameAsCString()); + s->PutCString (enum_pos->getNameAsString().c_str()); return true; } } |