Hi, In my source code, I have the following declaration char a[30]; When I'm running the following (Assuming that I is an instruction pointer pointing to the instruction to be replaced, i.e. %a = alloca [30 x i8], align 1): ArrayType* arr = ArrayType::get(IntegerType::get(getGlobalContext(), 8), 10); AllocaInst* pa = new AllocaInst(arr, "blah"); BasicBlock::iterator ii(*I); ReplaceInstWithInst(I->getParent()->getInstList(), ii, pa); Why am I running into Value::replaceAllUsesWith(llvm::Value*): Assertion New->getType() == getType() && "replaceAllUses of value with new value of different type!"' ? Thanks, Shivam -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131205/8cfb6933/attachment.html>