diff options
| -rw-r--r-- | lldb/include/lldb/Core/ClangForward.h | 2 | ||||
| -rw-r--r-- | lldb/include/lldb/Expression/ClangASTSource.h | 5 | ||||
| -rw-r--r-- | lldb/include/lldb/Expression/ClangExpressionParser.h | 2 | ||||
| -rw-r--r-- | lldb/include/lldb/Symbol/ClangASTContext.h | 8 | ||||
| -rw-r--r-- | lldb/scripts/build-llvm.pl | 2 | ||||
| -rw-r--r-- | lldb/source/Expression/ClangASTSource.cpp | 1 | ||||
| -rw-r--r-- | lldb/source/Expression/ClangExpressionParser.cpp | 5 | ||||
| -rw-r--r-- | lldb/source/Symbol/ClangASTContext.cpp | 33 | ||||
| -rw-r--r-- | lldb/source/Symbol/ClangASTType.cpp | 4 |
9 files changed, 51 insertions, 11 deletions
diff --git a/lldb/include/lldb/Core/ClangForward.h b/lldb/include/lldb/Core/ClangForward.h index 8b183edf5a7..841109222f3 100644 --- a/lldb/include/lldb/Core/ClangForward.h +++ b/lldb/include/lldb/Core/ClangForward.h @@ -57,6 +57,8 @@ namespace clang class ExternalASTSource; class ExtVectorElementExpr; class FieldDecl; + class FileManager; + class FileSystemOptions; class FloatingLiteral; class FrontendOptions; class FunctionDecl; diff --git a/lldb/include/lldb/Expression/ClangASTSource.h b/lldb/include/lldb/Expression/ClangASTSource.h index 79819256c02..fb4fc1f6d89 100644 --- a/lldb/include/lldb/Expression/ClangASTSource.h +++ b/lldb/include/lldb/Expression/ClangASTSource.h @@ -76,6 +76,11 @@ public: /// Interface stub that returns 0. //------------------------------------------------------------------ uint32_t GetNumExternalSelectors(); + + //------------------------------------------------------------------ + /// Interface stub that returns NULL. + //------------------------------------------------------------------ + clang::CXXBaseSpecifier *GetExternalCXXBaseSpecifiers(uint64_t Offset); //------------------------------------------------------------------ /// Look up all Decls that match a particular name. Only handles diff --git a/lldb/include/lldb/Expression/ClangExpressionParser.h b/lldb/include/lldb/Expression/ClangExpressionParser.h index 1184b80a7bc..31c4172a56c 100644 --- a/lldb/include/lldb/Expression/ClangExpressionParser.h +++ b/lldb/include/lldb/Expression/ClangExpressionParser.h @@ -173,6 +173,8 @@ 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::FileManager> m_file_manager; ///< The Clang file manager object used by the compiler + std::auto_ptr<clang::FileSystemOptions> m_file_system_options; ///< The Clang file system options object used 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 8ad3b97c2fa..3b1d1aa87e8 100644 --- a/lldb/include/lldb/Symbol/ClangASTContext.h +++ b/lldb/include/lldb/Symbol/ClangASTContext.h @@ -72,6 +72,12 @@ public: clang::SelectorTable * getSelectorTable(); + clang::FileManager * + getFileManager(); + + clang::FileSystemOptions * + getFileSystemOptions(); + clang::SourceManager * getSourceManager(); @@ -604,6 +610,8 @@ protected: std::string m_target_triple; std::auto_ptr<clang::ASTContext> m_ast_context_ap; std::auto_ptr<clang::LangOptions> m_language_options_ap; + std::auto_ptr<clang::FileManager> m_file_manager_ap; + std::auto_ptr<clang::FileSystemOptions> m_file_system_options_ap; std::auto_ptr<clang::SourceManager> m_source_manager_ap; std::auto_ptr<clang::Diagnostic> m_diagnostic_ap; std::auto_ptr<clang::TargetOptions> m_target_options_ap; diff --git a/lldb/scripts/build-llvm.pl b/lldb/scripts/build-llvm.pl index 13ea9db73a6..e5287f8db93 100644 --- a/lldb/scripts/build-llvm.pl +++ b/lldb/scripts/build-llvm.pl @@ -25,7 +25,7 @@ our @llvm_clang_slices; # paths to the single architecture static libraries (arc our $llvm_configuration = $ENV{LLVM_CONFIGURATION}; -our $llvm_revision = "'{2010-10-28T19:00}'"; +our $llvm_revision = "'{2010-11-17T15:30}'"; our $llvm_source_dir = "$ENV{SRCROOT}"; our $cc = "$ENV{DEVELOPER_BIN_DIR}/gcc-4.2"; our $cxx = "$ENV{DEVELOPER_BIN_DIR}/g++-4.2"; diff --git a/lldb/source/Expression/ClangASTSource.cpp b/lldb/source/Expression/ClangASTSource.cpp index 330c1da8129..e808a04386b 100644 --- a/lldb/source/Expression/ClangASTSource.cpp +++ b/lldb/source/Expression/ClangASTSource.cpp @@ -36,6 +36,7 @@ Stmt *ClangASTSource::GetExternalDeclStmt(uint64_t) { return 0; } // for method signatures!) might help. Selector ClangASTSource::GetExternalSelector(uint32_t) { return Selector(); } uint32_t ClangASTSource::GetNumExternalSelectors() { return 0; } +CXXBaseSpecifier *ClangASTSource::GetExternalCXXBaseSpecifiers(uint64_t Offset) { return NULL; } // The core lookup interface. DeclContext::lookup_result ClangASTSource::FindExternalVisibleDeclsByName diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp index 1497dab6688..ad0807a5c73 100644 --- a/lldb/source/Expression/ClangExpressionParser.cpp +++ b/lldb/source/Expression/ClangExpressionParser.cpp @@ -243,8 +243,11 @@ ClangExpressionParser::ClangExpressionParser(const char *target_triple, // 5. Set up the source management objects inside the compiler + m_file_manager.reset(new clang::FileManager()); + m_file_system_options.reset(new clang::FileSystemOptions()); + if (!m_compiler->hasSourceManager()) - m_compiler->createSourceManager(); + m_compiler->createSourceManager(*m_file_manager.get(), *m_file_system_options.get()); m_compiler->createFileManager(); m_compiler->createPreprocessor(); diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index a7fe230d08d..1ab02b989f9 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -23,6 +23,7 @@ #include "clang/AST/Type.h" #include "clang/Basic/Builtins.h" #include "clang/Basic/FileManager.h" +#include "clang/Basic/FileSystemOptions.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/TargetInfo.h" #include "clang/Basic/TargetOptions.h" @@ -351,11 +352,27 @@ ClangASTContext::getSelectorTable() return m_selector_table_ap.get(); } +clang::FileManager * +ClangASTContext::getFileManager() +{ + if (m_file_manager_ap.get() == NULL) + m_file_manager_ap.reset(new clang::FileManager()); + return m_file_manager_ap.get(); +} + +clang::FileSystemOptions * +ClangASTContext::getFileSystemOptions() +{ + if (m_file_system_options_ap.get() == NULL) + m_file_system_options_ap.reset(new clang::FileSystemOptions()); + return m_file_system_options_ap.get(); +} + clang::SourceManager * ClangASTContext::getSourceManager() { if (m_source_manager_ap.get() == NULL) - m_source_manager_ap.reset(new clang::SourceManager(*getDiagnostic())); + m_source_manager_ap.reset(new clang::SourceManager(*getDiagnostic(), *getFileManager(), *getFileSystemOptions())); return m_source_manager_ap.get(); } @@ -730,9 +747,10 @@ ClangASTContext::CopyType (ASTContext *dest_context, NullDiagnosticClient *null_client = new NullDiagnosticClient; Diagnostic diagnostics(null_client); FileManager file_manager; + FileSystemOptions file_system_options; ASTImporter importer(diagnostics, - *dest_context, file_manager, - *source_context, file_manager); + *dest_context, file_manager, file_system_options, + *source_context, file_manager, file_system_options); QualType src = QualType::getFromOpaquePtr(clang_type); QualType dst = importer.Import(src); @@ -750,9 +768,10 @@ ClangASTContext::CopyDecl (ASTContext *dest_context, NullDiagnosticClient *null_client = new NullDiagnosticClient; Diagnostic diagnostics(null_client); FileManager file_manager; + FileSystemOptions file_system_options; ASTImporter importer(diagnostics, - *dest_context, file_manager, - *source_context, file_manager); + *dest_context, file_manager, file_system_options, + *source_context, file_manager, file_system_options); return importer.Import(source_decl); } @@ -2095,9 +2114,9 @@ ClangASTContext::GetChildClangTypeAtIndex if (base_class->isVirtual()) - bit_offset = record_layout.getVBaseClassOffset(base_class_decl); + bit_offset = record_layout.getVBaseClassOffset(base_class_decl).getQuantity(); else - bit_offset = record_layout.getBaseClassOffset(base_class_decl); + bit_offset = record_layout.getBaseClassOffset(base_class_decl).getQuantity(); // Base classes should be a multiple of 8 bits in size assert (bit_offset % 8 == 0); diff --git a/lldb/source/Symbol/ClangASTType.cpp b/lldb/source/Symbol/ClangASTType.cpp index c40ce14a4c6..f24834d96a6 100644 --- a/lldb/source/Symbol/ClangASTType.cpp +++ b/lldb/source/Symbol/ClangASTType.cpp @@ -367,9 +367,9 @@ ClangASTType::DumpValue continue; if (base_class->isVirtual()) - field_bit_offset = record_layout.getVBaseClassOffset(base_class_decl); + field_bit_offset = record_layout.getVBaseClassOffset(base_class_decl).getQuantity(); else - field_bit_offset = record_layout.getBaseClassOffset(base_class_decl); + field_bit_offset = record_layout.getBaseClassOffset(base_class_decl).getQuantity(); field_byte_offset = field_bit_offset / 8; assert (field_bit_offset % 8 == 0); if (child_idx == 0) |

