[cfe-dev] How to compile object C with clang into llvm IR?

jahanian fjahanian at apple.com
Sat Apr 6 10:56:25 PDT 2013


clang -cc1 -emit-llvm -o - .../tools/clang/test/CodeGenObjC/message-arrays.m

- Fariborz

 On Apr 5, 2013, at 7:35 PM, Jonathan <gamma_chen at yahoo.com.tw> wrote:

> Following came from tools/clang/test/CodeGenObjC/message-arrays.m. But I don't know how to compile it at terminal command since no clang_cc1 executable file. Can some one help me? I am writing the llvm backend document -- http://jonathan2251.github.com/lbd/index.html
> 
> // RUN: %clang_cc1 -emit-llvm -o %t %s
> 
> void f0(id a) {
>  // This should have an implicit cast
>  [ a print: "hello" ];
> }
> 
> @interface A
> -(void) m: (int) arg0, ...;
> @end
> 
> int f1(A *a) {
>  // This should also get an implicit cast (for the vararg)
>  [a m: 1, "test"];
> }
> 
> Jonathan
> 
> 
> _______________________________________________
> 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