ELF error : Expected top level entity

I want some optimization passes on LLVM IR, which I got from Toy example , so I created one optimization pass and run the optimization pass using :

installed/bin/opt -load installed/lib/LLVMOurPass.so -OurPass -enable-new-pm=0 <toy.bc> /dev/null

but it showing the error:

installed/bin/opt: <stdin>:1:1: error: expected top-level entity

toy.bc has the following properties:

❯ file toy.bc
toy.bc: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, not stripped

Please help !!!

After some studies I found out that it is not bit code file what I was expecting , using llvm-as I have created correct bit code file & that is working fine.