mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Add DIContext::getLineInfoForAddressRange() function and test. This function allows a caller to obtain a table of line information for a function using the function's address and size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173537 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -163,8 +163,14 @@ static int printLineInfoForInput() {
|
||||
|
||||
outs() << "Function: " << Name << ", Size = " << Size << "\n";
|
||||
|
||||
DILineInfo Result = Context->getLineInfoForAddress(Addr);
|
||||
outs() << " Line info:" << Result.getFileName() << ", line:" << Result.getLine() << "\n";
|
||||
DILineInfoTable Lines = Context->getLineInfoForAddressRange(Addr, Size);
|
||||
DILineInfoTable::iterator Begin = Lines.begin();
|
||||
DILineInfoTable::iterator End = Lines.end();
|
||||
for (DILineInfoTable::iterator It = Begin; It != End; ++It) {
|
||||
outs() << " Line info @ " << It->first - Addr << ": "
|
||||
<< It->second.getFileName()
|
||||
<< ", line:" << It->second.getLine() << "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user