<br><br><div class="gmail_quote">2011/9/3 Anton Korobeynikov <span dir="ltr"><<a href="mailto:anton@korobeynikov.info">anton@korobeynikov.info</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello<br>
<div class="im"><br>
> $ clang -emit-llvm devirtualize.cpp -o devirtualize.o<br>
> clang: error: 'i686-pc-mingw32': unable to pass LLVM bit-code files to<br>
> linker<br>
><br>
> How could I get the LLVM IR ? (under textual representation, but I can use<br>
> llvm-dis if I get bytecode I think)<br>
</div>You forgot to add -c cmdline option<br>
<font color="#888888"><br>
--<br>
With best regards, Anton Korobeynikov<br>
Faculty of Mathematics and Mechanics, Saint Petersburg State University<br>
</font></blockquote></div><br>D'oh!<br><br>Well, I can now confirm that the issue still exists with a recent snapshot (from today):<br><br><div style="margin-left: 40px;">$ clang -emit-llvm -O2 -c devirtualize.cpp -o - | llvm-dis<br>
define void @_Z14nodevirtualizev() {<br>entry:<br>  %call = tail call %struct.C* @_Z6GetRefv()<br>  %a = getelementptr inbounds %struct.C* %call, i32 0, i32 0<br>  %0 = bitcast %struct.C* %call to void (%struct.A*)***<br>
  %vtable = load void (%struct.A*)*** %0, align 4<br>  %1 = load void (%struct.A*)** %vtable, align 4<br>  tail call void %1(%struct.A* %a)<br>  ret void<br>}<br></div><br>Thanks Anton!<br><br>-- Matthieu<br><br>