[LLVMdev] how to get the llvm IR from C source code?
Keun Soo Yim
yim6 at illinois.edu
Wed Dec 24 20:50:24 PST 2008
Please run.
$ llvm-gcc -O3 -emit-llvm hello.c -c -o hello.bc
$ llvm-dis < hello.bc > hello.ll
The first command is to generate a byte code
and second is to translate the bytecode to a readable form.
Thanks!
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
Behalf Of Alex.Wang
Sent: Wednesday, December 24, 2008 10:31 PM
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] how to get the llvm IR from C source code?
Hi everyone.
I want to get the llvm IR from the C source code by LLVM-GCC. But I am not
familiar with those command line arguments.
Can anyone give me a guidance? Thank you very much for any help.
Good luck.
--
Best regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081224/0c3a0aa3/attachment.html>
More information about the llvm-dev
mailing list