[lld] r193211 - [PECOFF] Resource file extension is .res, not .rc.
Rui Ueyama
ruiu at google.com
Tue Oct 22 16:58:38 PDT 2013
Author: ruiu
Date: Tue Oct 22 18:58:38 2013
New Revision: 193211
URL: http://llvm.org/viewvc/llvm-project?rev=193211&view=rev
Log:
[PECOFF] Resource file extension is .res, not .rc.
This patch won't change LLD's behavior because it's a temporary file and
LLD does not use the file extension to determine file type. But using the
correct file extension is a good thing.
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=193211&r1=193210&r2=193211&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp Tue Oct 22 18:58:38 2013
@@ -795,13 +795,13 @@ private:
ErrorOr<std::string>
writeResToTemporaryFile(std::unique_ptr<MemoryBuffer> mb) const {
- // Get a temporary file path for .rc file.
+ // Get a temporary file path for .res file.
SmallString<128> tempFilePath;
if (error_code ec = llvm::sys::fs::createTemporaryFile(
- "tmp", "rc", tempFilePath))
+ "tmp", "res", tempFilePath))
return ec;
- // Write the memory buffer contents to .rc file, so that we can run
+ // Write the memory buffer contents to .res file, so that we can run
// cvtres.exe on it.
OwningPtr<llvm::FileOutputBuffer> buffer;
if (error_code ec = llvm::FileOutputBuffer::create(
@@ -858,7 +858,7 @@ private:
return outFilePath.str().str();
}
- // Convert .rc file to .coff file and then parse it. Resource file is a file
+ // Convert .res file to .coff file and then parse it. Resource file is a file
// containing various types of data, such as icons, translation texts,
// etc. "cvtres.exe" command reads an RC file to create a COFF file which
// encapsulates resource data into rsrc$N sections, where N is an integer.
More information about the llvm-commits
mailing list