diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-03-30 11:36:44 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-03-30 11:36:44 +0000 |
commit | 9e649c3cfe24104f621e75ef644a95b2be3fbdcd (patch) | |
tree | e7ebd23864c3d331f298743f105408b3d6509948 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 8061bb141e735ed41543d9ebd8f8e47bde70886a (diff) | |
download | bcm5719-llvm-9e649c3cfe24104f621e75ef644a95b2be3fbdcd.tar.gz bcm5719-llvm-9e649c3cfe24104f621e75ef644a95b2be3fbdcd.zip |
Replace some constant-sized SmallVectors.
llvm-svn: 99884
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 0e789c92d67..426f1551728 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -714,10 +714,8 @@ llvm::DIType CGDebugInfo::getOrCreateVTablePtrType(llvm::DIFile Unit) { ASTContext &Context = CGM.getContext(); /* Function type */ - llvm::SmallVector<llvm::DIDescriptor, 16> STys; - STys.push_back(getOrCreateType(Context.IntTy, Unit)); - llvm::DIArray SElements = - DebugFactory.GetOrCreateArray(STys.data(), STys.size()); + llvm::DIDescriptor STy = getOrCreateType(Context.IntTy, Unit); + llvm::DIArray SElements = DebugFactory.GetOrCreateArray(&STy, 1); llvm::DIType SubTy = DebugFactory.CreateCompositeType(llvm::dwarf::DW_TAG_subroutine_type, Unit, "", Unit, @@ -1070,11 +1068,9 @@ llvm::DIType CGDebugInfo::CreateType(const VectorType *Ty, uint64_t NumElems = Ty->getNumElements(); if (NumElems > 0) --NumElems; - llvm::SmallVector<llvm::DIDescriptor, 8> Subscripts; - Subscripts.push_back(DebugFactory.GetOrCreateSubrange(0, NumElems)); - llvm::DIArray SubscriptArray = - DebugFactory.GetOrCreateArray(Subscripts.data(), Subscripts.size()); + llvm::DIDescriptor Subscript = DebugFactory.GetOrCreateSubrange(0, NumElems); + llvm::DIArray SubscriptArray = DebugFactory.GetOrCreateArray(&Subscript, 1); uint64_t Size = CGM.getContext().getTypeSize(Ty); uint64_t Align = CGM.getContext().getTypeAlign(Ty); |