diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-12-10 10:02:19 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-10 10:02:19 -0500 |
| commit | 79ec0cfdb5f3461c763e0bf712cf42eb87fccb90 (patch) | |
| tree | cf0c3c0b6e7f10d3a29930cd3aeef586298d4234 /source/core/slang-blob.cpp | |
| parent | 2e52217cb870b4101c1639fed78224f89bf119b3 (diff) | |
DownstreamCompiler abstraction (#1149)
* CPPCompiler -> DownstreamCompiler
* Added DownstreamCompileResult to start abstraction such that we don't need files.
* * Split out slang-blob.cpp
* Made CompileResult hold a DownstreamCompileResult - for access to binary or ISlangSharedLibrary
* Keep temporary files in scope.
* Add a hash to the hex dump stream.
* Move all file tracking into DownstreamCompiler.
Diffstat (limited to 'source/core/slang-blob.cpp')
| -rw-r--r-- | source/core/slang-blob.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/core/slang-blob.cpp b/source/core/slang-blob.cpp new file mode 100644 index 000000000..4421db09a --- /dev/null +++ b/source/core/slang-blob.cpp @@ -0,0 +1,14 @@ +#include "slang-blob.h" + +namespace Slang { + +// Allocate static const storage for the various interface IDs that the Slang API needs to expose +static const Guid IID_ISlangUnknown = SLANG_UUID_ISlangUnknown; +static const Guid IID_ISlangBlob = SLANG_UUID_ISlangBlob; + +ISlangUnknown* BlobBase::getInterface(const Guid& guid) +{ + return (guid == IID_ISlangUnknown || guid == IID_ISlangBlob) ? static_cast<ISlangBlob*>(this) : nullptr; +} + +} // namespace Slang |
