1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

10 Commits

Author SHA1 Message Date
Rafael Espindola
334fa3d8a8 Simplify ErrorOr.
ErrorOr had quiet a bit of complexity and indirection to be able to hold a user
type with the error.

That feature is not used anymore. This patch removes it, it will live in svn
history if we ever need it again.

If we do need it again, IMHO there is one thing that should be done
differently: Holding extra info in the error is not a property a function also
returning a value or not. The ability to hold extra info should be in the error
type and ErrorOr templated over it so that we don't need the funny looking
ErrorOr<void>.

llvm-svn: 194030
2013-11-05 00:28:01 +00:00
Michael J. Spencer
55347a0780 [Support][ErrorOr] Add support for implicit conversion from error code/condition enums.
llvm-svn: 176228
2013-02-28 01:44:26 +00:00
Michael J. Spencer
c795dd0ca7 [Support][ErrorOr] Add support for convertable types.
Thanks to Andrew, David, and Aaron for helping fix this.

llvm-svn: 174552
2013-02-06 22:28:53 +00:00
Andrew Trick
2e729a5aff Revert "[Support][ErrorOr] Add support for convertable types."
This reverts commit a33e1fafac7fedb1b080ef07ddf9ad6ddff3a830.

This unit test crashes on Darwon. It needs to be temporarily reverted
to unblock the test infrastructure.

llvm-svn: 174458
2013-02-05 22:50:20 +00:00
Michael J. Spencer
2da5c2c32d [Support][ErrorOr] Add support for convertable types.
llvm-svn: 174357
2013-02-05 08:22:27 +00:00
Michael J. Spencer
a34e71c387 [Support][ErrorOr] Add optimized specialization of ErrorOr<void>.
ErrorOr<void> represents an operation that returns nothing, but can still fail.
It should be used in cases where you need the aditional user data that ErrorOr
provides over error_code.

llvm-svn: 173209
2013-01-23 00:18:31 +00:00
NAKAMURA Takumi
65a1d5e982 ErrorOrTest.cpp: Check existence of EXPECT_DEBUG_DEATH. It is not always available.
llvm-svn: 173123
2013-01-22 04:02:41 +00:00
Michael J. Spencer
cfd7b9e015 [Support] Make test C++03.
llvm-svn: 173004
2013-01-21 05:39:07 +00:00
Benjamin Kramer
804fa9cc43 Disable test that fails due to lack of std::true_type in C++03.
Michael, can this test be ported to C++03?

llvm-svn: 172996
2013-01-20 21:52:27 +00:00
Michael J. Spencer
74395cc7b4 [Support] Port ErrorOr<T> from lld to C++03.
llvm-svn: 172991
2013-01-20 20:32:30 +00:00