aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/TextAPI/InterfaceFile.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-01-11 18:29:01 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-04-06 20:13:39 +0000
commit297eecfb02bb25902531dbb5c3b9a88caf8adf29 (patch)
treef83ae8ea4aeae9e08a965b28d3355cb3e0475e07 /contrib/llvm-project/llvm/lib/TextAPI/InterfaceFile.cpp
parent1db9f3b21e39176dd5b67cf8ac378633b172463e (diff)
parent950076cd18f3fa9d789b4add9d405898efff09a5 (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/TextAPI/InterfaceFile.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/TextAPI/InterfaceFile.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/lib/TextAPI/InterfaceFile.cpp b/contrib/llvm-project/llvm/lib/TextAPI/InterfaceFile.cpp
index 3689ab919191..d712ed386825 100644
--- a/contrib/llvm-project/llvm/lib/TextAPI/InterfaceFile.cpp
+++ b/contrib/llvm-project/llvm/lib/TextAPI/InterfaceFile.cpp
@@ -24,17 +24,23 @@ void InterfaceFileRef::addTarget(const Target &Target) {
void InterfaceFile::addAllowableClient(StringRef InstallName,
const Target &Target) {
+ if (InstallName.empty())
+ return;
auto Client = addEntry(AllowableClients, InstallName);
Client->addTarget(Target);
}
void InterfaceFile::addReexportedLibrary(StringRef InstallName,
const Target &Target) {
+ if (InstallName.empty())
+ return;
auto Lib = addEntry(ReexportedLibraries, InstallName);
Lib->addTarget(Target);
}
void InterfaceFile::addParentUmbrella(const Target &Target_, StringRef Parent) {
+ if (Parent.empty())
+ return;
auto Iter = lower_bound(ParentUmbrellas, Target_,
[](const std::pair<Target, std::string> &LHS,
Target RHS) { return LHS.first < RHS; });
@@ -48,6 +54,8 @@ void InterfaceFile::addParentUmbrella(const Target &Target_, StringRef Parent) {
}
void InterfaceFile::addRPath(const Target &InputTarget, StringRef RPath) {
+ if (RPath.empty())
+ return;
using RPathEntryT = const std::pair<Target, std::string>;
RPathEntryT Entry(InputTarget, RPath);
auto Iter =