mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114444 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ecf42c4720
commit
a53557e4fb
@ -701,14 +701,12 @@ Constant *DIFactory::GetTagConstant(unsigned TAG) {
|
||||
/// GetOrCreateArray - Create an descriptor for an array of descriptors.
|
||||
/// This implicitly uniques the arrays created.
|
||||
DIArray DIFactory::GetOrCreateArray(DIDescriptor *Tys, unsigned NumTys) {
|
||||
SmallVector<Value*, 16> Elts;
|
||||
|
||||
if (NumTys == 0)
|
||||
Elts.push_back(llvm::Constant::getNullValue(Type::getInt32Ty(VMContext)));
|
||||
else
|
||||
for (unsigned i = 0; i != NumTys; ++i)
|
||||
Elts.push_back(Tys[i]);
|
||||
if (NumTys == 0) {
|
||||
Value *Null = llvm::Constant::getNullValue(Type::getInt32Ty(VMContext));
|
||||
return DIArray(MDNode::get(VMContext, &Null, 1));
|
||||
}
|
||||
|
||||
SmallVector<Value *, 16> Elts(Tys, Tys+NumTys);
|
||||
return DIArray(MDNode::get(VMContext, Elts.data(), Elts.size()));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user