summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-compiler.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-08-14 15:02:21 -0400
committerGitHub <noreply@github.com>2019-08-14 15:02:21 -0400
commit27583e993aee508361fdccffc107c2f2765698ef (patch)
treebbd567512c3c80877275af6a65c51e6308d4bf70 /source/slang/slang-compiler.cpp
parentdc493d492d4d9c090dab410a0cb80eca490c32aa (diff)
CPPCompiler::OutputMessage -> CPPCompiler::Diagnostic (#1019)
* CPPCompiler::OutputMessage -> CPPCompiler::Diagnostic * Fix problem with merge. * Fix another small merge issue around Diagnostic.
Diffstat (limited to 'source/slang/slang-compiler.cpp')
-rw-r--r--source/slang/slang-compiler.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp
index 5b8643b02..cf708df52 100644
--- a/source/slang/slang-compiler.cpp
+++ b/source/slang/slang-compiler.cpp
@@ -1481,15 +1481,15 @@ SlangResult dissassembleDXILUsingDXC(
StringBuilder builder;
- typedef CPPCompiler::OutputMessage OutputMessage;
+ typedef CPPCompiler::Diagnostic Diagnostic;
- for (const auto& msg : output.messages)
+ for (const auto& diagnostic : output.diagnostics)
{
builder.Clear();
- builder << msg.filePath << "(" << msg.fileLine <<"): ";
+ builder << diagnostic.filePath << "(" << diagnostic.fileLine <<"): ";
- if (msg.stage == OutputMessage::Stage::Link)
+ if (diagnostic.stage == Diagnostic::Stage::Link)
{
builder << "link ";
}
@@ -1497,22 +1497,22 @@ SlangResult dissassembleDXILUsingDXC(
//
Severity severity = Severity::Error;
- switch (msg.type)
+ switch (diagnostic.type)
{
- case OutputMessage::Type::Unknown:
- case OutputMessage::Type::Error:
+ case Diagnostic::Type::Unknown:
+ case Diagnostic::Type::Error:
{
severity = Severity::Error;
builder << "error";
break;
}
- case OutputMessage::Type::Warning:
+ case Diagnostic::Type::Warning:
{
severity = Severity::Warning;
builder << "warning";
break;
}
- case OutputMessage::Type::Info:
+ case Diagnostic::Type::Info:
{
severity = Severity::Note;
builder << "info";
@@ -1521,14 +1521,14 @@ SlangResult dissassembleDXILUsingDXC(
default: break;
}
- builder << " " << msg.code << ": " << msg.text;
+ builder << " " << diagnostic.code << ": " << diagnostic.text;
reportExternalCompileError(compilerText.getBuffer(), severity, SLANG_OK, builder.getUnownedSlice(), sink);
}
}
// If any errors are emitted, then we are done
- if (output.has(CPPCompiler::OutputMessage::Type::Error))
+ if (output.has(CPPCompiler::Diagnostic::Type::Error))
{
return SLANG_FAIL;
}