mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-15 00:16:42 +00:00
[dsymutil] Use rfind for paths with parentheses
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
This commit is contained in:
parent
f71ec6c9f1
commit
abce0e8bf5
@ -21,7 +21,7 @@ namespace dsymutil {
|
||||
|
||||
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};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user