Skip to content
  • Sanjoy Das's avatar
    [ADT][CMake][AutoConf] Fail-fast iterators for DenseMap · 8ce6499b
    Sanjoy Das authored
    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
    
    llvm-svn: 233310
    8ce6499b
Loading