Skip to content

Commit 02ec0cd

Browse files
committed
[SILOpt] Added experimental lexical lifetimes flag.
Previously, there was only a frontend flag to influence the LangOpts struct. Now, the flag can be set when running sil-opt which is important for testing.
1 parent b654bf0 commit 02ec0cd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/sil-opt/SILOpt.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ static llvm::cl::opt<bool>
104104
EnableExperimentalConcurrency("enable-experimental-concurrency",
105105
llvm::cl::desc("Enable experimental concurrency model."));
106106

107+
static llvm::cl::opt<bool> EnableExperimentalLexicalLifetimes(
108+
"enable-experimental-lexical-lifetimes",
109+
llvm::cl::desc("Enable experimental lexical lifetimes."));
110+
107111
static llvm::cl::opt<bool>
108112
EnableExperimentalDistributed("enable-experimental-distributed",
109113
llvm::cl::desc("Enable experimental distributed actors."));
@@ -420,6 +424,8 @@ int main(int argc, char **argv) {
420424
EnableExperimentalConcurrency;
421425
Invocation.getLangOptions().EnableExperimentalDistributed =
422426
EnableExperimentalDistributed;
427+
Invocation.getLangOptions().EnableExperimentalLexicalLifetimes =
428+
EnableExperimentalLexicalLifetimes;
423429

424430
Invocation.getLangOptions().EnableObjCInterop =
425431
EnableObjCInterop ? true :

0 commit comments

Comments
 (0)