Displaying 2 results from an estimated 2 matches for "anditest2".
Did you mean:
anditest1
2009 Jun 18
0
[LLVMdev] Initialising global Array
...t(ATy, Initializer);
Counters->setInitializer(init);
DOUT << "Initializer:: \n";
for( int i = 0; i < Initializer.size(); ++i ) {
DOUT << "Initializer["<<i<<"]: " << Initializer[i] << "\n";
}
}
static void andiTest2(Module &M) {
int NumEdges = 4;
const ArrayType *ATy = ArrayType::get(Type::Int32Ty, NumEdges);
std::vector<Constant*> Initializer = std::vector<Constant*>(NumEdges);
APInt zero(32,0); Constant* zeroc = ConstantInt::get(zero);
APInt minusone(32,-1); Constant* minusone...
2009 Jun 18
3
[LLVMdev] Initialising global Array
Hi,
I try to create a array that has a nonzero initialiser:
What i do is, first create the array type.
> const ArrayType *ATy = ArrayType::get(Type::Int32Ty, NumEdges);
Then create some constant values for the initializer.
> std::vector<Constant*> Initializer; Initializer.reserve(NumEdges);
> APInt zero(32,0); Constant* zeroc = ConstantInt::get(zero);
> APInt