llvm/unittests/Support
Rafael Espindola 7acd886ecf Use std::error_code instead of llvm::error_code.
The idea of this patch is to turn llvm/Support/system_error.h into a
transitional header that just brings in the erorr_code api to the llvm
namespace. I will remove it shortly afterwards.

The cases where the general idea needed some tweaking:

* std::errc is a namespace in msvc, so we cannot use "using std::errc". I could
add an #ifdef, but there were not that many uses, so I just added std:: to
them in this patch.

* Template specialization had to be moved to the std namespace in this
patch set already.

* The msvc implementation of default_error_condition doesn't seem to
provide the same transformations as we need. Not too surprising since
the standard doesn't actually say what "equivalent" means. I fixed the
problem by keeping our old mapping and using it at error_code
construction time.

Despite these shortcomings I think this is still a good thing. Some reasons:

* The different implementations of system_error might improve over time.
* It removes 925 lines of code from llvm already.
* It removes 6313 bytes from the text segment of the clang binary when
it is built with gcc and 2816 bytes when building with clang and
libstdc++.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210687 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-11 19:05:50 +00:00
..
AlignOfTest.cpp [AlignOf] Add AlignedCharArray and refactor AlignedCharArrayUnion. 2012-12-31 19:54:45 +00:00
AllocatorTest.cpp [Allocator] Make BumpPtrAllocator movable and move assignable. 2014-04-16 10:48:27 +00:00
ArrayRecyclerTest.cpp Rename the unittest from ArrayRecylerTest.cpp to ArrayRecyclerTest.cpp. 2013-01-05 02:08:43 +00:00
BlockFrequencyTest.cpp Support: More BlockFrequencyTest => BranchProbabilityTest 2014-04-29 16:44:59 +00:00
BranchProbabilityTest.cpp SupportTest: Fix test names harder 2014-04-29 17:07:45 +00:00
Casting.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
CMakeLists.txt Support: Add unit tests for BranchProbability 2014-04-29 16:12:13 +00:00
CommandLineTest.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
CompressionTest.cpp Simplify compression API by compressing into a SmallVector rather than a MemoryBuffer 2014-04-05 21:53:04 +00:00
ConvertUTFTest.cpp [Support] Add a Unicode conversion wrapper from UTF16 to UTF8 2013-07-16 17:14:33 +00:00
DataExtractorTest.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
EndianTest.cpp [Support][Endian] Add support for specifying the alignment and native unaligned types. 2013-01-02 20:14:11 +00:00
ErrorOrTest.cpp Use std::error_code instead of llvm::error_code. 2014-06-11 19:05:50 +00:00
FileOutputBufferTest.cpp Use std::unique_ptr instead of OwningPtr in the MemoryBuffer unittests. 2014-05-18 21:01:46 +00:00
formatted_raw_ostream_test.cpp Sort the #include lines for unittest/... 2012-12-04 10:23:08 +00:00
IteratorTest.cpp [ADT] Generalize pointee_iterator to smart pointers by using decltype. 2014-04-24 21:10:35 +00:00
LEB128Test.cpp Move get[S|U]LEB128Size() to LEB128.h. 2014-02-22 14:00:39 +00:00
LineIteratorTest.cpp Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
LockFileManagerTest.cpp Fix these tests on windows. 2014-03-25 13:19:03 +00:00
Makefile Update incorrect file headers. 2013-08-01 18:42:28 +00:00
ManagedStatic.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
MathExtrasTest.cpp [Support] Remove Count{Leading,Trailing}Zeros_{32,64}. 2013-05-24 22:58:37 +00:00
MD5Test.cpp Add support for adding the contents of a StringRef to the MD5 hash. 2013-05-31 22:34:56 +00:00
MemoryBufferTest.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
MemoryTest.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
Path.cpp Use std::error_code instead of llvm::error_code. 2014-06-11 19:05:50 +00:00
ProcessTest.cpp Silence a warning: 2014-02-04 22:53:45 +00:00
ProgramTest.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
raw_ostream_test.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
RegexTest.cpp [C++11] Remove uses of LLVM_HAS_RVALUE_REFERENCES from the unittests. 2014-03-01 09:36:06 +00:00
SourceMgrTest.cpp SourceMgr diagnotics printing: fix a bug where printing a fixit for a source 2013-09-27 21:24:36 +00:00
SwapByteOrderTest.cpp Fix known typos 2014-01-24 17:20:08 +00:00
ThreadLocalTest.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
TimeValueTest.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
UnicodeTest.cpp Move generic isPrint and columnWidth implementations to a separate header/source to allow using both generic and system-dependent versions on win32. 2013-09-04 16:00:12 +00:00
YAMLIOTest.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
YAMLParserTest.cpp Allow using MemoryBuffers with yaml::Stream directly. 2012-11-19 23:21:47 +00:00