From 2a68573a3550faaad91c852c11a68c5f480a0aa6 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 15 Apr 2020 11:35:35 -0700 Subject: Enable finding bitcode in wasm objects This commit fixes using functions in `IRObjectFile` to load bitcode from wasm objects by recognizing the file magic for wasm and also inheriting the default implementation of classifying sections as bitcode. Patch By: alexcrichton Differential Revision: https://reviews.llvm.org/D78199 --- llvm/lib/Object/IRObjectFile.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Object/IRObjectFile.cpp') diff --git a/llvm/lib/Object/IRObjectFile.cpp b/llvm/lib/Object/IRObjectFile.cpp index 636f152..931e842 100644 --- a/llvm/lib/Object/IRObjectFile.cpp +++ b/llvm/lib/Object/IRObjectFile.cpp @@ -94,6 +94,7 @@ IRObjectFile::findBitcodeInMemBuffer(MemoryBufferRef Object) { return Object; case file_magic::elf_relocatable: case file_magic::macho_object: + case file_magic::wasm_object: case file_magic::coff_object: { Expected> ObjFile = ObjectFile::createObjectFile(Object, Type); -- cgit v1.1