OSDN Git Service

[dsymutil] Support more than 4 architectures
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 5 Jun 2019 17:14:32 +0000 (17:14 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 5 Jun 2019 17:14:32 +0000 (17:14 +0000)
commite2172b40a8a7412aa81bc811484266f8b827a6ce
treec8acfa29c722b0692d206ede73c5088eee2bf27e
parenta33b657dbdf1eb6c93dcc601580b083f45bce64f
[dsymutil] Support more than 4 architectures

When running dsymutil on a fat binary, we use temporary files in a small
vector of size four. When processing more than 4 architectures, this
resulted in a user-after-move, because the temporary files got moved to
the heap. Instead of storing an optional temp file, we now use a unique
pointer, so the location of the actual temp file doesn't change.

We could test this by checking in 5 binaries for 5 different
architectures, but this seems wasteful, especially since the number of
elements in the small vector is arbitrary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362621 91177308-0d34-0410-b5e6-96231b3b80d8
tools/dsymutil/MachOUtils.cpp
tools/dsymutil/MachOUtils.h