summaryrefslogtreecommitdiffstats
path: root/source/slang-rt
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-10-29 14:49:26 +0800
committerGitHub <noreply@github.com>2024-10-29 14:49:26 +0800
commitf65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch)
treeea1d61342cd29368e19135000ec2948813096205 /source/slang-rt
parenta729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff)
format
* format * Minor test fixes * enable checking cpp format in ci
Diffstat (limited to 'source/slang-rt')
-rw-r--r--source/slang-rt/slang-rt.cpp8
-rw-r--r--source/slang-rt/slang-rt.h19
2 files changed, 15 insertions, 12 deletions
diff --git a/source/slang-rt/slang-rt.cpp b/source/slang-rt/slang-rt.cpp
index 11b4ea773..35ffdb138 100644
--- a/source/slang-rt/slang-rt.cpp
+++ b/source/slang-rt/slang-rt.cpp
@@ -1,9 +1,10 @@
#include "slang-rt.h"
+
#include "../core/slang-basic.h"
#include "../core/slang-shared-library.h"
#if SLANG_WINDOWS_FAMILY
-# include <windows.h>
+#include <windows.h>
#endif
using namespace Slang;
@@ -26,7 +27,8 @@ extern "C"
if (!slangRT_loadedLibraries.tryGetValue(modulePath, lib))
{
if (DefaultSharedLibraryLoader::getSingleton()->loadSharedLibrary(
- modulePath.getBuffer(), lib.writeRef()) != SLANG_OK)
+ modulePath.getBuffer(),
+ lib.writeRef()) != SLANG_OK)
{
_slang_rt_abort("Failed to load DLL \"" + modulePath + "\"");
}
@@ -36,7 +38,7 @@ extern "C"
}
SLANG_RT_API void* SLANG_MCALL
- _slang_rt_load_dll_func(void* moduleHandle, Slang::String funcName, uint32_t argSize)
+ _slang_rt_load_dll_func(void* moduleHandle, Slang::String funcName, uint32_t argSize)
{
if (moduleHandle == nullptr)
{
diff --git a/source/slang-rt/slang-rt.h b/source/slang-rt/slang-rt.h
index 69d8a875b..76b870916 100644
--- a/source/slang-rt/slang-rt.h
+++ b/source/slang-rt/slang-rt.h
@@ -2,22 +2,23 @@
#ifndef SLANG_RT_H
#define SLANG_RT_H
-#include "../core/slang-string.h"
-#include "../core/slang-smart-pointer.h"
#include "../core/slang-com-object.h"
+#include "../core/slang-smart-pointer.h"
+#include "../core/slang-string.h"
#ifdef SLANG_RT_DYNAMIC_EXPORT
-# define SLANG_RT_API SLANG_DLL_EXPORT
+#define SLANG_RT_API SLANG_DLL_EXPORT
#else
-# define SLANG_RT_API
+#define SLANG_RT_API
#endif
#if defined(_MSC_VER)
-# define SLANG_PRELUDE_SHARED_LIB_EXPORT __declspec(dllexport)
+#define SLANG_PRELUDE_SHARED_LIB_EXPORT __declspec(dllexport)
#else
-# define SLANG_PRELUDE_SHARED_LIB_EXPORT __attribute__((__visibility__("default")))
-//# define SLANG_PRELUDE_SHARED_LIB_EXPORT __attribute__ ((dllexport)) __attribute__((__visibility__("default")))
-#endif
+#define SLANG_PRELUDE_SHARED_LIB_EXPORT __attribute__((__visibility__("default")))
+// # define SLANG_PRELUDE_SHARED_LIB_EXPORT __attribute__ ((dllexport))
+// __attribute__((__visibility__("default")))
+#endif
#define SLANG_PRELUDE_EXPORT extern "C" SLANG_PRELUDE_SHARED_LIB_EXPORT
@@ -26,7 +27,7 @@ extern "C"
SLANG_RT_API void SLANG_MCALL _slang_rt_abort(Slang::String errorMessage);
SLANG_RT_API void* SLANG_MCALL _slang_rt_load_dll(Slang::String modulePath);
SLANG_RT_API void* SLANG_MCALL
- _slang_rt_load_dll_func(void* moduleHandle, Slang::String modulePath, uint32_t argSize);
+ _slang_rt_load_dll_func(void* moduleHandle, Slang::String modulePath, uint32_t argSize);
}
#endif