aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/DebugInfo.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
commite3e51c0038bd6ba2add82e2246e97edec0ab2204 (patch)
treee24fe092d1dd38aa6e28777260f3aef0f9eacf46 /lib/Analysis/DebugInfo.cpp
parent82fe2935bf623f09533412126ad31e62dc3167ab (diff)
downloadexternal_llvm-e3e51c0038bd6ba2add82e2246e97edec0ab2204.zip
external_llvm-e3e51c0038bd6ba2add82e2246e97edec0ab2204.tar.gz
external_llvm-e3e51c0038bd6ba2add82e2246e97edec0ab2204.tar.bz2
Use v.data() instead of &v[0] when SmallVector v might be empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r--lib/Analysis/DebugInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 9f6cbc9..6bdb64c 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -442,7 +442,7 @@ DIArray DIFactory::GetOrCreateArray(DIDescriptor *Tys, unsigned NumTys) {
Constant *Init = ConstantArray::get(ArrayType::get(EmptyStructPtr,
Elts.size()),
- &Elts[0], Elts.size());
+ Elts.data(), Elts.size());
// If we already have this array, just return the uniqued version.
DIDescriptor &Entry = SimpleConstantCache[Init];
if (!Entry.isNull()) return DIArray(Entry.getGV());