]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Don't include the full absolute path in line directives
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 27 Apr 2017 19:26:44 +0000 (21:26 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 12 May 2018 12:15:37 +0000 (14:15 +0200)
Only write source's filename prepended by the path relative to the
directory the valac call origined from.

https://bugzilla.gnome.org/show_bug.cgi?id=769935

codegen/valaccodebasemodule.vala

index 8c8879a9c7c501bf5fed82287021c667cc58a5dd..0752a020937afa0602a71558c8954034736f13d8 100644 (file)
@@ -592,7 +592,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
        public void push_line (SourceReference? source_reference) {
                line_directive_stack.add (current_line);
                if (source_reference != null) {
-                       current_line = new CCodeLineDirective (source_reference.file.filename, source_reference.begin.line);
+                       current_line = new CCodeLineDirective (source_reference.file.get_relative_filename (), source_reference.begin.line);
                        if (ccode != null) {
                                ccode.current_line = current_line;
                        }