mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-12-01 02:01:39 +00:00
Add a dereferenceable attribute
This attribute indicates that the parameter or return pointer is dereferenceable. Practically speaking, loads from such a pointer within the associated byte range are safe to speculatively execute. Such pointer parameters are common in source languages (C++ references, for example). llvm-svn: 213385
This commit is contained in:
1 parent
9cf7ac7589
commit
b0407ba071
22 files changed
+388
-18
No files matched your search
@@ -201,6 +201,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) {
|
||||
return bitc::ATTR_KIND_NON_LAZY_BIND;
|
||||
case Attribute::NonNull:
|
||||
return bitc::ATTR_KIND_NON_NULL;
|
||||
case Attribute::Dereferenceable:
|
||||
return bitc::ATTR_KIND_DEREFERENCEABLE;
|
||||
case Attribute::NoRedZone:
|
||||
return bitc::ATTR_KIND_NO_RED_ZONE;
|
||||
case Attribute::NoReturn:
|
||||
|
||||
Reference in new issue
Block a user