Expected top level entity, ELF error

Hello dev!

I am trying to run my llvm pass and I get the following strange error.

I suspect that the ‘top level entity’ usually means the bitcode is somehow incompatible. However, the ELF portion of the error is rather confusing.

Any thoughts or advice on this would be greatly appreciated.

Seems like you tried to run your pass on a compiled object file. Can you show us what steps you have done to run your pass?