summaryrefslogtreecommitdiffstats
path: root/source/core
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2021-12-03 09:46:08 -0500
committerGitHub <noreply@github.com>2021-12-03 09:46:08 -0500
commit80ff45f095db5a08db264921fda2db210788d529 (patch)
tree6c1ed6922ce485a1ca9cdc8fc989d27807c75f73 /source/core
parentfb6cf46fd590ca6a72746fc839981e13b5bdde95 (diff)
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.
Diffstat (limited to 'source/core')
-rw-r--r--source/core/slang-riff.h7
1 files changed, 7 insertions, 0 deletions
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)