[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)
commit3027a2999c32d4cdedf9b639b61fc4653f1bba4b
tree9a51a70b4374f921b7a7439708b88fa351e486f8
parent2bf82879bde8565c882c315b815784c6c5f64152
[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.

llvm-svn: 362621
llvm/tools/dsymutil/MachOUtils.cpp
llvm/tools/dsymutil/MachOUtils.h