summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/IR/MetadataTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/IR/MetadataTest.cpp')
-rw-r--r--llvm/unittests/IR/MetadataTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/unittests/IR/MetadataTest.cpp b/llvm/unittests/IR/MetadataTest.cpp
index 9515f0de4ff..498728e3cac 100644
--- a/llvm/unittests/IR/MetadataTest.cpp
+++ b/llvm/unittests/IR/MetadataTest.cpp
@@ -483,6 +483,14 @@ TEST_F(MDLocationTest, getDistinct) {
EXPECT_EQ(L1, MDLocation::get(Context, 2, 7, N));
}
+TEST_F(MDLocationTest, getTemporary) {
+ MDNode *N = MDNode::get(Context, None);
+ MDLocation *L = MDLocation::getTemporary(Context, 2, 7, N);
+ EXPECT_TRUE(L->isTemporary());
+ EXPECT_FALSE(L->isResolved());
+ MDNode::deleteTemporary(L);
+}
+
typedef MetadataTest MetadataAsValueTest;
TEST_F(MetadataAsValueTest, MDNode) {
OpenPOWER on IntegriCloud