summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-04-15 08:30:10 +0000
committerFangrui Song <maskray@google.com>2019-04-15 08:30:10 +0000
commitb93de4cd263002735b08a95108349ebd01fbd380 (patch)
treebf8ee3c90219be7c80508f366b39360ff1c6ac5c /llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
parentbd8a1ce7bbb9868188b6310cc7bec88bd1b830f0 (diff)
downloadbcm5719-llvm-b93de4cd263002735b08a95108349ebd01fbd380.tar.gz
bcm5719-llvm-b93de4cd263002735b08a95108349ebd01fbd380.zip
[DWARF] Fix DWARFVerifier::DieRangeInfo::intersects
It was incorrect if RHS had more than 1 ranges and one of the ranges interacted with *this llvm-svn: 358376
Diffstat (limited to 'llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp')
-rw-r--r--llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
index bd519767105..d3643ca4bb7 100644
--- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
@@ -3188,6 +3188,9 @@ TEST(DWARFDebugInfo, TestDWARFDieRangeInfoIntersects) {
AssertRangesIntersect(Ranges, {{0x3f, 0x40}});
// Test range that starts at end of second range
AssertRangesDontIntersect(Ranges, {{0x40, 0x41}});
+
+ AssertRangesDontIntersect(Ranges, {{0x20, 0x21}, {0x2f, 0x30}});
+ AssertRangesIntersect(Ranges, {{0x20, 0x21}, {0x2f, 0x31}});
}
} // end anonymous namespace
OpenPOWER on IntegriCloud