// check if a symbol is in the archive
Expected<Optional<Child>> findSym(StringRef name) const;
- bool isEmpty() const;
+ virtual bool isEmpty() const;
bool hasSymbolTable() const;
StringRef getSymbolTable() const { return SymbolTable; }
StringRef getStringTable() const { return StringTable; }
BigArchive(MemoryBufferRef Source, Error &Err);
uint64_t getFirstChildOffset() const override { return FirstChildOffset; }
uint64_t getLastChildOffset() const { return LastChildOffset; }
+ bool isEmpty() const override {
+ return Data.getBufferSize() == sizeof(FixLenHdr);
+ };
};
} // end namespace object
# RUN: rm -rf %t && mkdir -p %t
## Display empty archive:
-# RUN: llvm-ar cr --format=gnu %t/empty.a
+# RUN: llvm-ar cr %t/empty.a
# RUN: llvm-ar tv %t/empty.a 2>&1 | count 0
## Display empty thin archive:
# Deleting will fail with P because the members exist as foo.txt, not a/foo.txt.
RUN: rm -f del1.a
-RUN: llvm-ar rcS --format=gnu del1.a foo.txt
+RUN: llvm-ar rcS del1.a foo.txt
RUN: llvm-ar dP del1.a a/foo.txt
RUN: llvm-ar t del1.a a/foo.txt | FileCheck %s --check-prefix=DISPLAY-FOUND --match-full-lines
RUN: llvm-ar d del1.a a/foo.txt
-# XFAIL: system-aix
## Test quick append
# RUN: rm -rf %t && mkdir -p %t
# RUN: llvm-as %p/Inputs/armv7-ios.ll -o %t-ir-armv7.o
# RUN: llvm-as %p/Inputs/x64-osx.ll -o %t-ir-x86_64.o
-# RUN: llvm-ar cr --format=gnu %t.empty.a
+# RUN: llvm-ar cr %t.empty.a
# RUN: not llvm-lipo %t.empty.a -create -output /dev/null 2>&1 | FileCheck --check-prefix=EMPTY-ARCHIVE %s
# RUN: llvm-ar cr %t.different_architectures.a %t-i386.o %t-x86_64.o
## Case 1: Empty archive. No output expected.
# RUN: rm -f %t1.a
-# RUN: llvm-ar rc --format=gnu %t1.a
+# RUN: llvm-ar rc %t1.a
# RUN: llvm-size -B %t1.a | count 0
# RUN: llvm-size -A %t1.a | count 0