summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
diff options
context:
space:
mode:
authorNathan Lanza <nathan@lanza.io>2019-07-21 07:46:18 +0000
committerNathan Lanza <nathan@lanza.io>2019-07-21 07:46:18 +0000
commitfe1b8a09113db0a1b3894c80f0e214d8489d0241 (patch)
tree4781021537d1008d4643f3f0eb5e2950d796aae5 /lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
parent1d149d08d3aeed65d5b10ee2e84c72e661122344 (diff)
downloadbcm5719-llvm-fe1b8a09113db0a1b3894c80f0e214d8489d0241.tar.gz
bcm5719-llvm-fe1b8a09113db0a1b3894c80f0e214d8489d0241.zip
[NativePDB] Make GetOrCreateDeclForUid return an lldb CompilerDecl
We intend to make PdbAstBuilder abstract and implement PdbAstBuilderClang along with any other languages that wish to use PDBs. Thus, change GetOrCreateDeclForUid from returning a clang decl to a lldb_private::CompilerDecl. llvm-svn: 366650
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index e27d4699ae2..c9fb1dc8614 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -1506,9 +1506,10 @@ size_t SymbolFileNativePDB::ParseVariablesForContext(const SymbolContext &sc) {
}
CompilerDecl SymbolFileNativePDB::GetDeclForUID(lldb::user_id_t uid) {
- clang::Decl *decl = m_ast->GetOrCreateDeclForUid(PdbSymUid(uid));
-
- return m_ast->ToCompilerDecl(*decl);
+ if (auto decl = m_ast->GetOrCreateDeclForUid(uid))
+ return decl.getValue();
+ else
+ return CompilerDecl();
}
CompilerDeclContext
OpenPOWER on IntegriCloud