mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-07 19:36:06 +03:00
Fix generation of DWARF debug information in LLVM 3.6.
The creation of complex expressions (e.g. address calculations) was extended in LLVM 3.6.
This commit is contained in:
parent
cb320d9a3f
commit
b3e239a527
3 changed files with 60 additions and 8 deletions
|
@ -79,7 +79,11 @@ DValue* DtoNestedVariable(Loc& loc, Type* astype, VarDeclaration* vd, bool byref
|
|||
}
|
||||
|
||||
LLValue *dwarfValue = 0;
|
||||
#if LDC_LLVM_VER >= 306
|
||||
std::vector<int64_t> dwarfAddr;
|
||||
#else
|
||||
std::vector<LLValue*> dwarfAddr;
|
||||
#endif
|
||||
|
||||
// get the nested context
|
||||
LLValue* ctx = 0;
|
||||
|
@ -497,7 +501,11 @@ void DtoCreateNestedContext(FuncDeclaration* fd) {
|
|||
}
|
||||
|
||||
if (global.params.symdebug) {
|
||||
#if LDC_LLVM_VER >= 306
|
||||
LLSmallVector<int64_t, 2> addr;
|
||||
#else
|
||||
LLSmallVector<LLValue*, 2> addr;
|
||||
#endif
|
||||
gIR->DBuilder.OpOffset(addr, frameType, irLocal->nestedIndex);
|
||||
gIR->DBuilder.EmitLocalVariable(frame, vd, addr);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue