diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2024-01-11 18:24:21 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-01-11 18:24:21 +0000 |
| commit | 950076cd18f3fa9d789b4add9d405898efff09a5 (patch) | |
| tree | 2454649366290c6292cc2d94dde042f71bc1e144 /llvm/lib/TextAPI/InterfaceFile.cpp | |
| parent | aca2e42c67292825f835f094eb0c4df5ce6013db (diff) | |
Diffstat (limited to 'llvm/lib/TextAPI/InterfaceFile.cpp')
| -rw-r--r-- | llvm/lib/TextAPI/InterfaceFile.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/TextAPI/InterfaceFile.cpp b/llvm/lib/TextAPI/InterfaceFile.cpp index 3689ab919191..d712ed386825 100644 --- a/llvm/lib/TextAPI/InterfaceFile.cpp +++ b/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 = |
