diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-08-03 12:43:55 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-08-03 12:56:35 -0400 |
| commit | ffab950e0cce8b1be2755e070d0684d817138f15 (patch) | |
| tree | 67b9e76445bdb6294d2a3c8c848635098737a47e /deps/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp | |
| parent | 63ebd9d12e48765514777418e12f55576ff63509 (diff) | |
| download | zig-ffab950e0cce8b1be2755e070d0684d817138f15.tar.gz zig-ffab950e0cce8b1be2755e070d0684d817138f15.zip | |
update embedded LLD to 9.0.0rc1
Diffstat (limited to 'deps/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp')
| -rw-r--r-- | deps/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/deps/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp b/deps/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp index fa0aaa103e..de5adb0887 100644 --- a/deps/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp +++ b/deps/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp @@ -1,9 +1,8 @@ //===- lib/ReaderWriter/MachO/CompactUnwindPass.cpp -------------*- C++ -*-===// // -// The LLVM Linker -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// @@ -388,12 +387,9 @@ private: // Gather the personality functions now, so that they're in deterministic // order (derived from the DefinedAtom order). - if (unwindEntry.personalityFunction) { - auto pFunc = std::find(personalities.begin(), personalities.end(), - unwindEntry.personalityFunction); - if (pFunc == personalities.end()) - personalities.push_back(unwindEntry.personalityFunction); - } + if (unwindEntry.personalityFunction && + !llvm::count(personalities, unwindEntry.personalityFunction)) + personalities.push_back(unwindEntry.personalityFunction); } } @@ -552,8 +548,7 @@ private: } } - auto personality = std::find(personalities.begin(), personalities.end(), - entry.personalityFunction); + auto personality = llvm::find(personalities, entry.personalityFunction); uint32_t personalityIdx = personality == personalities.end() ? 0 : personality - personalities.begin() + 1; |
