[asan] Update a vector's storage annotation during destruction. Reviewed as https://reviews.llvm.org/D50101. Thanks to bobsayshilol (Ben) for the patch.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@341671 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/vector b/include/vector
index 0f5006f..9245ba1 100644
--- a/include/vector
+++ b/include/vector
@@ -540,13 +540,14 @@
                                     value_type,
                                     typename iterator_traits<_ForwardIterator>::reference>::value>::type* = 0);
 
-#if _LIBCPP_DEBUG_LEVEL >= 2
     _LIBCPP_INLINE_VISIBILITY
     ~vector()
     {
+        __annotate_delete();
+#if _LIBCPP_DEBUG_LEVEL >= 2
         __get_db()->__erase_c(this);
-    }
 #endif
+    }
 
     vector(const vector& __x);
     vector(const vector& __x, const allocator_type& __a);