diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-02-04 14:23:32 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-04 14:23:32 -0500 |
| commit | 7f266f1ea7a51213069282296a905650fd405c3f (patch) | |
| tree | f275da33fc05101c5f9c08076cb038968ab556de /source/slang/slang-compiler.cpp | |
| parent | ef283b80b886c7a0fb34c20e07a43ccca3237ed8 (diff) | |
DownstreamDiagnostic::Type -> Severity (#1687)
* #include an absolute path didn't work - because paths were taken to always be relative.
* WIP diagnostics for line number output.
* Small param naming change
* Use x macro for pass through compile human name lookup/getting.
* WIP on parsing downstream compiler output.
* Split out parsing into ParseDiagnosticUtil.
Added test result of single line.
* Dump out the std output on fail to parse diagnostics.
* Change test type for syntax-error-intrinsic.slang be TEST not TEST_DIAGNOSTIC
* Use Index for StringUtil.
* WIP: First pass support for parsing Slang diagnostics.
* WIP Testing comparing with ParseDiagnosticUtil with previous ad-hoc mechanism.
* Use the new parsing mechanism for diagnostic comparisons.
* Improvements to diagnostics parsing.
Better error handling, and fallback handling.
Added ability to parse downstream compilers without a prefix.
Added ability to parse Slang with a prefix.
* DownstreamDiagnostic::Type -> Severity and related fixes.
* Small fixes around moving from DownstreamDiagnostic::Type -> Severity
* Small comment fixes.
Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-compiler.cpp')
| -rwxr-xr-x | source/slang/slang-compiler.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp index 1e9357f4f..993a4966e 100755 --- a/source/slang/slang-compiler.cpp +++ b/source/slang/slang-compiler.cpp @@ -1541,22 +1541,22 @@ SlangResult dissassembleDXILUsingDXC( // Severity severity = Severity::Error; - switch (diagnostic.type) + switch (diagnostic.severity) { - case Diagnostic::Type::Unknown: - case Diagnostic::Type::Error: + case Diagnostic::Severity::Unknown: + case Diagnostic::Severity::Error: { severity = Severity::Error; builder << "error"; break; } - case Diagnostic::Type::Warning: + case Diagnostic::Severity::Warning: { severity = Severity::Warning; builder << "warning"; break; } - case Diagnostic::Type::Info: + case Diagnostic::Severity::Info: { severity = Severity::Note; builder << "info"; @@ -1572,7 +1572,7 @@ SlangResult dissassembleDXILUsingDXC( } // If any errors are emitted, then we are done - if (diagnostics.has(DownstreamDiagnostic::Type::Error)) + if (diagnostics.has(DownstreamDiagnostic::Severity::Error)) { return SLANG_FAIL; } |
