aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ObjectFile.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-10-15 22:45:38 +0000
committerRui Ueyama <ruiu@google.com>2013-10-15 22:45:38 +0000
commitfc149a69cf43009c8f174ef80af1cb396ffcca37 (patch)
tree43e129880c13c9ec2e453e3e5b68ec972436d68a /llvm/lib/Object/ObjectFile.cpp
parentce451cc300307cba02963da455e354123637819f (diff)
downloadllvm-fc149a69cf43009c8f174ef80af1cb396ffcca37.zip
llvm-fc149a69cf43009c8f174ef80af1cb396ffcca37.tar.gz
llvm-fc149a69cf43009c8f174ef80af1cb396ffcca37.tar.bz2
Path: Recognize Windows compiled resource file.
Some background: One can pass compiled resource files (.res files) directly to the linker on Windows. If a resource file is given, the linker will run "cvtres" command in background to convert the resource file to a COFF file to link it. What I'm trying to do with this patch is to make the linker to recognize the resource file by file magic, so that it can run cvtres command. Differential Revision: http://llvm-reviews.chandlerc.com/D1943 llvm-svn: 192742
Diffstat (limited to 'llvm/lib/Object/ObjectFile.cpp')
-rw-r--r--llvm/lib/Object/ObjectFile.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp
index 1d1dafd..59395c6 100644
--- a/llvm/lib/Object/ObjectFile.cpp
+++ b/llvm/lib/Object/ObjectFile.cpp
@@ -49,6 +49,7 @@ ObjectFile *ObjectFile::createObjectFile(MemoryBuffer *Object) {
case sys::fs::file_magic::bitcode:
case sys::fs::file_magic::archive:
case sys::fs::file_magic::macho_universal_binary:
+ case sys::fs::file_magic::windows_resource:
delete Object;
return 0;
case sys::fs::file_magic::elf_relocatable: