search for: zerov

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

Did you mean: zero
2010 Feb 16
3
[LLVMdev] Creating a global variable in JIT context
...zed to zero, and return its value from a newly created function, in JIT context. I'm keeping all types as i32 for the moment, and I only have the one module object. This is the code I have for creating the global variable: const Type *type = Type::getInt32Ty(getGlobalContext()); // Constant *zerov = Constant::getNullValue(type); Constant *zerov = Constant::getIntegerValue(type, APInt(32, 0)); V = new GlobalVariable(getGlobalContext(), type, 0, GlobalValue::PrivateLinkage, zerov, name); And these are the error messages given by verifyFunction: Function return type does not match operand t...
2010 Feb 16
0
[LLVMdev] Creating a global variable in JIT context
...ly created function, in JIT context. I'm keeping > all types as i32 for the moment, and I only have the one module > object. > > This is the code I have for creating the global variable: > > const Type *type = Type::getInt32Ty(getGlobalContext()); > // Constant *zerov = Constant::getNullValue(type); > Constant *zerov = Constant::getIntegerValue(type, APInt(32, 0)); > V = new GlobalVariable(getGlobalContext(), type, 0, > GlobalValue::PrivateLinkage, zerov, name); > > And these are the error messages given by verifyFunction: > >...