This is an archive of the discontinued LLVM Phabricator instance.

mlir/DialectConversion: use std::optional (NFC)
ClosedPublic

Authored by artagnon on Dec 19 2022, 6:32 AM.

Details

Summary

This is part of an effort to migrate from llvm::Optional to
std::optional. This patch touches DialectConversion, and modifies
existing conversions and tests appropriately.

See also: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

Signed-off-by: Ramkumar Ramachandra <r@artagnon.com>

Diff Detail

Event Timeline

artagnon created this revision.Dec 19 2022, 6:32 AM
Herald added a reviewer: aartbik. · View Herald Transcript
Herald added a reviewer: ftynse. · View Herald Transcript
Herald added a reviewer: aartbik. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
artagnon requested review of this revision.Dec 19 2022, 6:32 AM
artagnon updated this revision to Diff 483976.Dec 19 2022, 8:48 AM

Attempt to fix flang build.

Herald added a project: Restricted Project. · View Herald TranscriptDec 19 2022, 8:48 AM
rriddle accepted this revision.Dec 19 2022, 9:44 AM
rriddle added inline comments.
mlir/include/mlir/Transforms/DialectConversion.h
104–105
This revision is now accepted and ready to land.Dec 19 2022, 9:44 AM
This revision was automatically updated to reflect the committed changes.
artagnon marked an inline comment as done.