hanchenye-llvm-project/llvm/tools
Rafael Espindola 5c4f829424 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++.

llvm-svn: 210687
2014-06-11 19:05:50 +00:00
..
bugpoint [C++] Use 'nullptr'. 2014-04-28 04:05:08 +00:00
bugpoint-passes [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
gold Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llc Move MCOptions that aren't shared between programs into their specific 2014-05-21 21:05:09 +00:00
lli PR19553: Memory leak in RuntimeDyldELF::createObjectImageFromFile 2014-04-29 21:52:46 +00:00
llvm-ar Use std::error_code instead of llvm::error_code. 2014-06-11 19:05:50 +00:00
llvm-as raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
llvm-bcanalyzer [C++] Use 'nullptr'. Tools edition. 2014-04-25 04:24:47 +00:00
llvm-c-test Convert getFileOffset to getOffset and move it to its only user. 2014-04-21 13:45:32 +00:00
llvm-config Change llvm-config --ldflags to report ${CMAKE_CXX_LINK_FLAGS} 2014-04-25 01:44:20 +00:00
llvm-cov Use std::error_code instead of llvm::error_code. 2014-06-11 19:05:50 +00:00
llvm-diff [C++] Use 'nullptr'. 2014-04-28 04:05:08 +00:00
llvm-dis raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
llvm-dwarfdump Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that. 2014-05-19 18:45:32 +00:00
llvm-extract Use range loops. 2014-05-08 19:30:17 +00:00
llvm-jitlistener Support: split object format out of environment 2014-03-06 20:47:11 +00:00
llvm-link raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
llvm-lto raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
llvm-mc Move MCOptions that aren't shared between programs into their specific 2014-05-21 21:05:09 +00:00
llvm-mcmarkup Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-nm Add "-format darwin" to llvm-nm to be like darwin's nm(1) -m output. 2014-06-05 21:21:57 +00:00
llvm-objdump Use std::error_code instead of llvm::error_code. 2014-06-11 19:05:50 +00:00
llvm-profdata raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
llvm-readobj Use std::error_code instead of llvm::error_code. 2014-06-11 19:05:50 +00:00
llvm-rtdyld [tools][llvm-rtdyld] Add a '-dylib <file>' option to llvm-rtdyld to load shared 2014-05-13 22:37:41 +00:00
llvm-shlib autoconf: Fix soname for libLLVM-Major.Minor.so (2nd try) 2014-05-13 19:37:03 +00:00
llvm-size [C++] Use 'nullptr'. Tools edition. 2014-04-25 04:24:47 +00:00
llvm-stress raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
llvm-symbolizer Use std::error_code instead of llvm::error_code. 2014-06-11 19:05:50 +00:00
lto Fix gcc -pedantic warning in lto.cpp. 2014-05-05 12:24:08 +00:00
macho-dump Darwin: Add assembler directives to create version-min load commands. 2014-03-18 22:09:05 +00:00
msbuild VS integration installer: set SUCCESS=1 if we find VS 2013 2014-03-24 17:33:22 +00:00
obj2yaml Use std::error_code instead of llvm::error_code. 2014-06-11 19:05:50 +00:00
opt raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
yaml2obj [yaml2obj][obj2yaml] Support ELF symbol's visibility flags (default/hidden/protected). 2014-06-06 07:41:57 +00:00
CMakeLists.txt static link polly into tools 2014-03-14 04:04:14 +00:00
LLVMBuild.txt PGO: llvm-profdata: tool for merging profiles 2014-02-17 23:22:49 +00:00
Makefile lld (build with configur and make) Enable build 2014-06-05 08:49:55 +00:00