[LLVMdev] bug

Chris Lattner clattner at apple.com
Mon Jan 4 23:19:26 PST 2010


On Jan 4, 2010, at 10:34 PM, sparkle wrote:

> 
> [spark at oxygen llvm]$ llvmc -clang ~/a.c 
> /home2/yjhuang/tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.2/../../../../x86_64-unknown-linux-gnu/bin/ld:
> warning: cannot find entry symbol mit-llvm-bc; defaulting to
> 00000000004003c0

Please use the clang driver directly, llvmc's clang support is experimental.

-Chris

> llc: bitcode didn't read correctly.
> Reason: Bitcode stream should be a multiple of 4 bytes in length
> 出现error,加-v选项,发现是clang -x c -emit-llvm-bc /home2/spark/a.c -o
> /tmp/llvm_HKq01o/a.bc 时出现warning,单独执行这一步,生成.bc文件,再用lli执行就出现了error。
> [spark at oxygen llvm]$ llvmc -clang ~/a.c -v
> clang -x c -emit-llvm-bc /home2/spark/a.c -o /tmp/llvm_HKq01o/a.bc 
> /home2/yjhuang/tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.2/../../../../x86_64-unknown-linux-gnu/bin/ld:
> warning: cannot find entry symbol mit-llvm-bc; defaulting to
> 00000000004003c0
> llc -f /tmp/llvm_HKq01o/a.bc -o /tmp/llvm_HKq01o/a.s 
> llc: bitcode didn't read correctly.
> Reason: Bitcode stream should be a multiple of 4 bytes in length
> [spark at oxygen llvm]$ clang -x c -emit-llvm-bc /home2/spark/a.c -o a.bc
> /home2/yjhuang/tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.2/../../../../x86_64-unknown-linux-gnu/bin/ld:
> warning: cannot find entry symbol mit-llvm-bc; defaulting to
> 00000000004003c0
> [spark at oxygen llvm]$ lli a.bc 
> lli: error loading program 'a.bc': Bitcode stream should be a multiple of 4
> bytes in length
> [spark at oxygen llvm]$ 
> 
> -- 
> View this message in context: http://old.nabble.com/bug-tp27024284p27024284.html
> Sent from the LLVM - Dev mailing list archive at Nabble.com.
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list