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

Jonathan gamma_chen at yahoo.com.tw
Fri Apr 5 19:35:39 PDT 2013

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, ...;

int f1(A *a) {
  // This should also get an implicit cast (for the vararg)
  [a m: 1, "test"];


More information about the cfe-dev mailing list