I'm compiling with clang-llvm 1.0 on Xcode 3.2.1
I want to see LLVM's intermidiate representation. How do I do this ?
Thanks.
I'm compiling with clang-llvm 1.0 on Xcode 3.2.1
I want to see LLVM's intermidiate representation. How do I do this ?
Thanks.
Per LLVM's site, I would add -emit-llvm
to the compiler options. Xcode does not provide UI for showing the representation (yet).
Xcode does have support for syntax highlighting the LLVM intermediate representation, but this representation is internal to the compiler (and changes frequently) and Xcode doesn't have any UI for talking to the compiler to show the intermediate representation in the UI. This would be an interesting feature request though, have you consider filing it with Apple?
If you just want to see it, you can do so manually by taking the compile command from the build log, and adding '-emit-llvm -S -o /tmp/t.ll' to the end. Now you can open /tmp/t.ll in Xcode and see the LLVM IR for that one file.