[PATCH] D87742: [IROutliner] Adding support for swift errors
Jon Roelofs via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 18 12:09:08 PDT 2020
jroelofs accepted this revision.
jroelofs added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:515-517
+ if (Group.SwiftErrorArgument.hasValue())
+ Call->addParamAttr(Group.SwiftErrorArgument.getValue(),
+ Attribute::SwiftError);
----------------
With Optionals, we usually avoid calling `hasValue()`/`getValue()` most of the time, and instead treat them as if they had pointer semantics. Subjectively, this increases readability.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87742/new/
https://reviews.llvm.org/D87742
More information about the llvm-commits
mailing list