On LLVM 15, you need to explicit call setOpaquePointers(true) on LLVMContext if you want to force-enable opaque pointers even when the input bitcode uses typed pointers. For example, this may be necessary if you are trying to mix typed and opaque bitcode files. If you are using only typed bitcode files or only opaque bitcode files, it should work without that.
On LLVM 16, typed bitcode is upgraded to opaque pointers by default.