From: Pierre-Emmanuel Patry <[email protected]>

gcc/rust/ChangeLog:

        * util/rust-attribute-values.h: Add "no_builtins"
        attribute value.
        * util/rust-attributes.cc: Add "no_builtins" to
        the list of builtin attributes.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
---
 gcc/rust/util/rust-attribute-values.h | 1 +
 gcc/rust/util/rust-attributes.cc      | 1 +
 2 files changed, 2 insertions(+)

diff --git a/gcc/rust/util/rust-attribute-values.h 
b/gcc/rust/util/rust-attribute-values.h
index 7743d9091c8..a9e07bf015e 100644
--- a/gcc/rust/util/rust-attribute-values.h
+++ b/gcc/rust/util/rust-attribute-values.h
@@ -83,6 +83,7 @@ public:
     = "rustc_layout_scalar_valid_range_start";
 
   static constexpr auto &COMPILER_BUILTINS = "compiler_builtins";
+  static constexpr auto &NO_BUILTINS = "no_builtins";
 
   static constexpr auto &MAY_DANGLE = "may_dangle";
   static constexpr auto &PRELUDE_IMPORT = "prelude_import";
diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc
index cc898971eb9..7c137d06b98 100644
--- a/gcc/rust/util/rust-attributes.cc
+++ b/gcc/rust/util/rust-attributes.cc
@@ -123,6 +123,7 @@ static const BuiltinAttrDefinition __definitions[]
      // TODO: be careful about calling functions marked with this?
      {Attrs::RUSTC_ARGS_REQUIRED_CONST, CODE_GENERATION},
      {Attrs::COMPILER_BUILTINS, CODE_GENERATION},
+     {Attrs::NO_BUILTINS, CODE_GENERATION},
      {Attrs::PRELUDE_IMPORT, NAME_RESOLUTION},
      {Attrs::RUSTC_DIAGNOSTIC_ITEM, STATIC_ANALYSIS},
      {Attrs::RUSTC_ON_UNIMPLEMENTED, STATIC_ANALYSIS},
-- 
2.50.1

Reply via email to