[LLVMdev] Help with Values sign
Joey Gouly
joel.gouly at gmail.com
Mon May 28 02:44:27 PDT 2012
Why are you changing the data layout to be little-endian?
Joey
On 28 May 2012 10:13, Santos Merino <santitox at hotmail.es> wrote:
> In my main function after generate the code and before start the execution
> via
> JIT I do this:
>
> ExecutionEngine *EE = EngineBuilder(M).create();
> string str =
> EE->getTargetData()->getStringRepresentation();
> str[0] = 'e';
> M->setDataLayout(str);
>
> if (verifyModule(*M)) {
> errs() << argv[0] << ": Error building the function!\n";
> return 1;
> }
>
> vector<GenericValue> noargs;
> GenericValue GV = EE->runFunction(Main, noargs);
>
> outs() << "Result: " << GV.IntVal << "\n";
> return 0;
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120528/267ed447/attachment.html>
More information about the llvm-dev
mailing list