diff options
author | Rui Ueyama <ruiu@google.com> | 2013-09-27 22:55:25 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2013-09-27 22:55:25 +0000 |
commit | e9d2396c88dfb7f6c27f9196e1ddcc4d9b57c4cb (patch) | |
tree | a59e551ed760742aac4824381ae6ea1555e92706 | |
parent | a51d3fc721a6d0482e22e311b645e771d6ef19b0 (diff) | |
download | bcm5719-llvm-e9d2396c88dfb7f6c27f9196e1ddcc4d9b57c4cb.tar.gz bcm5719-llvm-e9d2396c88dfb7f6c27f9196e1ddcc4d9b57c4cb.zip |
Add a comment to ReaderCOFF::parseFile.
llvm-svn: 191583
-rw-r--r-- | lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp index 453c51f1f26..4679dd862b9 100644 --- a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp +++ b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp @@ -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); |