OSDN Git Service

[Support/TarWriter] - Don't allow TarWriter to add the same file more than once.
authorGeorge Rimar <grimar@accesssoftek.com>
Tue, 5 Dec 2017 10:09:59 +0000 (10:09 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Tue, 5 Dec 2017 10:09:59 +0000 (10:09 +0000)
commitfa8338cb07e267f6fd9c0b3045d46874dd2ad780
treef124beab811c3d979b5de9e08b5854f24931f653
parent3b3a7b4e281a145392be9952698b593dd5359ab1
[Support/TarWriter] - Don't allow TarWriter to add the same file more than once.

This is for PR35460.

Currently when LLD adds files to TarWriter it may pass the same file
multiple times. For example it happens for clang reproduce file which specifies
archive (.a) files more than once in command line.
Patch makes TarWriter to ignore files with the same path, so it will
add only the first one to archive.

Differential revision: https://reviews.llvm.org/D40606

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319750 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/TarWriter.h
lib/Support/TarWriter.cpp
unittests/Support/TarWriterTest.cpp