diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-06-15 15:21:20 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-06-15 15:31:22 -0700 |
| commit | 04d43cd71f081f1b8d2f0fd803a47cb6342e4fcd (patch) | |
| tree | 199e9a54596c572015c7b0652e62b941418f483f /source/slang | |
| parent | 205187b561c3b31fa931e73e8f7263f0c4b1de41 (diff) | |
Remove more "core" code that isn't used.
It is always easier to add back code when you need it, than it is to maintain code you aren't using.
Diffstat (limited to 'source/slang')
| -rw-r--r-- | source/slang/check.cpp | 2 | ||||
| -rw-r--r-- | source/slang/compiler.h | 22 | ||||
| -rw-r--r-- | source/slang/diagnostics.cpp | 11 | ||||
| -rw-r--r-- | source/slang/syntax.h | 16 |
4 files changed, 9 insertions, 42 deletions
diff --git a/source/slang/check.cpp b/source/slang/check.cpp index b3e1baf79..8fcd905c8 100644 --- a/source/slang/check.cpp +++ b/source/slang/check.cpp @@ -1068,7 +1068,7 @@ namespace Slang return genericDecl; } - virtual void visitInterfaceDecl(InterfaceDecl* decl) override + virtual void visitInterfaceDecl(InterfaceDecl* /*decl*/) override { // TODO: do some actual checking of members here } diff --git a/source/slang/compiler.h b/source/slang/compiler.h index 3b6696647..f34be794b 100644 --- a/source/slang/compiler.h +++ b/source/slang/compiler.h @@ -152,28 +152,6 @@ namespace Slang TranslationUnitOptions const& getTranslationUnitOptions() { return *translationUnitOptions; } }; -#if 0 - - class ShaderCompiler : public Slang::Object - { - public: - virtual void Compile( - CompileResult& result, - CollectionOfTranslationUnits* collectionOfTranslationUnits, - const CompileOptions& options, - CompileRequest* request) = 0; - - virtual TranslationUnitResult PassThrough( - String const& sourceText, - String const& sourcePath, - const CompileOptions & options, - TranslationUnitOptions const& translationUnitOptions) = 0; - - }; - - ShaderCompiler * CreateShaderCompiler(); -#endif - TranslationUnitResult passThrough( String const& sourceText, String const& sourcePath, diff --git a/source/slang/diagnostics.cpp b/source/slang/diagnostics.cpp index e9c7e965a..45c0c9b76 100644 --- a/source/slang/diagnostics.cpp +++ b/source/slang/diagnostics.cpp @@ -36,11 +36,6 @@ void printDiagnosticArg(StringBuilder& sb, Decl* decl) sb << decl->Name.Content; } -void printDiagnosticArg(StringBuilder& sb, Type* type) -{ - sb << type->DataType->ToString(); -} - void printDiagnosticArg(StringBuilder& sb, ExpressionType* type) { sb << type->ToString(); @@ -174,10 +169,10 @@ void DiagnosticSink::diagnoseImpl(CodePosition const& pos, DiagnosticInfo const& if( callback ) { // If so, pass the error string along to them - StringBuilder sb; - formatDiagnostic(sb, diagnostic); + StringBuilder messageBuilder; + formatDiagnostic(messageBuilder, diagnostic); - callback(sb.ProduceString().begin(), callbackUserData); + callback(messageBuilder.ProduceString().begin(), callbackUserData); } else { diff --git a/source/slang/syntax.h b/source/slang/syntax.h index 3cd46914f..96eb3d530 100644 --- a/source/slang/syntax.h +++ b/source/slang/syntax.h @@ -1133,16 +1133,6 @@ namespace Slang return 0; } - class Type - { - public: - RefPtr<ExpressionType> DataType; - // ContrainedWorlds: Implementation must be defined at at least one of of these worlds in order to satisfy global dependency - // FeasibleWorlds: The component can be computed at any of these worlds - EnumerableHashSet<String> ConstrainedWorlds, FeasibleWorlds; - EnumerableHashSet<String> PinnedWorlds; - }; - class ContainerDecl; @@ -2507,7 +2497,7 @@ namespace Slang // - class SyntaxVisitor : public Object + class SyntaxVisitor { protected: DiagnosticSink * sink = nullptr; @@ -2523,6 +2513,10 @@ namespace Slang SyntaxVisitor(DiagnosticSink * sink) : sink(sink) {} + virtual ~SyntaxVisitor() + { + } + virtual RefPtr<ProgramSyntaxNode> VisitProgram(ProgramSyntaxNode* program) { for (auto & m : program->Members) |
