[lld] r185657 - Don't pass llvm::errs() all over the place. Diagnostics always go to stderr.

Nick Kledzik kledzik at apple.com
Fri Jul 5 17:47:11 PDT 2013


On Jul 5, 2013, at 3:48 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:

>> There are unittests in lld that run invoke the Drivers with raw_string_ostreams and parse the string to check that the correct error was generated.  This change breaks those tests.
>> 
>> I just recently noticed that those unittests are not being built and run as part of the lld-test target.  I’m still trying to figure out why.
> 
> OK, if we need these tests, then we should revert this, but may I ask
> what is wrong with with pipes + FileCheck? That is how we test every
> error other than clang's -verify support.
These tests are not testing bad input files causing errors.  

These are unit tests of the command line driver classes.  A driver parses command line options and uses that to initialize a struct that describes the linking to be done.  These tests pass various argv[] arrays to a driver and then verify the fields of the struct are set as expected.  The diagnostics is just an edge case when some bad set of argv[] options are passed to the driver.

-Nick







More information about the llvm-commits mailing list