[PATCH] D11787: Port the error functions from ELF to COFF.

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Wed Aug 5 16:08:54 PDT 2015


rafael created this revision.
rafael added a reviewer: ruiu.
rafael added a subscriber: llvm-commits.
rafael set the repository for this revision to rL LLVM.

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).
* 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).


Repository:
  rL LLVM

http://reviews.llvm.org/D11787

Files:
  COFF/Driver.cpp
  COFF/Driver.h
  COFF/DriverUtils.cpp
  COFF/Error.h
  COFF/InputFiles.cpp
  COFF/InputFiles.h
  COFF/ModuleDef.cpp
  COFF/SymbolTable.cpp
  COFF/SymbolTable.h
  COFF/Symbols.cpp
  COFF/Symbols.h
  COFF/Writer.cpp
  COFF/Writer.h
  include/lld/Driver/Driver.h
  lib/Driver/UniversalDriver.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11787.31413.patch
Type: text/x-patch
Size: 73341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150805/f69bd0ed/attachment.bin>


More information about the llvm-commits mailing list