summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Expression/ClangASTSource.cpp1
-rw-r--r--lldb/source/Expression/ClangExpressionParser.cpp5
-rw-r--r--lldb/source/Symbol/ClangASTContext.cpp33
-rw-r--r--lldb/source/Symbol/ClangASTType.cpp4
4 files changed, 33 insertions, 10 deletions
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)
OpenPOWER on IntegriCloud