Factor duplicated yamlReader creation.
The yaml reader is not specific to any file format. This patch moves
it to TargetInfo and makes validate a non virtual interface so that it
can be constructed from a single location.
The same method will be used to create a reader for llvm bitcode
files.
llvm-svn: 183740
diff --git a/lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp b/lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp
index e4bdf5a..5661615 100644
--- a/lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp
+++ b/lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp
@@ -22,7 +22,7 @@
   return _reader->parseFile(mb, result);
 }
 
-bool PECOFFTargetInfo::validate(raw_ostream &diagnostics) {
+bool PECOFFTargetInfo::validateImpl(raw_ostream &diagnostics) {
   if (_stackReserve < _stackCommit) {
     diagnostics << "Invalid stack size: reserve size must be equal to or "
                 << "greater than commit size, but got "