-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
proc_macro: Remode function indirection
There was no need to register a function when the value could be registered directly. gcc/rust/ChangeLog: * expand/rust-proc-macro.cc (available): Remove function. (load_macros_array): There was no need for an indirection here. ChangeLog: * libgrust/libproc_macro/proc_macro.cc (not_available): Remove function. * libgrust/libproc_macro/proc_macro.h (not_available): Remove function prototype. * libgrust/libproc_macro/registration.h: Change symbol type. * libgrust/libproc_macro/bridge.h: New file. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
- Loading branch information
Showing
5 changed files
with
44 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (C) 2023 Free Software Foundation, Inc. | ||
// | ||
// This file is part of the GNU Proc Macro Library. This library is free | ||
// software; you can redistribute it and/or modify it under the | ||
// terms of the GNU General Public License as published by the | ||
// Free Software Foundation; either version 3, or (at your option) | ||
// any later version. | ||
|
||
// This library is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// Under Section 7 of GPL version 3, you are granted additional | ||
// permissions described in the GCC Runtime Library Exception, version | ||
// 3.1, as published by the Free Software Foundation. | ||
|
||
// You should have received a copy of the GNU General Public License and | ||
// a copy of the GCC Runtime Library Exception along with this program; | ||
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
// <http://www.gnu.org/licenses/>. | ||
#ifndef BRIDGE_H | ||
#define BRIDGE_H | ||
|
||
namespace ProcMacro { | ||
|
||
enum class BridgeState | ||
{ | ||
Available, | ||
Unavailable, | ||
}; | ||
|
||
} | ||
|
||
#endif /* ! BRIDGE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters