summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Smith <aaron.smith@microsoft.com>2018-03-20 00:34:18 +0000
committerAaron Smith <aaron.smith@microsoft.com>2018-03-20 00:34:18 +0000
commita3a8cc80b3a8029ad93a7ec2a3da7b7bd31f56ac (patch)
tree8b3fd36db8b5a103e37893015ca76c79d8342034
parent5ffe52395a39ebc800dcd8a1c9975b89416d770c (diff)
downloadbcm5719-llvm-a3a8cc80b3a8029ad93a7ec2a3da7b7bd31f56ac.tar.gz
bcm5719-llvm-a3a8cc80b3a8029ad93a7ec2a3da7b7bd31f56ac.zip
[SymbolFilePDB] Simplify code with newer methods
llvm-svn: 327927
-rw-r--r--lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp4
-rw-r--r--lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp16
2 files changed, 4 insertions, 16 deletions
diff --git a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
index e26d46df46b..fc066c2bc33 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
+++ b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
@@ -438,7 +438,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) {
pointer_ast_type = pointee_type->GetFullCompilerType();
if (pointer_type->isReference())
pointer_ast_type = pointer_ast_type.GetLValueReferenceType();
- else if (pointer_type->getRawSymbol().isRValueReference())
+ else if (pointer_type->isRValueReference())
pointer_ast_type = pointer_ast_type.GetRValueReferenceType();
else
pointer_ast_type = pointer_ast_type.GetPointerType();
@@ -449,7 +449,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) {
if (pointer_type->isVolatileType())
pointer_ast_type = pointer_ast_type.AddVolatileModifier();
- if (pointer_type->getRawSymbol().isRestrictedType())
+ if (pointer_type->isRestrictedType())
pointer_ast_type = pointer_ast_type.AddRestrictModifier();
return std::make_shared<lldb_private::Type>(
diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
index cdd5fa1f73a..160d512cc22 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -742,23 +742,11 @@ bool SymbolFilePDB::ResolveFunction(const llvm::pdb::PDBSymbolFunc &pdb_func,
bool include_inlines,
lldb_private::SymbolContextList &sc_list) {
lldb_private::SymbolContext sc;
- auto file_vm_addr = pdb_func.getVirtualAddress();
- if (file_vm_addr == LLDB_INVALID_ADDRESS)
- return false;
-
- Address so_addr(file_vm_addr);
- sc.comp_unit = GetCompileUnitContainsAddress(so_addr).get();
+ sc.comp_unit = ParseCompileUnitForUID(pdb_func.getCompilandId()).get();
if (!sc.comp_unit)
return false;
sc.module_sp = sc.comp_unit->GetModule();
- auto symbol_up =
- m_session_up->findSymbolByAddress(file_vm_addr, PDB_SymType::Function);
- if (!symbol_up)
- return false;
-
- auto *func = llvm::dyn_cast<PDBSymbolFunc>(symbol_up.get());
- assert(func);
- sc.function = ParseCompileUnitFunctionForPDBFunc(*func, sc);
+ sc.function = ParseCompileUnitFunctionForPDBFunc(pdb_func, sc);
if (!sc.function)
return false;
OpenPOWER on IntegriCloud