[lld] r191583 - Add a comment to ReaderCOFF::parseFile.

Rui Ueyama ruiu at google.com
Fri Sep 27 15:55:25 PDT 2013


Author: ruiu
Date: Fri Sep 27 17:55:25 2013
New Revision: 191583

URL: http://llvm.org/viewvc/llvm-project?rev=191583&view=rev
Log:
Add a comment to ReaderCOFF::parseFile.

Modified:
    lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp

Modified: lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp?rev=191583&r1=191582&r2=191583&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp Fri Sep 27 17:55:25 2013
@@ -729,6 +729,10 @@ public:
                        std::vector<std::unique_ptr<File> > &result) const {
     StringRef magic(input.getBuffer().getBufferStart(),
                     input.getBuffer().getBufferSize());
+    // The input file should be an archive file, a regular COFF file, or an an
+    // import library member file. Try to parse in that order. If the input file
+    // does not start with a known magic, parseCOFFImportLibrary will return an
+    // error object.
     llvm::sys::fs::file_magic fileType = llvm::sys::fs::identify_magic(magic);
     if (fileType == llvm::sys::fs::file_magic::archive)
       return _readerArchive.parseFile(input, result);





More information about the llvm-commits mailing list