diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-11-01 10:31:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-01 10:31:01 -0400 |
| commit | 068f2a2552ba49335a8a1e72e1731d047335fe82 (patch) | |
| tree | 98c3f8019da4bd256168d3d953878da9512d4518 /source/slang/slang-options.cpp | |
| parent | f59df3814a514cab01f69a24e3330d13de3f9c92 (diff) | |
-extract-repro gives approximation of 'command line' used (#1103)
* Added feature to repro manifest of approximation of command line that was used.
* Add missing slang-options.h
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 12 |
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; |
