LibDriver: Fix output path inference.
authorPeter Collingbourne <peter@pcc.me.uk>
Wed, 8 Jul 2015 19:00:46 +0000 (19:00 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 8 Jul 2015 19:00:46 +0000 (19:00 +0000)
commitc783eb28f7fad485b55da6b8f98fb1807b441b7f
treed6b99440cf308bc4fcd9884e5634bfba0eb44f83
parentb089d62c9a855e8d3e17c603e35aa89ec1a3b62f
LibDriver: Fix output path inference.

The inferred output file name is based on the first input file, not the
first one with extension .obj. The output file was also being written to
the wrong directory; it needs to be written to whichever directory on the
libpath it was found in. This change fixes both issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241710 91177308-0d34-0410-b5e6-96231b3b80d8
lib/LibDriver/LibDriver.cpp
test/LibDriver/infer-output-path.test [new file with mode: 0644]