clang hello_world.c -S -emit-llvm -o hello_world.bc
llvm-dis hello_world.bc
I would like to generate human readable ll file using llvm-dis, but I received the erorr
llvm-dis: Invalid bitcode signature
With the -S
option, clang
already produces human-readable LLVM assembly. So your .bc file does not actually contain bitcode, which is why llvm-dis can't read it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With