LLDB  mainline
Classes | Macros | Typedefs | Functions
ClangASTContext.cpp File Reference
#include "lldb/Symbol/ClangASTContext.h"
#include "llvm/Support/FormatAdapters.h"
#include "llvm/Support/FormatVariadic.h"
#include <mutex>
#include <string>
#include <vector>
#include <assert.h>
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTImporter.h"
#include "clang/AST/Attr.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Mangle.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/Type.h"
#include "clang/AST/VTableBuilder.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/Diagnostic.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"
#include "clang/Frontend/FrontendOptions.h"
#include "clang/Frontend/LangStandard.h"
#include "clang/Sema/Sema.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/Threading.h"
#include "Plugins/ExpressionParser/Clang/ClangFunctionCaller.h"
#include "Plugins/ExpressionParser/Clang/ClangUserExpression.h"
#include "Plugins/ExpressionParser/Clang/ClangUtilityFunction.h"
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/Flags.h"
#include "lldb/Core/DumpDataExtractor.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/StreamFile.h"
#include "lldb/Core/ThreadSafeDenseMap.h"
#include "lldb/Core/UniqueCStringMap.h"
#include "lldb/Symbol/ClangASTImporter.h"
#include "lldb/Symbol/ClangExternalASTSourceCallbacks.h"
#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
#include "lldb/Symbol/ClangUtil.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/VerifyDecl.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Language.h"
#include "lldb/Target/ObjCLanguageRuntime.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/DataExtractor.h"
#include "lldb/Utility/LLDBAssert.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/RegularExpression.h"
#include "lldb/Utility/Scalar.h"
#include "Plugins/SymbolFile/DWARF/DWARFASTParserClang.h"
#include "Plugins/SymbolFile/PDB/PDBASTParser.h"
#include <stdio.h>
#include "clang/Basic/OperatorKinds.def"

Go to the source code of this file.

Classes

class  NullDiagnosticConsumer
 

Macros

#define LLDB_DEFINED_NDEBUG_FOR_CLANG
 
#define NDEBUG
 
#define OPERATOR_PREFIX   "operator"
 
#define OPERATOR_PREFIX_LENGTH   (sizeof(OPERATOR_PREFIX) - 1)
 
#define streq(a, b)   strcmp(a, b) == 0
 
#define OVERLOADED_OPERATOR(Name, Spelling, Token, Unary, Binary, MemberOnly)
 
#define DEPTH_INCREMENT   2
 

Typedefs

typedef lldb_private::ThreadSafeDenseMap< clang::ASTContext *, ClangASTContext * > ClangASTMap
 

Functions

static lldb::addr_t GetVTableAddress (Process &process, VTableContextBase &vtable_ctx, ValueObject &valobj, const ASTRecordLayout &record_layout)
 
static int64_t ReadVBaseOffsetFromVTable (Process &process, VTableContextBase &vtable_ctx, lldb::addr_t vtable_ptr, const CXXRecordDecl *cxx_record_decl, const CXXRecordDecl *base_class_decl)
 
static bool GetVBaseBitOffset (VTableContextBase &vtable_ctx, ValueObject &valobj, const ASTRecordLayout &record_layout, const CXXRecordDecl *cxx_record_decl, const CXXRecordDecl *base_class_decl, int32_t &bit_offset)
 
static ClangASTMapGetASTMap ()
 
static void ParseLangArgs (LangOptions &Opts, InputKind IK, const char *triple)
 
static bool QualTypeMatchesBitSize (const uint64_t bit_size, ASTContext *ast, QualType qual_type)
 
static TemplateParameterList * CreateTemplateParameterList (ASTContext *ast, const ClangASTContext::TemplateParameterInfos &template_param_infos, llvm::SmallVector< NamedDecl *, 8 > &template_param_decls)
 
static bool check_op_param (bool is_method, clang::OverloadedOperatorKind op_kind, bool unary, bool binary, uint32_t num_params)
 
static bool BaseSpecifierIsEmpty (const CXXBaseSpecifier *b)
 
clang::DeclContext * FindLCABetweenDecls (clang::DeclContext *left, clang::DeclContext *right, clang::DeclContext *root)
 
static bool GetCompleteQualType (clang::ASTContext *ast, clang::QualType qual_type, bool allow_completion=true)
 
static clang::ObjCIvarDecl::AccessControl ConvertAccessTypeToObjCIvarAccessControl (AccessType access)
 
static clang::QualType GetFullyUnqualifiedType_Impl (clang::ASTContext *ast, clang::QualType qual_type)
 
static bool ObjCDeclHasIVars (clang::ObjCInterfaceDecl *class_interface_decl, bool check_superclass)
 
static Optional< SymbolFile::ArrayInfoGetDynamicArrayInfo (ClangASTContext &ast, SymbolFile *sym_file, clang::QualType qual_type, const ExecutionContext *exe_ctx)
 
static lldb::opaque_compiler_type_t GetObjCFieldAtIndex (clang::ASTContext *ast, clang::ObjCInterfaceDecl *class_interface_decl, size_t idx, std::string &name, uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr, bool *is_bitfield_ptr)
 
static uint32_t GetIndexForRecordBase (const clang::RecordDecl *record_decl, const clang::CXXBaseSpecifier *base_spec, bool omit_empty_base_classes)
 
static uint32_t GetIndexForRecordChild (const clang::RecordDecl *record_decl, clang::NamedDecl *canonical_decl, bool omit_empty_base_classes)
 

Macro Definition Documentation

◆ DEPTH_INCREMENT

#define DEPTH_INCREMENT   2

Definition at line 9074 of file ClangASTContext.cpp.

Referenced by lldb_private::ClangASTContext::DumpValue().

◆ LLDB_DEFINED_NDEBUG_FOR_CLANG

#define LLDB_DEFINED_NDEBUG_FOR_CLANG

Definition at line 30 of file ClangASTContext.cpp.

◆ NDEBUG

#define NDEBUG

Definition at line 31 of file ClangASTContext.cpp.

◆ OPERATOR_PREFIX

#define OPERATOR_PREFIX   "operator"

◆ OPERATOR_PREFIX_LENGTH

#define OPERATOR_PREFIX_LENGTH   (sizeof(OPERATOR_PREFIX) - 1)

◆ OVERLOADED_OPERATOR

#define OVERLOADED_OPERATOR (   Name,
  Spelling,
  Token,
  Unary,
  Binary,
  MemberOnly 
)
Value:
case OO_##Name: \
return check_op_param(is_method, op_kind, Unary, Binary, num_params);
static bool check_op_param(bool is_method, clang::OverloadedOperatorKind op_kind, bool unary, bool binary, uint32_t num_params)

◆ streq

#define streq (   a,
 
)    strcmp(a, b) == 0

Typedef Documentation

◆ ClangASTMap

Definition at line 323 of file ClangASTContext.cpp.

Function Documentation

◆ BaseSpecifierIsEmpty()

static bool BaseSpecifierIsEmpty ( const CXXBaseSpecifier *  b)
inlinestatic

◆ check_op_param()

static bool check_op_param ( bool  is_method,
clang::OverloadedOperatorKind  op_kind,
bool  unary,
bool  binary,
uint32_t  num_params 
)
inlinestatic

Definition at line 1743 of file ClangASTContext.cpp.

◆ ConvertAccessTypeToObjCIvarAccessControl()

static clang::ObjCIvarDecl::AccessControl ConvertAccessTypeToObjCIvarAccessControl ( AccessType  access)
static

◆ CreateTemplateParameterList()

static TemplateParameterList* CreateTemplateParameterList ( ASTContext *  ast,
const ClangASTContext::TemplateParameterInfos template_param_infos,
llvm::SmallVector< NamedDecl *, 8 > &  template_param_decls 
)
static

◆ FindLCABetweenDecls()

clang::DeclContext* FindLCABetweenDecls ( clang::DeclContext *  left,
clang::DeclContext *  right,
clang::DeclContext *  root 
)

◆ GetASTMap()

static ClangASTMap& GetASTMap ( )
static

◆ GetCompleteQualType()

static bool GetCompleteQualType ( clang::ASTContext *  ast,
clang::QualType  qual_type,
bool  allow_completion = true 
)
static

◆ GetDynamicArrayInfo()

static Optional<SymbolFile::ArrayInfo> GetDynamicArrayInfo ( ClangASTContext ast,
SymbolFile sym_file,
clang::QualType  qual_type,
const ExecutionContext exe_ctx 
)
static

◆ GetFullyUnqualifiedType_Impl()

static clang::QualType GetFullyUnqualifiedType_Impl ( clang::ASTContext *  ast,
clang::QualType  qual_type 
)
static

◆ GetIndexForRecordBase()

static uint32_t GetIndexForRecordBase ( const clang::RecordDecl *  record_decl,
const clang::CXXBaseSpecifier *  base_spec,
bool  omit_empty_base_classes 
)
static

◆ GetIndexForRecordChild()

static uint32_t GetIndexForRecordChild ( const clang::RecordDecl *  record_decl,
clang::NamedDecl *  canonical_decl,
bool  omit_empty_base_classes 
)
static

◆ GetObjCFieldAtIndex()

static lldb::opaque_compiler_type_t GetObjCFieldAtIndex ( clang::ASTContext *  ast,
clang::ObjCInterfaceDecl *  class_interface_decl,
size_t  idx,
std::string &  name,
uint64_t *  bit_offset_ptr,
uint32_t bitfield_bit_size_ptr,
bool *  is_bitfield_ptr 
)
static

◆ GetVBaseBitOffset()

static bool GetVBaseBitOffset ( VTableContextBase &  vtable_ctx,
ValueObject valobj,
const ASTRecordLayout &  record_layout,
const CXXRecordDecl *  cxx_record_decl,
const CXXRecordDecl *  base_class_decl,
int32_t &  bit_offset 
)
static

◆ GetVTableAddress()

static lldb::addr_t GetVTableAddress ( Process process,
VTableContextBase &  vtable_ctx,
ValueObject valobj,
const ASTRecordLayout &  record_layout 
)
static

◆ ObjCDeclHasIVars()

static bool ObjCDeclHasIVars ( clang::ObjCInterfaceDecl *  class_interface_decl,
bool  check_superclass 
)
static

◆ ParseLangArgs()

static void ParseLangArgs ( LangOptions &  Opts,
InputKind  IK,
const char *  triple 
)
static

◆ QualTypeMatchesBitSize()

static bool QualTypeMatchesBitSize ( const uint64_t  bit_size,
ASTContext *  ast,
QualType  qual_type 
)
inlinestatic

◆ ReadVBaseOffsetFromVTable()

static int64_t ReadVBaseOffsetFromVTable ( Process process,
VTableContextBase &  vtable_ctx,
lldb::addr_t  vtable_ptr,
const CXXRecordDecl *  cxx_record_decl,
const CXXRecordDecl *  base_class_decl 
)
static