aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests')
-rw-r--r--llvm/unittests/IR/AttributesTest.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/unittests/IR/AttributesTest.cpp b/llvm/unittests/IR/AttributesTest.cpp
index f73f2b2..f0e34aa 100644
--- a/llvm/unittests/IR/AttributesTest.cpp
+++ b/llvm/unittests/IR/AttributesTest.cpp
@@ -437,6 +437,14 @@ TEST(Attributes, SetIntersect) {
break;
case Attribute::Range:
break;
+ case Attribute::Captures:
+ V0 = CaptureInfo(CaptureComponents::AddressIsNull,
+ CaptureComponents::None)
+ .toIntValue();
+ V1 = CaptureInfo(CaptureComponents::None,
+ CaptureComponents::ReadProvenance)
+ .toIntValue();
+ break;
default:
ASSERT_FALSE(true);
}
@@ -516,6 +524,11 @@ TEST(Attributes, SetIntersect) {
ASSERT_EQ(Res->getAttribute(Kind).getRange(),
ConstantRange(APInt(32, 0), APInt(32, 20)));
break;
+ case Attribute::Captures:
+ ASSERT_EQ(Res->getCaptureInfo(),
+ CaptureInfo(CaptureComponents::AddressIsNull,
+ CaptureComponents::ReadProvenance));
+ break;
default:
ASSERT_FALSE(true);
}