Simplify ErrorOr.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 5 Nov 2013 00:28:01 +0000 (00:28 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 5 Nov 2013 00:28:01 +0000 (00:28 +0000)
commitf94b3480fce38b376d02fb0775b9448bbda9313b
tree16b76d7c1b0f183069f60bf15857d671e0b95f23
parentc88eb08d02f0aa17352e06c4e235bc1f225b2266
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>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194030 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/ErrorOr.h
unittests/Support/ErrorOrTest.cpp