From ead246455adf1a215ec2715dad6533073a6beb4e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 23 Oct 2019 17:53:01 +0000 Subject: Vendor import of stripped lldb trunk r375505, the last commit before the upstream Subversion repository was made read-only, and the LLVM project migrated to GitHub: https://llvm.org/svn/llvm-project/lldb/trunk@375505 --- source/Symbol/CompilerType.cpp | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) (limited to 'source/Symbol/CompilerType.cpp') 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 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 -- cgit v1.2.3