]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bpf: Delayed the removal of the parser enum plugin handler.
authorCupertino Miranda <cupertino.miranda@oracle.com>
Wed, 8 Nov 2023 18:23:22 +0000 (18:23 +0000)
committerCupertino Miranda <cupertino.miranda@oracle.com>
Tue, 28 Nov 2023 12:28:39 +0000 (12:28 +0000)
The parser plugin handler that is responsible for collecting enum values
information was being removed way too early.
bpf_resolve_overloaded_core_builtin is called by the parser.
It was moved to the function execute_lower_bpf_core.

gcc/ChangeLog:
* config/bpf/core-builtins.cc
(bpf_resolve_overloaded_core_builtin): Removed call.
(execute_lower_bpf_core): Added all to remove_parser_plugin.

gcc/config/bpf/core-builtins.cc

index a224847d5d91b4e9dc118aafb44ecf1e22970721..2ba78d7aed2e8db006473aafafd294b8f48cb09b 100644 (file)
@@ -1473,8 +1473,6 @@ tree
 bpf_resolve_overloaded_core_builtin (location_t loc, tree fndecl,
                                     void *arglist)
 {
-  remove_parser_plugin ();
-
   if (!bpf_require_core_support ())
     return error_mark_node;
 
@@ -1688,6 +1686,7 @@ make_gimple_core_safe_access_index (tree *tp,
 static unsigned int
 execute_lower_bpf_core (void)
 {
+  remove_parser_plugin ();
   if (!TARGET_BPF_CORE)
     return 0;