summaryrefslogtreecommitdiff
path: root/source/slang/slang-options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-options.cpp')
-rw-r--r--source/slang/slang-options.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index 7429db2fc..b17e35d69 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -3,6 +3,8 @@
// Implementation of options parsing for `slangc` command line,
// and also for API interface that takes command-line argument strings.
+#include "slang-options.h"
+
#include "../../slang.h"
#include "slang-compiler.h"
@@ -61,6 +63,16 @@ static SlangResult _parsePassThrough(const UnownedStringSlice& name, SlangPassTh
return SLANG_FAIL;
}
+UnownedStringSlice getPassThroughName(SlangPassThrough passThru)
+{
+#define SLANG_PASS_THROUGH_TYPE_TO_NAME(x, y) \
+ if (passThru == SLANG_PASS_THROUGH_##y) return UnownedStringSlice::fromLiteral(#x);
+
+ SLANG_PASS_THROUGH_TYPES(SLANG_PASS_THROUGH_TYPE_TO_NAME)
+
+ return UnownedStringSlice::fromLiteral("unknown");
+}
+
struct OptionsParser
{
SlangSession* session = nullptr;