llvm.org GIT mirror llvm / bf82b07
[Object][Archive] Apparently StringRef::getAsInteger for APInt accepts spaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172022 91177308-0d34-0410-b5e6-96231b3b80d8 Michael J. Spencer 6 years ago
1 changed file(s) with 6 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
4848
4949 uint64_t getSize() const {
5050 uint64_t ret;
51 StringRef(Size, sizeof(Size)).getAsInteger(10, ret);
51 StringRef(Size, sizeof(Size)).rtrim(" ").getAsInteger(10, ret);
5252 return ret;
5353 }
5454 };
109109 }
110110 // It's a long name.
111111 // Get the offset.
112 uint64_t offset;
112 std::size_t offset;
113113 name.substr(1).getAsInteger(10, offset);
114114 const char *addr = Parent->StringTable->Data.begin()
115115 + sizeof(ArchiveMemberHeader)
217217 SymbolTable = i;
218218 StringTable = e;
219219 if (i != e) ++i;
220 if (i == e) {
221 ec = object_error::parse_failed;
222 return;
223 }
220224 if ((ec = i->getName(name)))
221225 return;
222226 if (name[0] != '/') {