mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
[ADT][CMake][AutoConf] Fail-fast iterators for DenseMap
Summary: This patch is an attempt at making `DenseMapIterator`s "fail-fast". Fail-fast iterators that have been invalidated due to insertion into the host `DenseMap` deterministically trip an assert (in debug mode) on access, instead of non-deterministically hitting memory corruption issues. Enabling fail-fast iterators breaks the LLVM C++ ABI, so they are predicated on `LLVM_ENABLE_ABI_BREAKING_CHECKS`. `LLVM_ENABLE_ABI_BREAKING_CHECKS` by default flips with `LLVM_ENABLE_ASSERTS`, but can be clamped to ON or OFF using the CMake / autoconf build system. Reviewers: chandlerc, dexonsmith, rnk, zturner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8351 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233310 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -417,6 +417,9 @@
|
||||
/* Installation directory for documentation */
|
||||
#undef LLVM_DOCSDIR
|
||||
|
||||
/* Define to enable checks that alter the LLVM C++ ABI */
|
||||
#undef LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
|
||||
/* Define if threads enabled */
|
||||
#undef LLVM_ENABLE_THREADS
|
||||
|
||||
|
@@ -101,4 +101,8 @@
|
||||
/* Define if we link Polly to the tools */
|
||||
#cmakedefine LINK_POLLY_INTO_TOOLS
|
||||
|
||||
/* Define if LLVM is built with asserts and checks that change the layout of
|
||||
client-visible data structures. */
|
||||
#cmakedefine LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
|
||||
#endif
|
||||
|
@@ -98,4 +98,7 @@
|
||||
/* LLVM version string */
|
||||
#undef LLVM_VERSION_STRING
|
||||
|
||||
/* Define to enable checks that alter the LLVM C++ ABI */
|
||||
#undef LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user