mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
Fix "DWARF2 reader: Badly formed extended line op encountered" (#20862)
This commit is contained in:
parent
fe345e8ae9
commit
842dd20ea5
2 changed files with 7 additions and 10 deletions
|
@ -72,7 +72,7 @@ alias StmtState = dmd.stmtstate.StmtState!block;
|
|||
|
||||
void elem_setLoc(elem* e, Loc loc) nothrow
|
||||
{
|
||||
srcpos_setLoc(e.Esrcpos, loc);
|
||||
e.Esrcpos = toSrcpos(loc);
|
||||
}
|
||||
|
||||
void Statement_toIR(Statement s, ref IRState irs)
|
||||
|
@ -1710,13 +1710,7 @@ void insertFinallyBlockGotos(block* startblock)
|
|||
|
||||
private void block_setLoc(block* b, Loc loc) nothrow
|
||||
{
|
||||
srcpos_setLoc(b.Bsrcpos, loc);
|
||||
}
|
||||
|
||||
private void srcpos_setLoc(ref Srcpos s, Loc loc) nothrow
|
||||
{
|
||||
SourceLoc sl = SourceLoc(loc);
|
||||
s.set(sl.filename.ptr, sl.line, sl.column);
|
||||
b.Bsrcpos = toSrcpos(loc);
|
||||
}
|
||||
|
||||
private bool isAssertFalse(const Expression e) nothrow
|
||||
|
|
|
@ -880,8 +880,11 @@ Symbol* toSymbol(Type t)
|
|||
* Returns:
|
||||
* Srcpos backend struct corresponding to the given location
|
||||
*/
|
||||
Srcpos toSrcpos(Loc loc)
|
||||
Srcpos toSrcpos(Loc loc) nothrow
|
||||
{
|
||||
SourceLoc sl = SourceLoc(loc);
|
||||
return Srcpos.create(sl.filename.ptr, sl.line, sl.column);
|
||||
if (sl.filename.length > 0)
|
||||
return Srcpos.create(sl.filename.ptr, sl.line, sl.column);
|
||||
else
|
||||
return Srcpos.create(null, 0, 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue