and tweak its use in llvm-objdump. Add back the test case for the -archive-headers option.
llvm-svn: 226332
}
/// \return the size of the archive member without the header or padding.
uint64_t getSize() const;
- /// \return the size of the archive member with the header and padding.
+ /// \return the size in the archive header for this member.
uint64_t getRawSize() const;
StringRef getBuffer() const {
}
uint64_t Archive::Child::getRawSize() const {
- return Data.size();
+ return getHeader()->getSize();
}
Archive::Child Archive::Child::getNext() const {
--- /dev/null
+RUN: llvm-objdump %p/Inputs/macho-universal-archive.x86_64.i386 -macho -archive-headers -arch all \
+RUN: | FileCheck %s
+
+# Note the date as printed by ctime(3) is time zone dependent and not checked.
+CHECK: Archive : {{.*}}/macho-universal-archive.x86_64.i386 (architecture x86_64)
+CHECK: -rw-r--r--124/11 44 {{.*}} __.SYMDEF SORTED
+CHECK: -rw-r--r--124/0 860 {{.*}} hello.o
+CHECK: Archive : {{.*}}/macho-universal-archive.x86_64.i386 (architecture i386)
+CHECK: -rw-r--r--124/11 60 {{.*}} __.SYMDEF SORTED
+CHECK: -rw-r--r--124/0 388 {{.*}} foo.o
outs() << format("%3d/", UID);
unsigned GID = C.getGID();
outs() << format("%-3d ", GID);
- uint64_t Size = C.getRawSize() - sizeof(object::ArchiveMemberHeader);
+ uint64_t Size = C.getRawSize();
outs() << format("%5d ", Size);
StringRef RawLastModified = C.getRawLastModified();