From 80ff45f095db5a08db264921fda2db210788d529 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 3 Dec 2021 09:46:08 -0500 Subject: Improvements to repro diagnostics (#2039) * #include an absolute path didn't work - because paths were taken to always be relative. * Improvements to repro diagnostics. * Fix typo. --- source/core/slang-riff.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/core') diff --git a/source/core/slang-riff.h b/source/core/slang-riff.h index 83a522e81..3a964df2d 100644 --- a/source/core/slang-riff.h +++ b/source/core/slang-riff.h @@ -5,6 +5,7 @@ #include "slang-stream.h" #include "slang-memory-arena.h" #include "slang-writer.h" +#include "slang-semantic-version.h" namespace Slang { @@ -88,6 +89,11 @@ struct RiffSemanticVersion /// A major change is binary incompatible by default int getMajor() const { return (m_raw >> 16); } + SemanticVersion asSemanticVersion() const + { + return SemanticVersion(getMajor(), getMinor(), getPatch()); + } + static RawType makeRaw(int major, int minor, int patch) { SLANG_ASSERT((major | minor | patch) >= 0); @@ -103,6 +109,7 @@ struct RiffSemanticVersion } static RiffSemanticVersion make(int major, int minor, int patch) { return makeFromRaw(makeRaw(major, minor, patch)); } + static RiffSemanticVersion make(const SemanticVersion& in) { return makeFromRaw(makeRaw(in.m_major, in.m_minor, in.m_patch)); } /// True if the read version is compatible with the current version, based on semantic rules. static bool areCompatible(const ThisType& currentVersion, const ThisType& readVersion) -- cgit v1.2.3