forked from OSchip/llvm-project
parent
1ffcf527c7
commit
4b57204e80
|
@ -701,14 +701,12 @@ Constant *DIFactory::GetTagConstant(unsigned TAG) {
|
||||||
/// GetOrCreateArray - Create an descriptor for an array of descriptors.
|
/// GetOrCreateArray - Create an descriptor for an array of descriptors.
|
||||||
/// This implicitly uniques the arrays created.
|
/// This implicitly uniques the arrays created.
|
||||||
DIArray DIFactory::GetOrCreateArray(DIDescriptor *Tys, unsigned NumTys) {
|
DIArray DIFactory::GetOrCreateArray(DIDescriptor *Tys, unsigned NumTys) {
|
||||||
SmallVector<Value*, 16> Elts;
|
if (NumTys == 0) {
|
||||||
|
Value *Null = llvm::Constant::getNullValue(Type::getInt32Ty(VMContext));
|
||||||
if (NumTys == 0)
|
return DIArray(MDNode::get(VMContext, &Null, 1));
|
||||||
Elts.push_back(llvm::Constant::getNullValue(Type::getInt32Ty(VMContext)));
|
}
|
||||||
else
|
|
||||||
for (unsigned i = 0; i != NumTys; ++i)
|
|
||||||
Elts.push_back(Tys[i]);
|
|
||||||
|
|
||||||
|
SmallVector<Value *, 16> Elts(Tys, Tys+NumTys);
|
||||||
return DIArray(MDNode::get(VMContext, Elts.data(), Elts.size()));
|
return DIArray(MDNode::get(VMContext, Elts.data(), Elts.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue