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 | e3e51c0038bd6ba2add82e2246e97edec0ab2204 (patch) | |
tree | e24fe092d1dd38aa6e28777260f3aef0f9eacf46 /lib/Analysis/DebugInfo.cpp | |
parent | 82fe2935bf623f09533412126ad31e62dc3167ab (diff) |
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.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index 9f6cbc919d..6bdb64c975 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()); |