why I received the error "llvm-dis: Invalid bitcode signature"

Go To StackoverFlow.com

3

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

2015-04-16 11:06
by Adam Lee


6

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.

2015-04-16 12:46
by sepp2k
Ads