search for: dync_cast

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

Did you mean: dyn_cast
2011 May 18
3
[LLVMdev] access array problem
...stantInt::get(Type::getInt64Ty(Context), 1), "newcounter", InsertPos); new StoreInst(newcounter, ElmentPtr, InserPos); //store the memory address to counterArray[oldcounter] std::vector<Constant*> indexC(2); indexC[0] = Constant::getNullvalue(Type:getInt32Ty(Context)); indexC[1] = dync_cast(llvm::ConstantInt>(oldcounter); Constant *ElmentPtr = ConstantExpr::getGetElementPtr(counterArray, &indexC[0], indexC.size()); ......// other codes Unfortunately, the oldcounter of Value type can not be cast to ConstantInt, dync_cast returns NULL. Is there any way to retrieve the integer va...
2011 May 18
0
[LLVMdev] access array problem
...ext), 1), > "newcounter", InsertPos); > new StoreInst(newcounter, ElmentPtr, InserPos); > > //store the memory address to counterArray[oldcounter] > std::vector<Constant*> indexC(2); > indexC[0] = Constant::getNullvalue(Type:getInt32Ty(Context)); > indexC[1] = dync_cast(llvm::ConstantInt>(oldcounter); Since oldcounter is not a constant (its value is not known at compile time...) this is never going to work. Declare the vector to be of Value* not Constant*. Then you don't need the dynamic cast. > Constant *ElmentPtr = ConstantExpr::getGetElementPtr(cou...
2011 May 18
2
[LLVMdev] access array problem
...ounter", InsertPos); >> new StoreInst(newcounter, ElmentPtr, InserPos); >> >> //store the memory address to counterArray[oldcounter] >> std::vector<Constant*> indexC(2); >> indexC[0] = Constant::getNullvalue(Type:getInt32Ty(Context)); >> indexC[1] = dync_cast(llvm::ConstantInt>(oldcounter); > Since oldcounter is not a constant (its value is not known at compile time...) > this is never going to work. Declare the vector to be of Value* not Constant*. > Then you don't need the dynamic cast. So, do you mean that we have no way to use the &...
2011 May 18
0
[LLVMdev] access array problem
...ex.size()); What is "counter", the same things as CounterSize? >>> //store the memory address to counterArray[oldcounter] >>> std::vector<Constant*> indexC(2); >>> indexC[0] = Constant::getNullvalue(Type:getInt32Ty(Context)); >>> indexC[1] = dync_cast(llvm::ConstantInt>(oldcounter); >> Since oldcounter is not a constant (its value is not known at compile time...) >> this is never going to work. Declare the vector to be of Value* not Constant*. >> Then you don't need the dynamic cast. > So, do you mean that we have no...
2011 May 18
2
[LLVMdev] access array problem
..."counter", the same things as CounterSize? > >>>> //store the memory address to counterArray[oldcounter] >>>> std::vector<Constant*> indexC(2); >>>> indexC[0] = Constant::getNullvalue(Type:getInt32Ty(Context)); >>>> indexC[1] = dync_cast(llvm::ConstantInt>(oldcounter); >>> Since oldcounter is not a constant (its value is not known at compile time...) >>> this is never going to work. Declare the vector to be of Value* not Constant*. >>> Then you don't need the dynamic cast. >> So, do you mean...