summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/IntegersSubsetTest.cpp
diff options
context:
space:
mode:
authorStepan Dyatkovskiy <stpworld@narod.ru>2012-06-26 16:08:20 +0000
committerStepan Dyatkovskiy <stpworld@narod.ru>2012-06-26 16:08:20 +0000
commit593d358cf3310114e01f79b6fbcd9c3b6ffc314a (patch)
tree6f1e0522371f7178ee4cf1c9c7b61d28f0a75971 /llvm/unittests/Support/IntegersSubsetTest.cpp
parent6362803cfed99bc008b12b488d2c2a682df0cc2d (diff)
downloadbcm5719-llvm-593d358cf3310114e01f79b6fbcd9c3b6ffc314a.tar.gz
bcm5719-llvm-593d358cf3310114e01f79b6fbcd9c3b6ffc314a.zip
IntegersSubsetTest: Due to compilation failure with -std=c11, replaced -1UL with NOT_A_NUMBER constant (0xffff).
llvm-svn: 159207
Diffstat (limited to 'llvm/unittests/Support/IntegersSubsetTest.cpp')
-rw-r--r--llvm/unittests/Support/IntegersSubsetTest.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/unittests/Support/IntegersSubsetTest.cpp b/llvm/unittests/Support/IntegersSubsetTest.cpp
index 2d0e3578942..5d1dde4c37a 100644
--- a/llvm/unittests/Support/IntegersSubsetTest.cpp
+++ b/llvm/unittests/Support/IntegersSubsetTest.cpp
@@ -193,6 +193,7 @@ namespace {
const unsigned_ranges IntersectRes,
unsigned IntersectResSize
) {
+
Mapping::RangesCollection Ranges;
Mapping LHSMapping;
@@ -248,6 +249,9 @@ namespace {
}
TEST(IntegersSubsetTest, DiffTest) {
+
+ static const unsigned NOT_A_NUMBER = 0xffff;
+
{
unsigned_ranges LHS = { { 0, 4 }, { 7, 10 }, { 13, 17 } };
unsigned_ranges RHS = { { 3, 14 } };
@@ -279,7 +283,7 @@ namespace {
{
unsigned_ranges LHS = { { 2, 4 } };
unsigned_ranges RHS = { { 0, 5 } };
- unsigned_ranges ExcludeRes = { {-1UL, -1UL} };
+ unsigned_ranges ExcludeRes = { {NOT_A_NUMBER, NOT_A_NUMBER} };
unsigned_ranges IntersectRes = { { 2, 4 } };
TestDiff(LHS, 1, RHS, 1, ExcludeRes, 0, IntersectRes, 1);
@@ -289,7 +293,7 @@ namespace {
unsigned_ranges LHS = { { 2, 4 } };
unsigned_ranges RHS = { { 7, 8 } };
unsigned_ranges ExcludeRes = { { 2, 4 } };
- unsigned_ranges IntersectRes = { {-1UL, -1UL} };
+ unsigned_ranges IntersectRes = { {NOT_A_NUMBER, NOT_A_NUMBER} };
TestDiff(LHS, 1, RHS, 1, ExcludeRes, 1, IntersectRes, 0);
}
@@ -306,7 +310,7 @@ namespace {
{
unsigned_ranges LHS = { { 0, 7 } };
unsigned_ranges RHS = { { 0, 5 }, { 6, 9 } };
- unsigned_ranges ExcludeRes = { {-1UL, -1UL} };
+ unsigned_ranges ExcludeRes = { {NOT_A_NUMBER, NOT_A_NUMBER} };
unsigned_ranges IntersectRes = { { 0, 5 }, {6, 7} };
TestDiff(LHS, 1, RHS, 2, ExcludeRes, 0, IntersectRes, 2);
@@ -316,7 +320,7 @@ namespace {
unsigned_ranges LHS = { { 17, 17 } };
unsigned_ranges RHS = { { 4, 4 } };
unsigned_ranges ExcludeRes = { {17, 17} };
- unsigned_ranges IntersectRes = { { -1UL, -1UL } };
+ unsigned_ranges IntersectRes = { { NOT_A_NUMBER, NOT_A_NUMBER } };
TestDiff(LHS, 1, RHS, 1, ExcludeRes, 1, IntersectRes, 0);
}
OpenPOWER on IntegriCloud