search for: functionbody

Displaying 5 results from an estimated 5 matches for "functionbody".

2009 Jul 02
2
How to use current value of variable in function definition?
Must be the heat or something but I can't get my brain into gear and figure out how to get something like if (1) { c <- 1; foo <- function () print(c); } c <- 2 foo() to print 1, not 2. (The real life example is a little more complex, but you get the idea. I don't want the variable c in the function definition, I want its value at that time.) The only thing I have been
2017 Apr 09
2
Possible stack corruption during call to JITSymbol::getAddress()
...quot;help", context); module->setDataLayout(jit.getTargetMachine().createDataLayout()); auto function = llvm::cast<llvm::Function>(module->getOrInsertFunction(FUNC_NAME, llvm::Type::getInt32Ty(context), nullptr)); auto block = llvm::BasicBlock::Create(context, "functionBody", function); irBuilder.SetInsertPoint(block); irBuilder.CreateRet(llvm::ConstantInt::get(context, llvm::APInt(32, 1, true))); jit.addModule(std::move(module)); llvm::JITSymbol symbol = jit.findSymbol(FUNC_NAME); //Just to ensure that the symbol is in fact valid (symbol e...
2017 Apr 17
2
Possible stack corruption during call to JITSymbol::getAddress()
...etTargetMachine().createDataLayout()); >> >> auto function = llvm::cast<llvm::Function>(mod >> ule->getOrInsertFunction(FUNC_NAME, >> >> llvm::Type::getInt32Ty(context), nullptr)); >> >> auto block = llvm::BasicBlock::Create(context, "functionBody", >> function); >> irBuilder.SetInsertPoint(block); >> >> irBuilder.CreateRet(llvm::ConstantInt::get(context, llvm::APInt(32, >> 1, true))); >> jit.addModule(std::move(module)); >> >> llvm::JITSymbol symbol = jit.findSymbol(FUNC_N...
2017 Apr 20
2
Possible stack corruption during call to JITSymbol::getAddress()
...t;>>> auto function = llvm::cast<llvm::Function>(mod >>>> ule->getOrInsertFunction(FUNC_NAME, >>>> >>>> llvm::Type::getInt32Ty(context), nullptr)); >>>> >>>> auto block = llvm::BasicBlock::Create(context, "functionBody", >>>> function); >>>> irBuilder.SetInsertPoint(block); >>>> >>>> irBuilder.CreateRet(llvm::ConstantInt::get(context, >>>> llvm::APInt(32, 1, true))); >>>> jit.addModule(std::move(module)); >>>> &gt...
2017 May 01
1
Possible stack corruption during call to JITSymbol::getAddress()
...ast<llvm::Function>(mod >>>>>> ule->getOrInsertFunction(FUNC_NAME, >>>>>> >>>>>> llvm::Type::getInt32Ty(context), nullptr)); >>>>>> >>>>>> auto block = llvm::BasicBlock::Create(context, "functionBody", >>>>>> function); >>>>>> irBuilder.SetInsertPoint(block); >>>>>> >>>>>> irBuilder.CreateRet(llvm::ConstantInt::get(context, >>>>>> llvm::APInt(32, 1, true))); >>>>>> jit.ad...