summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-06-26 11:59:33 -0700
committerGitHub <noreply@github.com>2020-06-26 11:59:33 -0700
commit3e8bdb60afb5b0c0a53ce06d1dbbc429988f5885 (patch)
tree03f379d064f5e4df3423824140fad897b8a688e7 /source/slang/slang-emit.cpp
parentd084f632a136354dd12952183994240b459240ee (diff)
parent4e443984065552cc2f648ae2fae9e49a4ef21107 (diff)
Merge pull request #1408 from csyonghe/dyndispatch2
Dynamic dispatch for generic interface requirements and `associatedtype`
Diffstat (limited to 'source/slang/slang-emit.cpp')
-rw-r--r--source/slang/slang-emit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp
index f2552f95d..59b059e91 100644
--- a/source/slang/slang-emit.cpp
+++ b/source/slang/slang-emit.cpp
@@ -280,7 +280,8 @@ Result linkAndOptimizeIR(
// For targets that supports dynamic dispatch, we need to lower the
// generics / interface types to ordinary functions and types using
// function pointers.
- lowerGenerics(irModule);
+ if (compileRequest->allowDynamicCode)
+ lowerGenerics(irModule);
break;
default:
break;