summaryrefslogtreecommitdiff
path: root/lib/Linker
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/LinkModules.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index dd0b07e09b..c710d7ee86 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -1301,10 +1301,9 @@ Linker::LinkModules(Module *Dest, Module *Src, std::string *ErrorMsg) {
// If the source library's module id is in the dependent library list of the
// destination library, remove it since that module is now linked in.
- sys::Path modId;
- modId.set(Src->getModuleIdentifier());
- if (!modId.isEmpty())
- Dest->removeLibrary(modId.getBasename());
+ const std::string &modId = Src->getModuleIdentifier();
+ if (!modId.empty())
+ Dest->removeLibrary(sys::path::stem(modId));
return false;
}