aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2009-05-21 09:52:38 +0000
committerJay Foad <jay.foad@gmail.com>2009-05-21 09:52:38 +0000
commitbeaaccd8e2a8748f77b66e2b330fb9136937e14c (patch)
tree27f094096f297cc213a45db9a8b3a7413fd53396 /lib/CodeGen/CGDebugInfo.cpp
parentecfbdcbaf71609ab99cdebbf2d704173070dbaf3 (diff)
Use v.data() instead of &v[0] when SmallVector v might be empty.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 382b186648..b005d0543e 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -609,7 +609,7 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
}
llvm::DIArray Elements =
- DebugFactory.GetOrCreateArray(&EltTys[0], EltTys.size());
+ DebugFactory.GetOrCreateArray(EltTys.data(), EltTys.size());
// Bit size, align and offset of the type.
uint64_t Size = M->getContext().getTypeSize(Ty);
@@ -645,7 +645,7 @@ llvm::DIType CGDebugInfo::CreateType(const EnumType *Ty,
// Return a CompositeType for the enum itself.
llvm::DIArray EltArray =
- DebugFactory.GetOrCreateArray(&Enumerators[0], Enumerators.size());
+ DebugFactory.GetOrCreateArray(Enumerators.data(), Enumerators.size());
std::string EnumName = Decl->getNameAsString();
SourceLocation DefLoc = Decl->getLocation();