summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
authorkaizhangNV <149626564+kaizhangNV@users.noreply.github.com>2024-04-30 10:47:10 -0700
committerGitHub <noreply@github.com>2024-04-30 10:47:10 -0700
commit492f56e02fe9e9902eabefaa34f5b2fc9778dd47 (patch)
tree7bbef87fd9b0b117f01a1d34227bbd02f227f783 /source/slang/slang.cpp
parentf1221b80c3c5f59ed533147825ea414bef5e9df2 (diff)
Add option -disable-short-circuit (#4054)
Add option -disable-short-circuit to disable short circuit for logic operators && and ||. Also, disable the short circuit by default in the stdlib.
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 4a446a351..112ec2058 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -170,6 +170,7 @@ void Session::init()
// Built in linkage uses the built in builder
m_builtinLinkage = new Linkage(this, builtinAstBuilder, nullptr);
m_builtinLinkage->m_optionSet.set(CompilerOptionName::DebugInformation, DebugInfoLevel::None);
+ m_builtinLinkage->m_optionSet.set(CompilerOptionName::DisableShortCircuit, true);
// Because the `Session` retains the builtin `Linkage`,
// we need to make sure that the parent pointer inside