From c3ceeb6fa751e82de1aff19ff0cf812fc94237cb Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 29 Jan 2014 00:02:26 +0000 Subject: Make createObjectFile's signature a bit less error prone. This will be better with c++11, but right now file_magic converts to bool, which makes the api really easy to misuse. llvm-svn: 200357 --- llvm/lib/Object/Binary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Object/Binary.cpp') diff --git a/llvm/lib/Object/Binary.cpp b/llvm/lib/Object/Binary.cpp index a2f4ec9..63898d2 100644 --- a/llvm/lib/Object/Binary.cpp +++ b/llvm/lib/Object/Binary.cpp @@ -67,7 +67,7 @@ ErrorOr object::createBinary(MemoryBuffer *Source, case sys::fs::file_magic::coff_object: case sys::fs::file_magic::coff_import_library: case sys::fs::file_magic::pecoff_executable: - return ObjectFile::createObjectFile(scopedSource.take(), Type); + return ObjectFile::createObjectFile(scopedSource.take(), true, Type); case sys::fs::file_magic::macho_universal_binary: return MachOUniversalBinary::create(scopedSource.take()); case sys::fs::file_magic::unknown: -- cgit v1.1