using namespace llvm;
using namespace object;
-static const char *Magic = "!<arch>\n";
+static const char *const Magic = "!<arch>\n";
void Archive::anchor() { }
}
Archive::symbol_iterator Archive::begin_symbols() const {
- if (SymbolTable == end_children())
+ if (!hasSymbolTable())
return symbol_iterator(Symbol(this, 0, 0));
const char *buf = SymbolTable->getBuffer().begin();
}
Archive::symbol_iterator Archive::end_symbols() const {
- if (SymbolTable == end_children())
+ if (!hasSymbolTable())
return symbol_iterator(Symbol(this, 0, 0));
const char *buf = SymbolTable->getBuffer().begin();
}
return end_children();
}
+
+bool Archive::hasSymbolTable() const {
+ return SymbolTable != end_children();
+}