[cfe-dev] Windows built Clang and bitcode

Daniel Dunbar daniel at zuster.org
Wed Nov 12 21:10:44 PST 2008


Hi Henry,

This is most likely because the output file wasn't being opened in
binary mode. I just pushed a change which I hope will correct this,
however I personally do not have a machine to test this on.

If you try my change and it still doesn't work, can you verify that
'clang -emit-llvm test.c' produces the correct output (which should be
readable by llvm-as).

 - Daniel

On Wed, Nov 12, 2008 at 6:09 PM, H. Johnson <misc at faradayco.com> wrote:
> Should I expect Clang built with Visual Studio to work properly on
> Windows?  My test file is:
>
> main()
>   {
>   int i, j;
>   for (i=0; i<10; i++)
>       {
>       j = i + 5;
>       }
>   }
>
> I invoke Clang as follows:
> clang -emit-llvm-bc test.c
>
> Then -
> lli test.bc (length 575 bytes)
>
> which produces:
> lli: error loading program 'test.bc': Bitcode stream should be a
> multiple of 4 bytes in length
>
> Where am I going wrong on this?
>
> BTW, thanks Eli for the quick response to the other question.  I'll try
> LLVM.
>
> Thanks,
> Henry
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>



More information about the cfe-dev mailing list