<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>I got the following compile error. Did the message-arrays.m can be compiled into .bc? Or need include something for Object C language compile.</div><div><br></div><div>Jonathan</div><div><br></div><div>118-165-76-229:CodeGenObjC Jonathan$ pwd</div><div>/Users/Jonathan/llvm/release/src/tools/clang/test/CodeGenObjC</div><div>118-165-76-229:CodeGenObjC Jonathan$ clang -emit-llvm -o 1.ll -c message-arrays.m </div><div>message-arrays.m:5:3: warning: instance method '-print:' not found (return type</div><div>      defaults to 'id') [-Wobjc-method-access]</div><div>  [ a print: "hello" ];</div><div>  ^   ~~~~~</div><div>message-arrays.m:15:1: warning: control reaches end of non-void function</div><div>      [-Wreturn-type]</div><div>}</div><div>^</div><div>2 warnings generated.</div><div>118-165-76-229:CodeGenObjC Jonathan$ clang -emit-llvm -o 1.ll -c ivars.m</div><div>ivars.m:18:12: warning: class 'R' defined without specifying a base class</div><div>      [-Wobjc-root-class]</div><div>@interface R {</div><div>           ^</div><div>ivars.m:18:13: note: add a super class to fix this problem</div><div>@interface R {</div><div>            ^</div><div>1 warning generated.</div><div><br></div>On 2013/4/6, at 上午11:05, Tyler Hardin <<a href="mailto:tghardin1@catamount.wcu.edu">tghardin1@catamount.wcu.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p dir="ltr">Look up --emit-llvm. I think it has to be used with -c.</p>
<div class="gmail_quote">On Apr 5, 2013 10:55 PM, "Jonathan" <<a href="mailto:gamma_chen@yahoo.com.tw">gamma_chen@yahoo.com.tw</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">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 --<a href="http://jonathan2251.github.com/lbd/index.html" target="_blank">http://jonathan2251.github.com/lbd/index.html</a> now. I use "clang -c hello.cpp -emit-llvm" to compile C++ but don't know how to compile Object-C.<br>
<br>// RUN: %clang_cc1 -emit-llvm -o %t %s<br><br>void f0(id a) {<br> // This should have an implicit cast<br> [ a print: "hello" ];<br>}<br><br>@interface A<br>-(void) m: (int) arg0, ...;<br>@end<br><br>int f1(A *a) {<br>
 // This should also get an implicit cast (for the vararg)<br> [a m: 1, "test"];<br>}<br><br>Jonathan<br></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div>
</blockquote></div><br></body></html>