diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-19 20:37:44 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-19 20:37:44 +0000 |
| commit | 799e56a9ae40adb682d7cd2b9a69e0e3a2802977 (patch) | |
| tree | 0de4c06ec2fecc5973bc4f3ed8e26cc98df41d5e /llvm/unittests/IR/MetadataTest.cpp | |
| parent | 946fdcc50cbda9cc30bb78f6c71aa49f3c3ae7ae (diff) | |
| download | bcm5719-llvm-799e56a9ae40adb682d7cd2b9a69e0e3a2802977.tar.gz bcm5719-llvm-799e56a9ae40adb682d7cd2b9a69e0e3a2802977.zip | |
IR: Add MDLocation::getTemporary()
llvm-svn: 226502
Diffstat (limited to 'llvm/unittests/IR/MetadataTest.cpp')
| -rw-r--r-- | llvm/unittests/IR/MetadataTest.cpp | 8 |
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) { |

