Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add const_ptr lang item mappings #1008

Merged
merged 1 commit into from
Mar 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions gcc/rust/util/rust-lang-item.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ class RustLangItem
RANGE_INCLUSIVE,
RANGE_TO_INCLUSIVE,

// https://github.com/rust-lang/rust/blob/master/library/core/src/ptr/const_ptr.rs
CONST_PTR,

UNKNOWN,
};

Expand Down Expand Up @@ -201,6 +204,10 @@ class RustLangItem
{
return ItemType::RANGE_TO_INCLUSIVE;
}
else if (item.compare ("const_ptr") == 0)
{
return ItemType::CONST_PTR;
}

return ItemType::UNKNOWN;
}
Expand Down Expand Up @@ -273,6 +280,8 @@ class RustLangItem
return "RangeInclusive";
case RANGE_TO_INCLUSIVE:
return "RangeToInclusive";
case CONST_PTR:
return "const_ptr";

case UNKNOWN:
return "<UNKNOWN>";
Expand Down