Recent commits (2098ad7f00324ee0f2a6538f418a6f81dfdd2edb and
15a9a72ee68166c0cff3f036cacd3c82be66c729) replaced usage of "o.value()"
on optionals with "*o". Those optional values are expected to be
present, but now, if they're not, compilation will proceed with
garbage data rather than crashing on an uncaught exception.
Add asserts for presence to restore the previous level of safety.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
flang/lib/Lower/ConvertExpr.cpp | ||
---|---|---|
3673 | lhsLoad.has_value() |
Comment Actions
Are asserts the right solution or do you need control flow to check whether optionals have a value?
lhsLoad.has_value()