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/core/slang-nvrtc-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/core/slang-nvrtc-compiler.cpp')
| -rw-r--r-- | source/core/slang-nvrtc-compiler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/core/slang-nvrtc-compiler.cpp b/source/core/slang-nvrtc-compiler.cpp index 78afc618f..eb117379f 100644 --- a/source/core/slang-nvrtc-compiler.cpp +++ b/source/core/slang-nvrtc-compiler.cpp @@ -190,7 +190,7 @@ static bool _hasDriveLetter(const UnownedStringSlice& line) static SlangResult _parseNVRTCLine(const UnownedStringSlice& line, DownstreamDiagnostic& outDiagnostic) { typedef DownstreamDiagnostic Diagnostic; - typedef Diagnostic::Type Type; + typedef Diagnostic::Severity Severity; outDiagnostic.stage = Diagnostic::Stage::Compile; @@ -215,11 +215,11 @@ static SlangResult _parseNVRTCLine(const UnownedStringSlice& line, DownstreamDia if (split1 == "error") { - outDiagnostic.type = Type::Error; + outDiagnostic.severity = Severity::Error; } else if (split1 == "warning") { - outDiagnostic.type = Type::Warning; + outDiagnostic.severity = Severity::Warning; } outDiagnostic.text = split[2].trim(); @@ -461,7 +461,7 @@ SlangResult NVRTCDownstreamCompiler::compile(const CompileOptions& options, RefP } // if it has a compilation error.. set on output - if (diagnostics.has(DownstreamDiagnostic::Type::Error)) + if (diagnostics.has(DownstreamDiagnostic::Severity::Error)) { diagnostics.result = SLANG_FAIL; } |
