1100: Add known lang item const_slice_ptr mappings r=philberty a=philberty

This will allow us to define the const_slice_ptr lang item attribute
without erroring out as an unknown lang item.

Addresses #849 

Co-authored-by: Philip Herron <philip.herron@embecosm.com>
This commit is contained in:
bors[bot] 2022-04-11 08:43:48 +00:00 committed by GitHub
commit e5281ee490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -70,6 +70,7 @@ public:
// https://github.com/rust-lang/rust/blob/master/library/core/src/ptr/const_ptr.rs
CONST_PTR,
CONST_SLICE_PTR,
UNKNOWN,
};
@ -208,6 +209,10 @@ public:
{
return ItemType::CONST_PTR;
}
else if (item.compare ("const_slice_ptr") == 0)
{
return ItemType::CONST_SLICE_PTR;
}
return ItemType::UNKNOWN;
}
@ -282,6 +287,8 @@ public:
return "RangeToInclusive";
case CONST_PTR:
return "const_ptr";
case CONST_SLICE_PTR:
return "const_slice_ptr";
case UNKNOWN:
return "<UNKNOWN>";