Cycles: Use 1-based line number for #line directives

AMD CPU platform was complaining about #line 0 directives in the code.
This commit is contained in:
Sergey Sharybin
2017-03-08 12:45:18 +01:00
parent ecfbfe478b
commit 75cb4850f0

View File

@@ -814,7 +814,7 @@ string path_source_replace_includes(const string& source,
/* Use line directives for better error messages. */
line = line_directive(filepath, 1)
+ token.replace(0, n_end + 1, "\n" + text + "\n")
+ line_directive(path_join(path, source_filename), i);
+ line_directive(path_join(path, source_filename), i + 1);
}
}
}