Remove lookupSymbol() and have all callers use SymbolInfo::lookup() instead (#62552)

This commit is contained in:
Jonathan Grynspan
2022-12-14 08:33:32 -05:00
committed by GitHub
parent 9cebd69654
commit c889270a38
7 changed files with 29 additions and 53 deletions

View File

@@ -124,12 +124,13 @@ static const char *class_getName(const ClassMetadata* type) {
}
template<> void ProtocolConformanceDescriptor::dump() const {
SymbolInfo info;
llvm::Optional<SymbolInfo> info;
auto symbolName = [&](const void *addr) -> const char * {
int ok = lookupSymbol(addr, &info);
if (!ok || !info.getSymbolName())
return "<unknown addr>";
return info.getSymbolName();
info = SymbolInfo::lookup(addr);
if (info.has_value() && info->getSymbolName()) {
return info->getSymbolName();
}
return "<unknown addr>";
};
switch (auto kind = getTypeKind()) {