From 492f56e02fe9e9902eabefaa34f5b2fc9778dd47 Mon Sep 17 00:00:00 2001 From: kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> Date: Tue, 30 Apr 2024 10:47:10 -0700 Subject: 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. --- source/slang/slang.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'source/slang/slang.cpp') 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 -- cgit v1.2.3