mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
IR: Add MDLocation::getTemporary()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226502 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8ec0aee3b4
commit
a7852bfa47
@ -945,6 +945,11 @@ public:
|
||||
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; }
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user