Metadata *InlinedAt = nullptr) {
return getImpl(Context, Line, Column, Scope, InlinedAt, Distinct);
}
+ static MDLocation *getTemporary(LLVMContext &Context, unsigned Line,
+ unsigned Column, Metadata *Scope,
+ Metadata *InlinedAt = nullptr) {
+ return getImpl(Context, Line, Column, Scope, InlinedAt, Temporary);
+ }
unsigned getLine() const { return MDNodeSubclassData; }
unsigned getColumn() const { return SubclassData16; }
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) {