Skip to content
This repository has been archived by the owner on Jun 20, 2019. It is now read-only.

Commit

Permalink
Fix debug info for compiler generated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jpf91 committed Feb 19, 2014
1 parent c8b7adc commit a63691f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gcc/d/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2014-02-19 Johannes Pfau <johannespfau@gmail.com>

* d-objfile.cc(build_call_function): Call set_input_location
to set debug info correctly

2014-02-18 Iain Buclaw <ibuclaw@gdcproject.org>

* d-objfile.cc(VarDeclaration::toObjFile): Remove toplevel check.
Expand Down
5 changes: 5 additions & 0 deletions gcc/d/d-objfile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2185,6 +2185,11 @@ build_call_function (const char *name, vec<FuncDeclaration *> functions, bool fo
if (functions.length() == 1 && !force_p)
return functions[0];

Module *mod = current_module_decl;
if (!mod)
mod = d_gcc_get_output_module();
set_input_location (Loc (mod, 1));

// Shouldn't front end build these?
for (size_t i = 0; i < functions.length(); i++)
{
Expand Down

0 comments on commit a63691f

Please sign in to comment.