Skip to content

Commit

Permalink
Rename clang_type_t to opaque_compiler_type_t.
Browse files Browse the repository at this point in the history
Summary:
This is no longer related to Clang and is just an opaque pointer
to data for a compiler type.

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D13039

llvm-svn: 248288
  • Loading branch information
waywardmonkeys committed Sep 22, 2015
1 parent 503fe94 commit 23a3b0e
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion lldb/include/lldb/Expression/ASTDumper.h
Expand Up @@ -26,7 +26,7 @@ class ASTDumper
ASTDumper (clang::DeclContext *decl_ctx);
ASTDumper (const clang::Type *type);
ASTDumper (clang::QualType type);
ASTDumper (lldb::clang_type_t type);
ASTDumper (lldb::opaque_compiler_type_t type);
ASTDumper (const CompilerType &clang_type);

const char *GetCString();
Expand Down
8 changes: 4 additions & 4 deletions lldb/include/lldb/Symbol/ClangASTImporter.h
Expand Up @@ -96,20 +96,20 @@ class ClangASTImporter
clang::ASTContext *src_ctx,
clang::QualType type);

lldb::clang_type_t
lldb::opaque_compiler_type_t
CopyType (clang::ASTContext *dst_ctx,
clang::ASTContext *src_ctx,
lldb::clang_type_t type);
lldb::opaque_compiler_type_t type);

clang::Decl *
CopyDecl (clang::ASTContext *dst_ctx,
clang::ASTContext *src_ctx,
clang::Decl *decl);

lldb::clang_type_t
lldb::opaque_compiler_type_t
DeportType (clang::ASTContext *dst_ctx,
clang::ASTContext *src_ctx,
lldb::clang_type_t type);
lldb::opaque_compiler_type_t type);

clang::Decl *
DeportDecl (clang::ASTContext *dst_ctx,
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/lldb-types.h
Expand Up @@ -110,7 +110,7 @@ namespace lldb
typedef uint64_t offset_t;
typedef int32_t break_id_t;
typedef int32_t watch_id_t;
typedef void * clang_type_t;
typedef void * opaque_compiler_type_t;
typedef uint64_t queue_id_t;
}

Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Commands/CommandObjectMemory.cpp
Expand Up @@ -533,7 +533,7 @@ class CommandObjectMemoryRead : public CommandObjectParsed
clang::TypeDecl *tdecl = target->GetPersistentVariables().GetPersistentType(ConstString(lookup_type_name));
if (tdecl)
{
clang_ast_type.SetCompilerType(ClangASTContext::GetASTContext(&tdecl->getASTContext()),(const lldb::clang_type_t)tdecl->getTypeForDecl());
clang_ast_type.SetCompilerType(ClangASTContext::GetASTContext(&tdecl->getASTContext()),(const lldb::opaque_compiler_type_t)tdecl->getTypeForDecl());
}
}

Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Expression/ASTDumper.cpp
Expand Up @@ -75,7 +75,7 @@ ASTDumper::ASTDumper (clang::QualType type)
m_dump = type.getAsString();
}

ASTDumper::ASTDumper (lldb::clang_type_t type)
ASTDumper::ASTDumper (lldb::opaque_compiler_type_t type)
{
m_dump = clang::QualType::getFromOpaquePtr(type).getAsString();
}
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Expression/ClangASTSource.cpp
Expand Up @@ -401,7 +401,7 @@ ClangASTSource::GetCompleteObjCInterface (clang::ObjCInterfaceDecl *interface_de
return NULL;

TypeFromUser complete_type = TypeFromUser(complete_type_sp->GetFullCompilerType ());
lldb::clang_type_t complete_opaque_type = complete_type.GetOpaqueQualType();
lldb::opaque_compiler_type_t complete_opaque_type = complete_type.GetOpaqueQualType();

if (!complete_opaque_type)
return NULL;
Expand Down
6 changes: 3 additions & 3 deletions lldb/source/Expression/ClangExpressionDeclMap.cpp
Expand Up @@ -1614,11 +1614,11 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context,
}
}

//static clang_type_t
//static opaque_compiler_type_t
//MaybePromoteToBlockPointerType
//(
// ASTContext *ast_context,
// clang_type_t candidate_type
// opaque_compiler_type_t candidate_type
//)
//{
// if (!candidate_type)
Expand Down Expand Up @@ -1946,7 +1946,7 @@ ClangExpressionDeclMap::ResolveUnknownTypes()
QualType var_type = var_decl->getType();
TypeFromParser parser_type(var_type.getAsOpaquePtr(), ClangASTContext::GetASTContext(&var_decl->getASTContext()));

lldb::clang_type_t copied_type = m_ast_importer->CopyType(scratch_ast_context->getASTContext(), &var_decl->getASTContext(), var_type.getAsOpaquePtr());
lldb::opaque_compiler_type_t copied_type = m_ast_importer->CopyType(scratch_ast_context->getASTContext(), &var_decl->getASTContext(), var_type.getAsOpaquePtr());

if (!copied_type)
{
Expand Down
4 changes: 2 additions & 2 deletions lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
Expand Up @@ -323,8 +323,8 @@ class SymbolFileDWARF : public lldb_private::SymbolFile, public lldb_private::Us
protected:
typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb_private::Type *> DIEToTypePtr;
typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb::VariableSP> DIEToVariableSP;
typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb::clang_type_t> DIEToClangType;
typedef llvm::DenseMap<lldb::clang_type_t, DIERef> ClangTypeToDIE;
typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb::opaque_compiler_type_t> DIEToClangType;
typedef llvm::DenseMap<lldb::opaque_compiler_type_t, DIERef> ClangTypeToDIE;

enum
{
Expand Down
6 changes: 3 additions & 3 deletions lldb/source/Symbol/ClangASTContext.cpp
Expand Up @@ -841,7 +841,7 @@ ClangASTContext::GetBasicType (ASTContext *ast, lldb::BasicType basic_type)
{
if (ast)
{
clang_type_t clang_type = nullptr;
opaque_compiler_type_t clang_type = nullptr;

switch (basic_type)
{
Expand Down Expand Up @@ -2124,7 +2124,7 @@ ClangASTContext::CreateEnumerationType
// so we can support remote targets. The code below also requires a patch to
// llvm::APInt.
//bool
//ClangASTContext::ConvertFloatValueToString (ASTContext *ast, clang_type_t clang_type, const uint8_t* bytes, size_t byte_size, int apint_byte_order, std::string &float_str)
//ClangASTContext::ConvertFloatValueToString (ASTContext *ast, opaque_compiler_type_t clang_type, const uint8_t* bytes, size_t byte_size, int apint_byte_order, std::string &float_str)
//{
// uint32_t count = 0;
// bool is_complex = false;
Expand Down Expand Up @@ -5024,7 +5024,7 @@ ClangASTContext::GetNumFields (void* type)
return count;
}

static clang_type_t
static opaque_compiler_type_t
GetObjCFieldAtIndex (clang::ASTContext *ast,
clang::ObjCInterfaceDecl *class_interface_decl,
size_t idx,
Expand Down
10 changes: 5 additions & 5 deletions lldb/source/Symbol/ClangASTImporter.cpp
Expand Up @@ -59,10 +59,10 @@ ClangASTImporter::CopyType (clang::ASTContext *dst_ast,
return QualType();
}

lldb::clang_type_t
lldb::opaque_compiler_type_t
ClangASTImporter::CopyType (clang::ASTContext *dst_ast,
clang::ASTContext *src_ast,
lldb::clang_type_t type)
lldb::opaque_compiler_type_t type)
{
return CopyType (dst_ast, src_ast, QualType::getFromOpaquePtr(type)).getAsOpaquePtr();
}
Expand Down Expand Up @@ -237,10 +237,10 @@ class DeclContextOverride
}
};

lldb::clang_type_t
lldb::opaque_compiler_type_t
ClangASTImporter::DeportType (clang::ASTContext *dst_ctx,
clang::ASTContext *src_ctx,
lldb::clang_type_t type)
lldb::opaque_compiler_type_t type)
{
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));

Expand Down Expand Up @@ -268,7 +268,7 @@ ClangASTImporter::DeportType (clang::ASTContext *dst_ctx,
minion_sp->InitDeportWorkQueues(&decls_to_deport,
&decls_already_deported);

lldb::clang_type_t result = CopyType(dst_ctx, src_ctx, type);
lldb::opaque_compiler_type_t result = CopyType(dst_ctx, src_ctx, type);

minion_sp->ExecuteDeportWorkQueues();

Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Symbol/CompilerType.cpp
Expand Up @@ -1255,7 +1255,7 @@ CompilerType::WriteToMemory (lldb_private::ExecutionContext *exe_ctx,
}

//clang::CXXRecordDecl *
//CompilerType::GetAsCXXRecordDecl (lldb::clang_type_t opaque_clang_qual_type)
//CompilerType::GetAsCXXRecordDecl (lldb::opaque_compiler_type_t opaque_clang_qual_type)
//{
// if (opaque_clang_qual_type)
// return clang::QualType::getFromOpaquePtr(opaque_clang_qual_type)->getAsCXXRecordDecl();
Expand Down

0 comments on commit 23a3b0e

Please sign in to comment.