Enable finding bitcode in wasm objects
authorSam Clegg <sbc@chromium.org>
Wed, 15 Apr 2020 18:35:35 +0000 (11:35 -0700)
committerSam Clegg <sbc@chromium.org>
Wed, 15 Apr 2020 19:33:33 +0000 (12:33 -0700)
commit2a68573a3550faaad91c852c11a68c5f480a0aa6
tree06fbc734643f9dcb8e297597e6ebba15238cf0a2
parent5f87415efc1e57587272944a5f9b6745e4474660
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/include/llvm/Object/Wasm.h
llvm/lib/Object/IRObjectFile.cpp
llvm/lib/Object/WasmObjectFile.cpp