[PATCH] D28544: Remove all DWARFDie::getAttributeAsXXX() calls that returned default values and use new llvm::OptionalDefault template instead.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 17:58:56 PST 2017


Ah, here we go: http://en.cppreference.com/w/cpp/utility/optional/value_or

On Tue, Jan 10, 2017, 5:57 PM David Blaikie <dblaikie at gmail.com> wrote:

> Probably worth doing the optional functionality separately. It could use a
> unit test and maybe a more suitable name (a verby name). GetOrDefault for
> example.
>
> On Tue, Jan 10, 2017, 5:50 PM Greg Clayton via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
> clayborg created this revision.
> clayborg added reviewers: dblaikie, aprantl, probinson, llvm-commits.
> Herald added a subscriber: jgosnell.
>
> This removes many APIs and provides a generic way to get the result of a
> function that is an Optional<T> and get a default value for T that is
> specified if the optional doesn't have a value.
>
>
> https://reviews.llvm.org/D28544
>
> Files:
>   include/llvm/ADT/Optional.h
>   include/llvm/DebugInfo/DWARF/DWARFDie.h
>   lib/DebugInfo/DWARF/DWARFDie.cpp
>   lib/DebugInfo/DWARF/DWARFUnit.cpp
>   tools/dsymutil/DwarfLinker.cpp
>   unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170111/d749c142/attachment.html>


More information about the llvm-commits mailing list