[LLVMdev] misc questions on opt and bitcode
Arpan Sen
arpansen at gmail.com
Sun Feb 5 11:32:44 PST 2012
Hi,
For the very simple example below, I get *Unknown instruction error from
lli and llvm-dis*, while* llc does not print anything*. Not sure what is
that I am missing here. My llvm-gcc version
is i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build
5658) (LLVM build 2336.1.00)
1-39-155-188:pastebin Babai$ cat example.c
#include <stdio.h>
void hello()
{
printf("testing\n");
}
int main()
{
hello();
}
1-39-155-188:pastebin Babai$ llvm-gcc example.c -emit-llvm -c -o example.bc
1-39-155-188:pastebin Babai$ lli example.bc
lli: example.bc: Unknown instruction
1-39-155-188:pastebin Babai$ llvm-dis < example.bc
llvm-dis: Unknown instruction
1-39-155-188:pastebin Babai$ llvm-gcc example.c -emit-llvm -S -o example.s
1-39-155-188:pastebin Babai$ llc example.s
1-39-155-188:pastebin Babai$ llc example.s
1-39-155-188:pastebin Babai$ llvm-gcc example.c
1-39-155-188:pastebin Babai$ ./a.out
testing
Any ideas?
Arpan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120206/bce88b2f/attachment.html>
More information about the llvm-dev
mailing list