aboutsummaryrefslogtreecommitdiffstats
path: root/source/Symbol/CompilerType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Symbol/CompilerType.cpp')
-rw-r--r--source/Symbol/CompilerType.cpp28
1 files changed, 3 insertions, 25 deletions
diff --git a/source/Symbol/CompilerType.cpp b/source/Symbol/CompilerType.cpp
index bb9a1a642e42..571a8570a43b 100644
--- a/source/Symbol/CompilerType.cpp
+++ b/source/Symbol/CompilerType.cpp
@@ -10,8 +10,6 @@
#include "lldb/Core/Debugger.h"
#include "lldb/Core/StreamFile.h"
-#include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Process.h"
@@ -32,13 +30,6 @@ CompilerType::CompilerType(TypeSystem *type_system,
lldb::opaque_compiler_type_t type)
: m_type(type), m_type_system(type_system) {}
-CompilerType::CompilerType(clang::ASTContext *ast, clang::QualType qual_type)
- : m_type(qual_type.getAsOpaquePtr()),
- m_type_system(ClangASTContext::GetASTContext(ast)) {
- if (m_type)
- assert(m_type_system != nullptr);
-}
-
CompilerType::~CompilerType() {}
// Tests
@@ -333,12 +324,6 @@ void CompilerType::SetCompilerType(TypeSystem *type_system,
m_type = type;
}
-void CompilerType::SetCompilerType(clang::ASTContext *ast,
- clang::QualType qual_type) {
- m_type_system = ClangASTContext::GetASTContext(ast);
- m_type = qual_type.getAsOpaquePtr();
-}
-
unsigned CompilerType::GetTypeQualifiers() const {
if (IsValid())
return m_type_system->GetTypeQualifiers(m_type);
@@ -503,10 +488,10 @@ CompilerType::GetByteSize(ExecutionContextScope *exe_scope) const {
return {};
}
-size_t CompilerType::GetTypeBitAlign() const {
+llvm::Optional<size_t> CompilerType::GetTypeBitAlign(ExecutionContextScope *exe_scope) const {
if (IsValid())
- return m_type_system->GetTypeBitAlign(m_type);
- return 0;
+ return m_type_system->GetTypeBitAlign(m_type, exe_scope);
+ return {};
}
lldb::Encoding CompilerType::GetEncoding(uint64_t &count) const {
@@ -729,13 +714,6 @@ CompilerType::GetIndexOfChildWithName(const char *name,
return UINT32_MAX;
}
-size_t CompilerType::ConvertStringToFloatValue(const char *s, uint8_t *dst,
- size_t dst_size) const {
- if (IsValid())
- return m_type_system->ConvertStringToFloatValue(m_type, s, dst, dst_size);
- return 0;
-}
-
// Dumping types
#define DEPTH_INCREMENT 2