diff options
| author | Fangrui Song <i@maskray.me> | 2021-01-26 11:44:41 -0800 |
|---|---|---|
| committer | Fangrui Song <i@maskray.me> | 2021-01-26 11:44:41 -0800 |
| commit | 31d375f178c27f258ab640afa613a595e67f92f2 (patch) | |
| tree | 1ba35a1b2f84da1c825c4ecb2261af4fba4289c1 /lldb/test/API/python_api/target/TestTargetAPI.py | |
| parent | 2291bd137d12cc4f806d80be93bb442246df4f0e (diff) | |
CGDebugInfo: Drop Loc.isInvalid() special case from getLineNumber
`getLineNumber()` picks CurLoc if the parameter is invalid. This appears to
mainly work around missing SourceLocation information for some constructs, but
sometimes adds unintended locations.
* For `CodeGenObjC/debug-info-blocks.m`, `CurLoc` has been advanced to the closing brace. The debug line of `ImplicitVarParameter` is set to the line of `}` because this implicit parameter has an invalid `SourceLocation`. The debug line is a bit arbitrary - perhaps the location of `^{` is better.
* The file/line of Clang synthesized `__va_list_tag` is arbitrarily attached a `#include` line. D94735
Drop the special case to make getLineNumber less magic and add CurLoc fallback in its callers instead.
Tested with stage 2 -DCMAKE_BUILD_TYPE=Debug clang, byte identical.
Reviewed By: #debug-info, aprantl
Differential Revision: https://reviews.llvm.org/D94391
Diffstat (limited to 'lldb/test/API/python_api/target/TestTargetAPI.py')
0 files changed, 0 insertions, 0 deletions
