OSDN Git Service

[ADT] IntervalMap: fix setStart and setStop
authorMichael LeMay <michael.lemay@intel.com>
Thu, 3 Nov 2016 19:14:46 +0000 (19:14 +0000)
committerMichael LeMay <michael.lemay@intel.com>
Thu, 3 Nov 2016 19:14:46 +0000 (19:14 +0000)
commitcbbb2b124316dac1a1fc529a1bd7d97bca2220ad
treed27c45a987dadc4fbd0e88998f976b5138268e28
parenta625bffced27a7cb7e8bcf9d02e1c7494589ee7c
[ADT] IntervalMap: fix setStart and setStop

Summary:
These functions currently require that the new closed interval has a length of
at least 2.  They also currently permit empty half-open intervals.  This patch
defines nonEmpty in each traits structure and uses it to correct the
implementations of setStart and setStop.

Reviewers: stoklund, chandlerc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D26064

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285957 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/IntervalMap.h
unittests/ADT/IntervalMapTest.cpp