llvm.org GIT mirror llvm / eabc8ab
[Object] Define Archive::isEmpty(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282884 91177308-0d34-0410-b5e6-96231b3b80d8 Rui Ueyama 3 years ago
2 changed file(s) with 5 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
238238 // check if a symbol is in the archive
239239 Expected> findSym(StringRef name) const;
240240
241 bool isEmpty() const;
241242 bool hasSymbolTable() const;
242243 StringRef getSymbolTable() const { return SymbolTable; }
243244 StringRef getStringTable() const { return StringTable; }
751751
752752 Archive::child_iterator Archive::child_begin(Error &Err,
753753 bool SkipInternal) const {
754 if (Data.getBufferSize() == 8) // empty archive.
754 if (isEmpty())
755755 return child_end();
756756
757757 if (SkipInternal)
967967 return Optional();
968968 }
969969
970 // Returns true if archive file contains no member file.
971 bool Archive::isEmpty() const { return Data.getBufferSize() == 8; }
972
970973 bool Archive::hasSymbolTable() const { return !SymbolTable.empty(); }