mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 08:30:47 +03:00
Debuginfo: Fix nested variables (primarily for CodeView) (#2909)
We've been going back and forth between GEPs and complex DWARF expressions based on the context pointer; this goes back to the latter, as that fixes simple nested variables for CodeView with LLVM >= 6. I guess it also helps for debuginfos of nested vars with enabled optimizations.
This commit is contained in:
parent
78d6fb3bb8
commit
32b6e49a65
4 changed files with 34 additions and 54 deletions
|
@ -206,7 +206,11 @@ public:
|
|||
|
||||
uint64_t offset =
|
||||
gDataLayout->getStructLayout(type)->getElementOffset(index);
|
||||
#if LDC_LLVM_VER >= 500
|
||||
addr.push_back(llvm::dwarf::DW_OP_plus_uconst);
|
||||
#else
|
||||
addr.push_back(llvm::dwarf::DW_OP_plus);
|
||||
#endif
|
||||
addr.push_back(offset);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue