llvm-6502/include
Rafael Espindola c86cf04650 Remove another unused, and IMHO, not very desirable feature of ErrorOr.
One of the uses of the IsValid flag is to support default constructing
a ErrorOr that is not a Error or a Value. There is not much value in
doing that IMHO. If ErrorOr was to have a default constructor, it
should be implemented by default constructing the value, but even that
looks unnecessary.

The other use is to avoid calling destructors on moved objects. This
looks wrong. If the data being moved has non trivial treatment of
moves (an std::vector for example), it is its destructor that should
handle it, not ~ErrorOr.

With this change ErrorOr becomes a fairly simple wrapper and should
always be better than using an error_code + value in an API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194109 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-05 23:41:57 +00:00
..
llvm Remove another unused, and IMHO, not very desirable feature of ErrorOr. 2013-11-05 23:41:57 +00:00
llvm-c [llvm-c] (PR16190) Add LLVMIsA* functions for ConstantDataSequential and subclasses 2013-11-05 12:55:37 +00:00