Why are you changing the data layout to be little-endian?<div><br></div><div>Joey</div><div><br><div class="gmail_quote">On 28 May 2012 10:13, Santos Merino <span dir="ltr"><<a href="mailto:santitox@hotmail.es" target="_blank">santitox@hotmail.es</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In my main function after generate the code and before start the execution via<br>
JIT I do this:<br>
<br>
ExecutionEngine *EE = EngineBuilder(M).create();<br>
string str =<br>
EE->getTargetData()->getStringRepresentation();<br>
str[0] = 'e';<br>
M->setDataLayout(str);<br>
<br>
if (verifyModule(*M)) {<br>
errs() << argv[0] << ": Error building the function!\n";<br>
return 1;<br>
}<br>
<br>
vector<GenericValue> noargs;<br>
GenericValue GV = EE->runFunction(Main, noargs);<br>
<br>
outs() << "Result: " << GV.IntVal << "\n";<br>
return 0;<br>
<div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br></div>