Fangrui Song
0665669876
[Sema] Mark alias/ifunc targets used and consider mangled names
...
https://reviews.llvm.org/D54188 marked "alias" targets as used in C to
fix -Wunused false positives. This patch extends the approach to handle
mangled names to support global scope names in C++ and the
`overloadable` attribute in C.
(Note: we should skip `UsingShadowDecl`, which would trigger an
assertion failure in `ItaniumMangleContextImpl::mangleCXXName`.
See regression test added by commit 1c2afbae9af22b58190c10e3517242d01d89d612.)
In addition, we mark ifunc targets as used to fix #63957 (temporarily
used by xz; ifunc was removed by
689ae24273 )
While our approach has false negatives for namespace scope names, the
majority of alias/ifunc C++ uses (global scope with no overloads) are
handled.
Note: The following function with internal linkage but C language
linkage type is mangled in Clang but not in GCC. This inconsistency
makes alias/ifunc difficult to use in C++ with portability (#88593 ).
```
extern "C" {
static void f0() {}
// GCC: void g0() __attribute__((alias("_ZL2f0v")));
// Clang: void g0() __attribute__((alias("f0")));
}
```
Pull Request: https://github.com/llvm/llvm-project/pull/87130
2024-04-16 11:49:25 -07:00
..
2023-12-06 15:27:27 -08:00
2023-08-10 08:02:32 +08:00
2024-04-16 19:31:16 +02:00
2020-06-21 13:59:11 +01:00
2021-03-23 13:15:19 -04:00
2023-02-13 19:26:11 +00:00
2024-01-29 19:17:13 +08:00
2022-08-12 00:05:59 +01:00
2023-10-24 14:02:51 +01:00
2023-10-26 19:28:28 +01:00
2021-10-21 11:34:43 -07:00
2021-10-21 11:34:43 -07:00
2023-10-26 19:28:28 +01:00
2020-07-08 16:39:11 +01:00
2023-10-26 19:28:28 +01:00
2020-07-08 16:39:11 +01:00
2020-06-21 13:59:11 +01:00
2021-12-31 01:30:39 +01:00
2023-08-28 06:34:57 +02:00
2024-04-16 11:49:25 -07:00
2023-02-10 19:11:31 +00:00
2023-10-26 19:28:28 +01:00
2023-07-22 09:34:15 -07:00
2023-05-08 07:41:27 -07:00
2023-07-22 09:34:15 -07:00
2021-10-21 11:34:43 -07:00
2022-02-10 20:39:20 -06:00
2022-05-13 13:48:46 +02:00
2024-03-14 10:09:47 +08:00
2022-07-21 09:17:01 +01:00
2021-05-20 17:04:29 -04:00
2024-01-24 12:11:00 +01:00
2024-04-14 12:30:01 +02:00
2022-02-10 20:39:20 -06:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2020-06-21 13:59:11 +01:00
2022-02-24 15:30:30 -05:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2022-04-04 18:48:30 -07:00
2021-06-10 14:51:08 +02:00
2024-04-12 22:39:40 +08:00
2023-08-16 10:22:16 +02:00
2024-04-12 22:39:40 +08:00
2024-04-12 22:39:40 +08:00
2022-02-10 20:39:20 -06:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2022-10-31 19:34:23 +01:00
2024-04-12 22:39:40 +08:00
2023-10-26 19:28:28 +01:00
2022-02-10 20:39:20 -06:00
2022-03-21 13:39:44 -04:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2023-05-04 19:19:52 +02:00
2021-06-10 10:18:52 +01:00
2024-01-17 12:11:16 +01:00
2024-03-28 09:13:26 +01:00
2020-07-02 14:13:35 +01:00
2023-10-26 19:28:28 +01:00
2023-03-24 17:35:35 +03:00
2022-02-10 20:39:20 -06:00
2021-01-22 11:43:58 -05:00
2020-06-21 13:59:11 +01:00
2022-11-24 12:44:35 +00:00
2023-10-26 19:28:28 +01:00
2020-08-07 09:58:23 -04:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-09-04 05:29:32 +00:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2023-09-05 18:15:06 +02:00
2022-02-09 09:11:49 -05:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2021-10-27 21:04:32 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2021-02-22 14:16:43 -08:00
2021-02-22 14:16:43 -08:00
2021-02-22 14:16:43 -08:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2021-02-22 14:16:43 -08:00
2022-02-09 09:11:49 -05:00
2023-06-15 12:41:09 +05:30
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2023-10-26 19:28:28 +01:00
2024-02-03 00:09:07 +01:00
2020-06-19 13:40:20 +01:00
2021-10-05 07:59:32 -05:00
2022-07-03 17:06:26 +07:00
2022-10-31 19:34:23 +01:00
2020-06-19 13:40:20 +01:00
2023-10-26 19:28:28 +01:00
2021-10-21 11:34:43 -07:00
2023-10-26 19:28:28 +01:00
2023-07-11 09:14:27 +02:00
2023-10-26 19:28:28 +01:00
2023-07-24 18:32:46 +08:00
2024-01-15 09:41:32 +00:00
2020-06-19 13:40:20 +01:00
2024-01-31 15:27:06 +08:00
2022-02-24 15:30:13 -05:00
2023-10-26 19:28:28 +01:00
2022-02-24 15:30:13 -05:00
2022-09-21 19:37:22 +00:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2023-11-13 16:39:40 -05:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2024-01-27 10:23:38 +01:00
2023-10-26 19:28:28 +01:00
2022-10-31 19:34:23 +01:00
2022-02-10 20:39:20 -06:00
2020-06-19 08:45:46 +02:00
2023-10-26 19:28:28 +01:00
2023-10-04 04:45:46 -05:00
2022-09-04 05:29:32 +00:00
2022-10-12 19:54:51 +02:00
2023-03-16 12:59:26 +01:00
2024-02-23 11:37:30 +01:00
2020-06-19 13:40:20 +01:00
2020-06-19 13:40:20 +01:00
2020-06-19 13:40:20 +01:00
2023-09-21 13:28:04 -07:00
2023-09-07 13:35:50 -07:00
2023-09-07 13:35:50 -07:00
2022-02-09 09:11:49 -05:00
2024-04-14 12:30:01 +02:00
2022-02-09 09:11:49 -05:00
2022-07-03 17:06:26 +07:00
2021-10-15 16:23:04 +00:00
2024-04-09 07:26:48 +00:00
2024-04-09 07:26:48 +00:00
2024-03-11 18:47:30 +00:00
2023-09-07 13:35:50 -07:00
2023-06-07 10:57:31 -04:00
2021-08-13 13:20:11 +03:00
2022-03-16 11:10:32 +01:00
2020-07-16 12:50:25 +02:00
2021-10-21 11:34:43 -07:00
2023-07-22 09:34:15 -07:00
2024-04-09 07:26:48 +00:00
2021-11-19 13:00:26 -08:00
2020-09-16 17:54:57 +00:00
2020-09-15 20:15:34 +00:00
2020-09-15 20:15:34 +00:00
2020-09-24 15:17:35 +00:00
2020-09-25 22:33:53 +00:00
2022-02-09 09:11:49 -05:00
2022-12-27 19:18:07 +00:00
2022-03-14 09:24:19 -04:00
2020-06-21 13:59:11 +01:00
2020-06-21 13:59:11 +01:00
2022-08-26 00:52:52 +03:00
2022-10-26 22:00:49 +00:00
2022-11-17 12:05:28 +07:00
2020-09-26 17:59:39 +07:00
2022-03-03 06:33:49 -08:00
2023-08-10 08:02:32 +08:00
2024-03-11 10:00:00 +08:00
2022-05-17 08:13:37 -04:00
2022-10-15 22:08:36 +02:00
2023-02-03 13:47:13 +01:00
2023-07-21 23:16:51 -04:00
2022-02-09 09:11:49 -05:00
2020-06-21 13:59:11 +01:00
2022-10-31 19:34:23 +01:00
2024-02-06 15:57:15 -08:00
2023-10-26 19:28:28 +01:00
2023-05-23 08:29:52 +02:00
2022-02-09 09:11:49 -05:00
2022-02-22 16:27:32 +01:00
2022-06-15 11:58:26 +02:00
2022-01-10 10:38:27 +01:00
2024-02-06 21:49:13 +01:00
2022-02-10 20:39:20 -06:00
2022-02-10 20:39:20 -06:00
2020-06-21 13:59:11 +01:00
2020-06-21 13:59:11 +01:00
2023-09-29 19:12:49 +02:00
2023-10-26 19:28:28 +01:00
2022-06-19 00:30:37 +03:00
2020-07-06 22:03:08 +01:00
2021-10-21 11:34:43 -07:00
2022-02-09 09:11:49 -05:00
2022-03-18 12:20:41 +00:00
2022-03-18 12:20:41 +00:00
2020-06-21 13:59:11 +01:00
2020-07-16 12:07:18 -07:00
2023-10-26 19:28:28 +01:00
2020-06-21 13:59:11 +01:00
2020-06-21 13:59:11 +01:00