From fc149a69cf43009c8f174ef80af1cb396ffcca37 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 15 Oct 2013 22:45:38 +0000 Subject: 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 --- llvm/lib/Object/Binary.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Object/Binary.cpp') diff --git a/llvm/lib/Object/Binary.cpp b/llvm/lib/Object/Binary.cpp index fd9d3b4bd75..d0a70091444 100644 --- a/llvm/lib/Object/Binary.cpp +++ b/llvm/lib/Object/Binary.cpp @@ -100,7 +100,8 @@ error_code object::createBinary(MemoryBuffer *Source, return object_error::success; } case sys::fs::file_magic::unknown: - case sys::fs::file_magic::bitcode: { + case sys::fs::file_magic::bitcode: + case sys::fs::file_magic::windows_resource: { // Unrecognized object file format. return object_error::invalid_file_type; } -- cgit v1.2.3