mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-27 21:50:40 +00:00
Archive members cannot be larger than 4GB. Return a uint32_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185936 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
92f7386cae
commit
2012593f18
@ -33,7 +33,8 @@ struct ArchiveMemberHeader {
|
||||
/// Get the name without looking up long names.
|
||||
llvm::StringRef getName() const;
|
||||
|
||||
uint64_t getSize() const;
|
||||
/// Members are not larger than 4GB.
|
||||
uint32_t getSize() const;
|
||||
};
|
||||
|
||||
class Archive : public Binary {
|
||||
|
@ -54,11 +54,11 @@ StringRef ArchiveMemberHeader::getName() const {
|
||||
return llvm::StringRef(Name, end);
|
||||
}
|
||||
|
||||
uint64_t ArchiveMemberHeader::getSize() const {
|
||||
uint64_t ret;
|
||||
if (llvm::StringRef(Size, sizeof(Size)).rtrim(" ").getAsInteger(10, ret))
|
||||
llvm_unreachable("Size is not an integer.");
|
||||
return ret;
|
||||
uint32_t ArchiveMemberHeader::getSize() const {
|
||||
uint32_t Ret;
|
||||
if (llvm::StringRef(Size, sizeof(Size)).rtrim(" ").getAsInteger(10, Ret))
|
||||
llvm_unreachable("Size is not a decimal number.");
|
||||
return Ret;
|
||||
}
|
||||
|
||||
static const ArchiveMemberHeader *toHeader(const char *base) {
|
||||
|
Loading…
Reference in New Issue
Block a user