diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-05-04 13:42:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-04 13:42:57 -0700 |
| commit | b67f656ef3b41a44f4d4581a781c0958029281bd (patch) | |
| tree | 5d5668d7f16fd50b765eee7b92f48f6ef8095ecf /source/slang/parameter-binding.cpp | |
| parent | 07a59b623e44348caf06d65b2578b51d86ba0af5 (diff) | |
Re-enable emission of #line directives and clean up output (#554)
This was based on feedback from Falcor users, who felt like changing the default to have no line directives didn't work out well. Since I'd only made them disabled by default based on what I perceived to be Falcor's needs, I'm happy to turn this back on by default.
I also added a few changes to clean up the output:
* Don't emit a directive for a sub-expression, since that breaks up the code too much. The only directives inside a function body will be on top-level instructions that didn't get folded into a use site.
* Add logic to emit a directive for top-level declarations (globals, functions, structs), and clean up their printing so that they put any extra space *after* the declaration rather than before (so the line numbers can be accurate)
* Don't emit the file path part of a directive if it would be the same as the previous directive. This makes the output less noisy, at the cost of having to work your way backward to find the file if you are looking directly at the output.
There are certainly more cleanups possible, but these make the output decent enough to be useful for working backwards from a downstream compiler error to the offending code.
Diffstat (limited to 'source/slang/parameter-binding.cpp')
0 files changed, 0 insertions, 0 deletions
