search for: getintegervalu

Displaying 3 results from an estimated 3 matches for "getintegervalu".

Did you mean: getintegervalue
2010 Feb 16
3
[LLVMdev] Creating a global variable in JIT context
...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 type of return inst! ret i32* @x i32Referencing global in another module!...
2010 Feb 16
0
[LLVMdev] Creating a global variable in JIT context
...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 type of return inst! > ret i32* @x i32R...
2014 Jul 20
2
[LLVMdev] error in InsertElementInst
...sertElementInst::InsertElementInst(llvm::Value*, llvm::Value*, llvm::Value*, const llvm::Twine&, llvm::Instruction*)’ is private The code I have used is the following: Type *Instr_vector = VectorType::get(Int32, 4); Value *emptyVec = UndefValue::get(Instr_vector); Constant* index0 = Constant::getIntegerValue(u32Ty, llvm::APInt(32, 0)); Instruction *Insert = new InsertElementInst(instr, emptyVec, index0, "test"); b->getInstList().insertAfter(Xor_flip, Insert); Do you have any suggestions for these errors? Thanks in Advance, Vasilis -------------- next part -------------- An H...