[LLVMdev] Help with Values sign

Santos Merino santitox at hotmail.es
Mon May 28 02:13:11 PDT 2012


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;




More information about the llvm-dev mailing list