mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Improve behavior of DebugInfoEntryMinimal::getSubprogramName() introduced in r159512.
To fetch a subprogram name we should not only inspect the DIE for this subprogram, but optionally inspect its specification, or its abstract origin (even if there is no inlining), or even specification of an abstract origin. Reviewed by Benjamin Kramer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160365 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -155,8 +155,10 @@ DILineInfo DWARFContext::getLineInfoForAddress(uint64_t address,
|
||||
if (specifier.needs(DILineInfoSpecifier::FunctionName)) {
|
||||
const DWARFDebugInfoEntryMinimal *function_die =
|
||||
cu->getFunctionDIEForAddress(address);
|
||||
if (function_die)
|
||||
functionName = function_die->getSubprogramName(cu);
|
||||
if (function_die) {
|
||||
if (const char *name = function_die->getSubprogramName(cu))
|
||||
functionName = name;
|
||||
}
|
||||
}
|
||||
if (specifier.needs(DILineInfoSpecifier::FileLineInfo)) {
|
||||
// Get the line table for this compile unit.
|
||||
|
Reference in New Issue
Block a user