mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-05 07:32:36 +00:00
[NativePDB] Add a FromCompilerDecl for going from lldb -> clang
Summary: A common transformation in NativePDB is to go from lldb types to clang types and vice versa. This function automates one of those steps. Differential Revision: https://reviews.llvm.org/D64851 llvm-svn: 366345
This commit is contained in:
parent
1716454027
commit
3b96ebeee4
@ -1354,6 +1354,10 @@ PdbAstBuilder::ToCompilerDeclContext(clang::DeclContext &context) {
|
||||
return {&m_clang, &context};
|
||||
}
|
||||
|
||||
clang::Decl * PdbAstBuilder::FromCompilerDecl(CompilerDecl decl) {
|
||||
return static_cast<clang::Decl *>(decl.GetOpaqueDecl());
|
||||
}
|
||||
|
||||
clang::DeclContext *
|
||||
PdbAstBuilder::FromCompilerDeclContext(CompilerDeclContext context) {
|
||||
return static_cast<clang::DeclContext *>(context.GetOpaqueDeclContext());
|
||||
|
@ -76,6 +76,7 @@ public:
|
||||
CompilerDecl ToCompilerDecl(clang::Decl &decl);
|
||||
CompilerType ToCompilerType(clang::QualType qt);
|
||||
CompilerDeclContext ToCompilerDeclContext(clang::DeclContext &context);
|
||||
clang::Decl * FromCompilerDecl(CompilerDecl decl);
|
||||
clang::DeclContext *FromCompilerDeclContext(CompilerDeclContext context);
|
||||
|
||||
ClangASTContext &clang() { return m_clang; }
|
||||
|
Loading…
Reference in New Issue
Block a user