[Lldb-commits] [lldb] r366345 - [NativePDB] Add a FromCompilerDecl for going from lldb -> clang
Nathan Lanza via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 17 09:43:37 PDT 2019
Author: lanza
Date: Wed Jul 17 09:43:36 2019
New Revision: 366345
URL: http://llvm.org/viewvc/llvm-project?rev=366345&view=rev
Log:
[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
Modified:
lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h
Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp?rev=366345&r1=366344&r2=366345&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp Wed Jul 17 09:43:36 2019
@@ -1354,6 +1354,10 @@ PdbAstBuilder::ToCompilerDeclContext(cla
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());
Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h?rev=366345&r1=366344&r2=366345&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h Wed Jul 17 09:43:36 2019
@@ -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; }
More information about the lldb-commits
mailing list