[PATCH] D87596: [Coroutines] Reuse storage for local variables with non-overlapping lifetimes
Chuanqi Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 23:07:32 PDT 2020
ChuanqiXu added inline comments.
================
Comment at: llvm/lib/Passes/PassBuilder.cpp:1710-1715
int OptLevel = StringSwitch<int>(ParamName)
.Case("O0", 0)
.Case("O1", 1)
.Case("O2", 2)
.Case("O3", 3)
.Default(-1);
----------------
lxfind wrote:
> I think you can use the same code like this, which appears to be simpler.
I am wondering how should I handle unknown ParamName in this style. Should I just skip it? Or should I return an error? which implies that we should add a new static member to `PassBuilder::OptimizationLevel` as `PassBuilder::OptimizationLevel::Unknown`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87596/new/
https://reviews.llvm.org/D87596
More information about the llvm-commits
mailing list