summaryrefslogtreecommitdiffstats
path: root/libcxx/include/vector
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2014-09-03 21:37:43 +0000
committerMarshall Clow <mclow.lists@gmail.com>2014-09-03 21:37:43 +0000
commitb67bc4ea0d23c2dc11d2123aaf37d1b3ef83c940 (patch)
tree06a5a4df1cc1289c2a130893e12b2623f235a028 /libcxx/include/vector
parentfba8b20d98afebd0b11b675b2a10c891b12c2b5b (diff)
downloadbcm5719-llvm-b67bc4ea0d23c2dc11d2123aaf37d1b3ef83c940.tar.gz
bcm5719-llvm-b67bc4ea0d23c2dc11d2123aaf37d1b3ef83c940.zip
Make the ASAN RAII object a nop when building w/o ASAN
llvm-svn: 217082
Diffstat (limited to 'libcxx/include/vector')
-rw-r--r--libcxx/include/vector8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/include/vector b/libcxx/include/vector
index 12195df5612..cd9aab32465 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -863,6 +863,7 @@ private:
__annotate_contiguous_container(data(), data() + capacity(),
data() + __old_size, data() + size());
}
+#ifndef _LIBCPP_HAS_NO_ASAN
// The annotation for size increase should happen before the actual increase,
// but if an exception is thrown after that the annotation has to be undone.
struct __RAII_IncreaseAnnotator {
@@ -879,6 +880,13 @@ private:
size_type __n;
const vector &__v;
};
+#else
+ struct __RAII_IncreaseAnnotator {
+ inline __RAII_IncreaseAnnotator(const vector &, size_type __n = 1) {}
+ inline void __done() {}
+ };
+#endif
+
};
template <class _Tp, class _Allocator>
OpenPOWER on IntegriCloud