diff options
| author | Yong He <yonghe@outlook.com> | 2017-10-24 19:14:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-24 19:14:14 -0400 |
| commit | 3043171dae37d18015d6cd26287d492c576f4f1a (patch) | |
| tree | 1037732c1e90afd36b588851ce5755d64188bcdb /source/slang | |
| parent | ab64cf2ec05980d72cb2bad45e629d10ebbefdc1 (diff) | |
| parent | 434d3428932ccaa0f6834d03c37adcab37d17a01 (diff) | |
Merge pull request #227 from csyonghe/master
Extending render-test to support various resource inputs
Diffstat (limited to 'source/slang')
| -rw-r--r-- | source/slang/bytecode.h | 2 | ||||
| -rw-r--r-- | source/slang/check.cpp | 3 | ||||
| -rw-r--r-- | source/slang/emit.cpp | 1 | ||||
| -rw-r--r-- | source/slang/ir.cpp | 6 | ||||
| -rw-r--r-- | source/slang/lower-to-ir.cpp | 1 | ||||
| -rw-r--r-- | source/slang/type-defs.h | 1 |
6 files changed, 8 insertions, 6 deletions
diff --git a/source/slang/bytecode.h b/source/slang/bytecode.h index f38007ba9..75b9f15cd 100644 --- a/source/slang/bytecode.h +++ b/source/slang/bytecode.h @@ -243,7 +243,7 @@ struct BCHeader // entry points for each target. }; -struct CompileRequest; +class CompileRequest; void generateBytecodeForCompileRequest( CompileRequest* compileReq); diff --git a/source/slang/check.cpp b/source/slang/check.cpp index f12e7e55d..5ebb22999 100644 --- a/source/slang/check.cpp +++ b/source/slang/check.cpp @@ -4,6 +4,7 @@ #include "compiler.h" #include "visitor.h" +#include "../core/secure-crt.h" #include <assert.h> namespace Slang @@ -4887,7 +4888,7 @@ namespace Slang if (auto decl = dynamic_cast<CallableDecl*>(candidate.item.declRef.decl)) { char buffer[1024]; - sprintf(buffer, "[this:%p, primary:%p, next:%p]", + sprintf_s(buffer, sizeof(buffer), "[this:%p, primary:%p, next:%p]", decl, decl->primaryDecl, decl->nextDecl); diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 1b5db065f..f76ab1db1 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -4517,6 +4517,7 @@ emitDeclImpl(decl, nullptr); switch(inst->op) { + case 0: // nothing yet default: emit(getIRName(inst)); break; diff --git a/source/slang/ir.cpp b/source/slang/ir.cpp index 4c01e4fc1..14639de7e 100644 --- a/source/slang/ir.cpp +++ b/source/slang/ir.cpp @@ -1614,9 +1614,9 @@ namespace Slang // There are several ops we want to special-case here, // so that they will be more pleasant to look at. // +#if 0 switch (op) { -#if 0 case kIROp_Module: dumpIndent(context); dump(context, "module\n"); @@ -1688,11 +1688,11 @@ namespace Slang dumpChildrenRaw(context, block); } return; -#endif default: break; } +#endif #if 0 // We also want to special-case based on the *type* @@ -2918,7 +2918,7 @@ namespace Slang // TODO: are there any instruction types that need to be handled // specially here? That would be anything that has more state // than is visible in its operand list... - + case 0: // nothing yet default: { // The common case is that we just need to construct a cloned diff --git a/source/slang/lower-to-ir.cpp b/source/slang/lower-to-ir.cpp index a3d67b670..327902e4a 100644 --- a/source/slang/lower-to-ir.cpp +++ b/source/slang/lower-to-ir.cpp @@ -338,6 +338,7 @@ LoweredValInfo emitCallToVal( auto builder = context->irBuilder; switch (funcVal.flavor) { + case LoweredValInfo::Flavor::None: default: return LoweredValInfo::simple( builder->emitCallInst(type, getSimpleVal(context, funcVal), argCount, args)); diff --git a/source/slang/type-defs.h b/source/slang/type-defs.h index e928efb65..7ec801a14 100644 --- a/source/slang/type-defs.h +++ b/source/slang/type-defs.h @@ -318,7 +318,6 @@ SYNTAX_CLASS(GroupSharedType, Type) RAW( virtual ~GroupSharedType() { - int f = 0; } virtual Slang::String ToString() override; |
