search for: ptogv

Displaying 2 results from an estimated 2 matches for "ptogv".

Did you mean: progv
2007 Oct 08
1
[LLVMdev] Passing pointers to pointers to JIT
...nctions from a cpp file looking like this: http://ktown.kde.org/~zrusin/llvm/test.cpp gives proper results for the single-dimensional array, but crashes on multi-dimensional case. It looks like argument passing to those functions with the: std::vector<GenericValue> args(2); args[0] = PTOGV(array); args[1].IntVal = APInt(32, arraySize); scheme is ok when "array" is single dimensional but invalid when "array" is multi-dimensional. What is the proper way of passing multi-dimensional arrays from C/C++ code to LLVM JIT? If someone could let me know what I'm doi...
2008 Nov 15
1
[LLVMdev] How to use EE->runFunction for a function with StructRet set?
...uot;) return 1; // Get object size uint64_t size = EE->getTargetData()->getABITypeSize(structRetType); // Make room on stack void* p = alloca(size); // Create parameter list std::vector<GenericValue> parameters; GenericValue structRetParameter; structRetParameter = PTOGV(p); parameters.push_back(structRetParameter); EE->runFunction(F, parameters); // Copy and print result std::string result = *(std::string*)p; std::cout << "Result: " << result << std::endl; // TODO: call std::string destructor return 0; } = Compile...