aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-04-11 08:43:48 +0000
committerGitHub <noreply@github.com>2022-04-11 08:43:48 +0000
commite5281ee490ad9edafbde2c7d301c77130c0b4147 (patch)
treef6239fc58dd91c90d7af3345504ff9797e66d5f1 /gcc
parente43a5c5373b341d217d2f5403f31f5174b8c4e2f (diff)
parent595eb9c4118f95a1f3723187b095e97210fc13ea (diff)
downloadgcc-e5281ee490ad9edafbde2c7d301c77130c0b4147.zip
gcc-e5281ee490ad9edafbde2c7d301c77130c0b4147.tar.gz
gcc-e5281ee490ad9edafbde2c7d301c77130c0b4147.tar.bz2
Merge #1100
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>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/util/rust-lang-item.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h
index d2765bf..5f5d435 100644
--- a/gcc/rust/util/rust-lang-item.h
+++ b/gcc/rust/util/rust-lang-item.h
@@ -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>";