diff options
| author | Cyndy Ishida <cyndy_ishida@apple.com> | 2025-03-18 22:12:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-18 22:12:45 -0700 |
| commit | 4e4e4a190fb7c74453994935c843b09cc682f4bb (patch) | |
| tree | 326dbe4f4ac8a6c70c09c1905a0a939b309c5e7e /llvm/lib/TextAPI/InterfaceFile.cpp | |
| parent | fa1228552fd85a8d989d7ac42afa270cc1e371ec (diff) | |
[TextAPI] Track RPaths in the order its provided via command line. (#131665)
RPaths are basically search paths for how to load dependent libraries.
The order they appear is the order the linker will search, we should
preserve that order in tbd files.
* Additionally add this level of detection to llvm-readtapi.
resolves: rdar://145603347
Diffstat (limited to 'llvm/lib/TextAPI/InterfaceFile.cpp')
| -rw-r--r-- | llvm/lib/TextAPI/InterfaceFile.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/TextAPI/InterfaceFile.cpp b/llvm/lib/TextAPI/InterfaceFile.cpp index ce2feb65c9ec..e2253723659e 100644 --- a/llvm/lib/TextAPI/InterfaceFile.cpp +++ b/llvm/lib/TextAPI/InterfaceFile.cpp @@ -59,14 +59,11 @@ void InterfaceFile::addRPath(StringRef RPath, const Target &InputTarget) { return; using RPathEntryT = const std::pair<Target, std::string>; RPathEntryT Entry(InputTarget, RPath); - auto Iter = - lower_bound(RPaths, Entry, - [](RPathEntryT &LHS, RPathEntryT &RHS) { return LHS < RHS; }); - if ((Iter != RPaths.end()) && (*Iter == Entry)) + if (is_contained(RPaths, Entry)) return; - RPaths.emplace(Iter, Entry); + RPaths.emplace_back(Entry); } void InterfaceFile::addTarget(const Target &Target) { |
