namespace lld {
-Reader::~Reader() {
-}
-
-
-YamlIOTaggedDocumentHandler::~YamlIOTaggedDocumentHandler() { }
-
+YamlIOTaggedDocumentHandler::~YamlIOTaggedDocumentHandler() {}
void Registry::add(std::unique_ptr<Reader> reader) {
_readers.push_back(std::move(reader));
StringRef extension = llvm::sys::path::extension(mb->getBufferIdentifier());
// Ask each registered reader if it can handle this file type or extension.
- for (const std::unique_ptr<Reader> &reader : _readers) {
+ for (const std::unique_ptr<Reader> &reader : _readers)
if (reader->canParse(fileType, extension, *mb))
return reader->parseFile(mb, *this, result);
- }
// No Reader could parse this file.
return llvm::make_error_code(llvm::errc::executable_format_error);
bool Registry::handleTaggedDoc(llvm::yaml::IO &io,
const lld::File *&file) const {
- for (const std::unique_ptr<YamlIOTaggedDocumentHandler> &h : _yamlHandlers) {
+ for (const std::unique_ptr<YamlIOTaggedDocumentHandler> &h : _yamlHandlers)
if (h->handledDocTag(io, file))
return true;
- }
return false;
}