Displaying 2 results from an estimated 2 matches for "param_next".
2013 May 22
1
[LLVMdev] Best strategy to add a parameter to a function
...1 = add_param_float("arg1");
The function add_param_float should add a 'float' parameter to the
function and return its value. Right now it's implemented like this
Value* add_param_float() {
return new llvm::Argument(
llvm::Type::getFloatTy(llvm::getGlobalContext()) , param_next() ,
mainFunc );
}
where param_next just figures some new, unused name for the argument and
mainFunc is the function being built.
This works to a certain extent. I am seeing issues with certain type
printers and I assume the way the argument is added to the function is
not a strictly valid thi...
2013 May 21
1
[LLVMdev] Is it valid to add parameters to a function once it is created
...int", mainFunc);
builder->SetInsertPoint(entry);
llvm_counters::param_counter = 0;
llvm_counters::label_counter = 0;
}
and then add parameters as needed with something like
llvm::Argument * u8 = new llvm::Argument(
llvm::Type::getInt8Ty(llvm::getGlobalContext()) , param_next() , mainFunc );
Is this valid?