I did a prototype ages ago, which is what the Enzyme capabilities are based off LibBC.jl/src/LibBC.jl at master · vchuravy/LibBC.jl · GitHub
The general gist is that yes once you compile with Clang and -fembed-bitcode the shared library will contain a bit code section that you can read and parse.
The big challenge here is that you need to match Clang and Julia (LLVM bit code is version dependent) and you need to correctly implement the expected semantics of C/C++ (global variables being uniques).
It is something that currently works for simple libraries, but for anything large and complex it would take significant amount of work and then additional work on the infrastructure (to get shared libraries with the right bitcode). Personally I see better C++ interoperability through something like ClangCompiler.jl as a more impactful improvement.