[LLVMdev] Generating incorrect bitcode file
nicholas at mxc.ca
Thu Apr 15 23:17:50 PDT 2010
Pranav Garg wrote:
> I am generating the .bc file using the following command
> $ llvm-gcc -emit-llvm -S -o pointer.bc ../../../test/pointer.c
> But when I run any pass using opt it gives the following error :
> $ ./opt -basicaa pointer.bc
> ./opt: Bitcode stream should be a multiple of 4 bytes in length
> Is there something wrong with the way I generate the .bc file ?
Based on those flags you should have a text file. Pass -c instead of -S,
or use llvm-as to turn your file (which is actually better named
pointer.bc) into a .bc file.
More information about the llvm-dev