summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/Binary.cpp
diff options
context:
space:
mode:
authorEric Beckmann <ecbeckmann@google.com>2017-05-20 01:49:19 +0000
committerEric Beckmann <ecbeckmann@google.com>2017-05-20 01:49:19 +0000
commita6bdf751a2f995e531c4c59cf3b060dc2d3d05c3 (patch)
tree2645bdbb23876acc529c1d4820d0f2685caa67fd /llvm/lib/Object/Binary.cpp
parent4f3e3811d17a82873361dac206b8ca80c1acc886 (diff)
downloadbcm5719-llvm-a6bdf751a2f995e531c4c59cf3b060dc2d3d05c3.tar.gz
bcm5719-llvm-a6bdf751a2f995e531c4c59cf3b060dc2d3d05c3.zip
Add functionality to cvtres to parse all entries in res file.
Summary: Added the new modules in the Object/ folder. Updated the llvm-cvtres interface as well, and added additional tests. Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D33180 llvm-svn: 303480
Diffstat (limited to 'llvm/lib/Object/Binary.cpp')
-rw-r--r--llvm/lib/Object/Binary.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Object/Binary.cpp b/llvm/lib/Object/Binary.cpp
index 2b44c4a82d2..116af3c917b 100644
--- a/llvm/lib/Object/Binary.cpp
+++ b/llvm/lib/Object/Binary.cpp
@@ -17,6 +17,7 @@
#include "llvm/Object/Error.h"
#include "llvm/Object/MachOUniversal.h"
#include "llvm/Object/ObjectFile.h"
+#include "llvm/Object/WindowsResource.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ErrorOr.h"
@@ -71,9 +72,10 @@ Expected<std::unique_ptr<Binary>> object::createBinary(MemoryBufferRef Buffer,
return ObjectFile::createSymbolicFile(Buffer, Type, Context);
case sys::fs::file_magic::macho_universal_binary:
return MachOUniversalBinary::create(Buffer);
+ case sys::fs::file_magic::windows_resource:
+ return WindowsResource::createWindowsResource(Buffer);
case sys::fs::file_magic::unknown:
case sys::fs::file_magic::coff_cl_gl_object:
- case sys::fs::file_magic::windows_resource:
// Unrecognized object file format.
return errorCodeToError(object_error::invalid_file_type);
}
OpenPOWER on IntegriCloud