mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-29 14:40:40 +03:00
Merge branch 'master' into merge-2.067
This commit is contained in:
commit
45ec6a0512
5 changed files with 20 additions and 21 deletions
|
@ -184,7 +184,7 @@ void AsmStatement_toIR(AsmStatement *stmt, IRState * irs)
|
||||||
assert(asmblock);
|
assert(asmblock);
|
||||||
|
|
||||||
// debug info
|
// debug info
|
||||||
gIR->DBuilder.EmitStopPoint(stmt->loc.linnum);
|
gIR->DBuilder.EmitStopPoint(stmt->loc);
|
||||||
|
|
||||||
if (!stmt->asmcode)
|
if (!stmt->asmcode)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -776,7 +776,7 @@ void ldc::DIBuilder::EmitFuncStart(FuncDeclaration *fd)
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
assert(static_cast<llvm::MDNode *>(getIrFunc(fd)->diSubprogram) != 0);
|
assert(static_cast<llvm::MDNode *>(getIrFunc(fd)->diSubprogram) != 0);
|
||||||
EmitStopPoint(fd->loc.linnum);
|
EmitStopPoint(fd->loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ldc::DIBuilder::EmitFuncEnd(FuncDeclaration *fd)
|
void ldc::DIBuilder::EmitFuncEnd(FuncDeclaration *fd)
|
||||||
|
@ -788,7 +788,7 @@ void ldc::DIBuilder::EmitFuncEnd(FuncDeclaration *fd)
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
assert(static_cast<llvm::MDNode *>(getIrFunc(fd)->diSubprogram) != 0);
|
assert(static_cast<llvm::MDNode *>(getIrFunc(fd)->diSubprogram) != 0);
|
||||||
EmitStopPoint(fd->endloc.linnum);
|
EmitStopPoint(fd->endloc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ldc::DIBuilder::EmitBlockStart(Loc& loc)
|
void ldc::DIBuilder::EmitBlockStart(Loc& loc)
|
||||||
|
@ -809,7 +809,7 @@ void ldc::DIBuilder::EmitBlockStart(Loc& loc)
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
IR->func()->diLexicalBlocks.push(block);
|
IR->func()->diLexicalBlocks.push(block);
|
||||||
EmitStopPoint(loc.linnum);
|
EmitStopPoint(loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ldc::DIBuilder::EmitBlockEnd()
|
void ldc::DIBuilder::EmitBlockEnd()
|
||||||
|
@ -825,15 +825,14 @@ void ldc::DIBuilder::EmitBlockEnd()
|
||||||
fn->diLexicalBlocks.pop();
|
fn->diLexicalBlocks.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ldc::DIBuilder::EmitStopPoint(unsigned ln)
|
void ldc::DIBuilder::EmitStopPoint(Loc& loc)
|
||||||
{
|
{
|
||||||
if (!global.params.symdebug)
|
if (!global.params.symdebug)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Logger::println("D to dwarf stoppoint at line %u", ln);
|
Logger::println("D to dwarf stoppoint at line %u, column %u", loc.linnum, loc.charnum);
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
llvm::DebugLoc loc = llvm::DebugLoc::get(ln, 0, GetCurrentScope());
|
IR->ir->SetCurrentDebugLocation(llvm::DebugLoc::get(loc.linnum, loc.charnum, GetCurrentScope()));
|
||||||
IR->ir->SetCurrentDebugLocation(loc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ldc::DIBuilder::EmitValue(llvm::Value *val, VarDeclaration *vd)
|
void ldc::DIBuilder::EmitValue(llvm::Value *val, VarDeclaration *vd)
|
||||||
|
|
|
@ -158,7 +158,7 @@ public:
|
||||||
/// \brief Emits debug info for block end
|
/// \brief Emits debug info for block end
|
||||||
void EmitBlockEnd();
|
void EmitBlockEnd();
|
||||||
|
|
||||||
void EmitStopPoint(unsigned ln);
|
void EmitStopPoint(Loc& loc);
|
||||||
|
|
||||||
void EmitValue(llvm::Value *val, VarDeclaration* vd);
|
void EmitValue(llvm::Value *val, VarDeclaration* vd);
|
||||||
|
|
||||||
|
|
|
@ -371,7 +371,7 @@ public:
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
// emit dwarf stop point
|
// emit dwarf stop point
|
||||||
gIR->DBuilder.EmitStopPoint(stmt->loc.linnum);
|
gIR->DBuilder.EmitStopPoint(stmt->loc);
|
||||||
|
|
||||||
emitCoverageLinecountInc(stmt->loc);
|
emitCoverageLinecountInc(stmt->loc);
|
||||||
|
|
||||||
|
@ -492,7 +492,7 @@ public:
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
// emit dwarf stop point
|
// emit dwarf stop point
|
||||||
gIR->DBuilder.EmitStopPoint(stmt->loc.linnum);
|
gIR->DBuilder.EmitStopPoint(stmt->loc);
|
||||||
|
|
||||||
emitCoverageLinecountInc(stmt->loc);
|
emitCoverageLinecountInc(stmt->loc);
|
||||||
|
|
||||||
|
@ -809,7 +809,7 @@ public:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// emit dwarf stop point
|
// emit dwarf stop point
|
||||||
gIR->DBuilder.EmitStopPoint(stmt->loc.linnum);
|
gIR->DBuilder.EmitStopPoint(stmt->loc);
|
||||||
|
|
||||||
emitCoverageLinecountInc(stmt->loc);
|
emitCoverageLinecountInc(stmt->loc);
|
||||||
|
|
||||||
|
@ -872,7 +872,7 @@ public:
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
// emit dwarf stop point
|
// emit dwarf stop point
|
||||||
gIR->DBuilder.EmitStopPoint(stmt->loc.linnum);
|
gIR->DBuilder.EmitStopPoint(stmt->loc);
|
||||||
|
|
||||||
emitCoverageLinecountInc(stmt->loc);
|
emitCoverageLinecountInc(stmt->loc);
|
||||||
|
|
||||||
|
@ -940,7 +940,7 @@ public:
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
// emit dwarf stop point
|
// emit dwarf stop point
|
||||||
gIR->DBuilder.EmitStopPoint(stmt->loc.linnum);
|
gIR->DBuilder.EmitStopPoint(stmt->loc);
|
||||||
|
|
||||||
// if there's no finalbody or no body, things are simple
|
// if there's no finalbody or no body, things are simple
|
||||||
if (!stmt->finalbody) {
|
if (!stmt->finalbody) {
|
||||||
|
@ -1032,7 +1032,7 @@ public:
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
// emit dwarf stop point
|
// emit dwarf stop point
|
||||||
gIR->DBuilder.EmitStopPoint(stmt->loc.linnum);
|
gIR->DBuilder.EmitStopPoint(stmt->loc);
|
||||||
|
|
||||||
// create basic blocks
|
// create basic blocks
|
||||||
llvm::BasicBlock* oldend = irs->scopeend();
|
llvm::BasicBlock* oldend = irs->scopeend();
|
||||||
|
@ -1089,7 +1089,7 @@ public:
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
// emit dwarf stop point
|
// emit dwarf stop point
|
||||||
gIR->DBuilder.EmitStopPoint(stmt->loc.linnum);
|
gIR->DBuilder.EmitStopPoint(stmt->loc);
|
||||||
|
|
||||||
emitCoverageLinecountInc(stmt->loc);
|
emitCoverageLinecountInc(stmt->loc);
|
||||||
|
|
||||||
|
@ -1118,7 +1118,7 @@ public:
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
// emit dwarf stop point
|
// emit dwarf stop point
|
||||||
gIR->DBuilder.EmitStopPoint(stmt->loc.linnum);
|
gIR->DBuilder.EmitStopPoint(stmt->loc);
|
||||||
|
|
||||||
emitCoverageLinecountInc(stmt->loc);
|
emitCoverageLinecountInc(stmt->loc);
|
||||||
|
|
||||||
|
@ -1690,7 +1690,7 @@ public:
|
||||||
IF_LOG Logger::println("GotoStatement::toIR(): %s", stmt->loc.toChars());
|
IF_LOG Logger::println("GotoStatement::toIR(): %s", stmt->loc.toChars());
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
gIR->DBuilder.EmitStopPoint(stmt->loc.linnum);
|
gIR->DBuilder.EmitStopPoint(stmt->loc);
|
||||||
|
|
||||||
emitCoverageLinecountInc(stmt->loc);
|
emitCoverageLinecountInc(stmt->loc);
|
||||||
|
|
||||||
|
@ -1708,7 +1708,7 @@ public:
|
||||||
IF_LOG Logger::println("GotoDefaultStatement::toIR(): %s", stmt->loc.toChars());
|
IF_LOG Logger::println("GotoDefaultStatement::toIR(): %s", stmt->loc.toChars());
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
gIR->DBuilder.EmitStopPoint(stmt->loc.linnum);
|
gIR->DBuilder.EmitStopPoint(stmt->loc);
|
||||||
|
|
||||||
emitCoverageLinecountInc(stmt->loc);
|
emitCoverageLinecountInc(stmt->loc);
|
||||||
|
|
||||||
|
@ -1730,7 +1730,7 @@ public:
|
||||||
IF_LOG Logger::println("GotoCaseStatement::toIR(): %s", stmt->loc.toChars());
|
IF_LOG Logger::println("GotoCaseStatement::toIR(): %s", stmt->loc.toChars());
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
gIR->DBuilder.EmitStopPoint(stmt->loc.linnum);
|
gIR->DBuilder.EmitStopPoint(stmt->loc);
|
||||||
|
|
||||||
emitCoverageLinecountInc(stmt->loc);
|
emitCoverageLinecountInc(stmt->loc);
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0d89e4a8139d177093c99d9835ae337ee47a7abb
|
Subproject commit 0f9eda90b2c48e658491729528e1415c5946adcc
|
Loading…
Add table
Add a link
Reference in a new issue