Dsymutil gets library member information is through the ambiguous
/path/to/archive.a(member.o). The current logic we use would get
confused by additional parentheses. Using rfind mitigates this issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355114
91177308-0d34-0410-b5e6-
96231b3b80d8
static std::pair<StringRef, StringRef>
getArchiveAndObjectName(StringRef Filename) {
- StringRef Archive = Filename.substr(0, Filename.find('('));
+ StringRef Archive = Filename.substr(0, Filename.rfind('('));
StringRef Object = Filename.substr(Archive.size() + 1).drop_back();
return {Archive, Object};
}