diff options
author | Jay Foad <jay.foad@gmail.com> | 2009-05-21 09:52:38 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2009-05-21 09:52:38 +0000 |
commit | 7d0479f2c2d60ccff381ce63105168bd132fb304 (patch) | |
tree | 417d43f95d605528391e6ab8c9a460f9b6347b83 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 9fc7856e3b6f549030863bf35441b456a0affec7 (diff) | |
download | bcm5719-llvm-7d0479f2c2d60ccff381ce63105168bd132fb304.tar.gz bcm5719-llvm-7d0479f2c2d60ccff381ce63105168bd132fb304.zip |
Use v.data() instead of &v[0] when SmallVector v might be empty.
llvm-svn: 72210
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 382b1866480..b005d0543e5 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/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(); |