I'm writing a function pass that is run before an ExecutionEngine Jit's the code. Therefore I can assume that my machine is the correct target. It is never the case that the pass would be run and then stored.<br><br>
Daniel<br><br><div class="gmail_quote">2009/10/20 Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Daniel,<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It may not be the best way to do what I'm trying to do, but it's not useless and bogus. Consider the following:<br>
<br>
%1 = alloca i32* ; %1 is of type i32**, dereferenced it becomes a type i32* and<br>
; the size of that is sizeof(void *) bytes<br>
</blockquote>
<br></div>
it is useless because getTypeAllocSize will handle any type, including<br>
pointer types. It is bogus because your code assumes that the LLVM<br>
bitcode is targeting your own machine, i.e. that sizeof(void*) as given<br>
by your machine is correct for the target. This may or may not be the<br>
case, but it is something best avoided.<br>
<br>
Ciao,<br><font color="#888888">
<br>
Duncan.<br>
</font></blockquote></div><br>