Commit Graph

5 Commits

Author SHA1 Message Date
Rafael Espindola beee25e484 Make these headers as being c++.
llvm-svn: 245050
2015-08-14 14:12:54 +00:00
Rafael Espindola b835ae8e4a Port the error functions from ELF to COFF.
This has a few advantages

* Less C++ code (about 300 lines less).
* Less machine code (about 14 KB of text on a linux x86_64 build).
* It is more debugger friendly. Just set a breakpoint on the exit function and
  you get the complete lld stack trace of when the error was found.
* It is a more robust API. The errors are handled early and we don't get a
  std::error_code hot potato being passed around.
* In most cases the error function in a better position to print diagnostics
  (it has more context).

llvm-svn: 244215
2015-08-06 14:58:50 +00:00
Denis Protivensky 1c43df7481 COFF: Better noexcept specification with LLVM_NOEXCEPT
This is a follow-on to r238732

llvm-svn: 238733
2015-06-01 09:08:11 +00:00
Denis Protivensky c44223ed96 COFF: Add noexcept to std::error_category::name
This fixes build error with gcc.

llvm-svn: 238732
2015-06-01 08:12:44 +00:00
Rui Ueyama 8fd9fb9857 COFF: Define an error category for the linker.
Instead of returning non-categorized errors, return categorized errors.
All uses of make_dynamic_error_code are removed.

Because we don't have error reporting mechanism, I just chose to print out
error messages to stderr, and then return an error object. Not sure if
that's the right thing to do, but at least it seems practical.

http://reviews.llvm.org/D10129

llvm-svn: 238714
2015-06-01 02:58:15 +00:00