summaryrefslogtreecommitdiffstats
path: root/source/compiler-core/slang-command-line-args.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-02-20 12:24:00 -0800
committerGitHub <noreply@github.com>2024-02-20 12:24:00 -0800
commit4d20fd329956ac89408b1628a8291fea01bc9a6d (patch)
tree8e62d9c1ec05142fd25d0b31073fdb56d44691b0 /source/compiler-core/slang-command-line-args.h
parent8e9b61e3bac69dbb37a1451b62302e688a017ced (diff)
Refactor compiler option representations. (#3598)
* Refactor compiler option representation. * Fix binary compatibility. * Add a test for specifying compiler options at link time. * Fix binary compatibility. * Fix binary compatibility. * Fix backward compatibility on matrix layout. * Fix. * Fix. * Fix. * Fix gfx. * Fix gfx. * Fix dynamic dispatch. * Polish.
Diffstat (limited to 'source/compiler-core/slang-command-line-args.h')
-rw-r--r--source/compiler-core/slang-command-line-args.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/compiler-core/slang-command-line-args.h b/source/compiler-core/slang-command-line-args.h
index b2bd48c61..0c11a3c46 100644
--- a/source/compiler-core/slang-command-line-args.h
+++ b/source/compiler-core/slang-command-line-args.h
@@ -69,6 +69,9 @@ struct CommandLineArgs
//String m_executablePath; ///< Can be optionally be set
List<Arg> m_args; ///< The args
RefPtr<CommandLineContext> m_context; ///< The context, which mainly has source manager
+
+ String serialize();
+ void deserialize(String content);
};
struct CommandLineReader
@@ -155,18 +158,16 @@ struct DownstreamArgs
CommandLineContext* getContext() const { return m_context; }
/// Ctor
- DownstreamArgs(CommandLineContext* context):
- m_context(context)
- {
- }
+ DownstreamArgs(CommandLineContext* context);
+
/// Default ctor - for convenience, should really use with context normally
DownstreamArgs() {}
+ List<Entry> m_entries; ///< All of the entries
+
protected:
Index _findOrAddName(SourceLoc loc, const UnownedStringSlice& name, Flags flags, DiagnosticSink* sink);
- List<Entry> m_entries; ///< All of the entries
-
RefPtr<CommandLineContext> m_context; ///< The context that is being used (primarily for loc tracking) across all entries/args
};