Fangrui Song
03c53c69a3
[MC] Remove UseAssemblerInfoForParsing
...
Commit 6c0665e221
(https://reviews.llvm.org/D45164 ) enabled certain constant expression
evaluation for `MCObjectStreamer` at parse time (e.g. `.if` directives,
see llvm/test/MC/AsmParser/assembler-expressions.s).
`getUseAssemblerInfoForParsing` was added to make `clang -c` handling
inline assembly similar to `MCAsmStreamer` (e.g. `llvm-mc -filetype=asm`),
where such expression folding (related to
`AttemptToFoldSymbolOffsetDifference`) is unavailable.
I believe this is overly conservative. We can make some parse-time
expression folding work for `clang -c` even if `clang -S` would still
report an error, a MCAsmStreamer issue (we cannot print `.if`
directives) that should not restrict the functionality of
MCObjectStreamer.
```
% cat b.cc
asm(R"(
.pushsection .text,"ax"
.globl _start; _start: ret
.if . -_start == 1
ret
.endif
.popsection
)");
% gcc -S b.cc && gcc -c b.cc
% clang -S -fno-integrated-as b.cc # succeeded
% clang -c b.cc # succeeded with this patch
% clang -S b.cc # still failed
<inline asm>:4:5: error: expected absolute expression
4 | .if . -_start == 1
| ^
1 error generated.
```
Close #62520
Link: https://discourse.llvm.org/t/rfc-clang-assembly-object-equivalence-for-files-with-inline-assembly/78841
Pull Request: https://github.com/llvm/llvm-project/pull/91082
2024-05-15 09:18:39 -07:00
..
2024-05-15 11:53:38 +01:00
2024-05-04 18:38:45 +01:00
2023-12-15 12:33:32 +01:00
2024-05-09 13:02:32 +01:00
2024-05-10 10:49:48 +05:30
2024-03-06 09:49:58 -06:00
2024-05-09 11:37:56 -04:00
2024-05-09 06:17:01 -04:00
2023-09-25 09:32:59 -07:00
2023-12-12 14:26:04 +00:00
2024-05-15 09:18:39 -07:00
2024-05-09 13:02:32 +01:00
2024-05-09 13:42:40 +01:00
2024-05-05 13:43:10 -07:00
2024-03-26 11:01:08 +01:00
2024-03-26 11:01:08 +01:00
2023-11-06 12:30:07 +01:00
2024-03-27 17:40:58 -04:00
2024-05-06 08:55:09 +01:00
2024-05-03 15:01:47 +01:00
2023-11-30 13:18:51 -06:00
2024-03-01 21:41:12 +05:30
2024-01-24 13:43:07 +01:00
2024-02-29 13:57:59 +01:00
2024-02-23 21:14:38 -05:00
2024-02-23 21:14:38 -05:00
2024-05-09 13:02:32 +01:00
2024-05-11 09:18:05 +02:00
2024-02-27 18:04:59 -08:00
2024-02-27 18:04:59 -08:00
2024-01-24 00:27:37 -08:00
2024-05-03 09:38:51 +01:00
2024-05-09 16:50:01 -07:00
2024-04-24 09:43:54 -04:00
2024-03-13 12:08:39 +00:00
2024-05-09 11:37:28 +01:00
2024-02-15 12:11:51 -05:00
2024-05-09 11:37:28 +01:00
2024-02-15 12:11:51 -05:00
2024-05-10 14:33:47 -07:00
2024-05-07 21:43:22 +02:00
2024-01-19 15:30:07 +00:00
2024-05-05 13:43:10 -07:00
2024-03-23 13:12:44 +01:00
2024-04-18 15:44:12 +09:00
2023-12-11 21:01:36 -08:00
2024-04-04 14:59:01 +01:00
2024-02-12 22:33:29 -08:00
2024-01-21 11:54:47 -05:00
2024-05-10 10:49:48 +05:30
2024-03-01 19:15:42 +05:30
2024-01-04 19:05:12 +05:30
2024-01-04 19:05:12 +05:30
2023-11-20 12:13:09 +00:00
2024-01-18 09:36:44 +01:00
2023-11-07 17:26:26 +01:00
2024-03-22 08:49:29 +08:00
2024-05-06 08:55:09 +01:00
2024-02-21 11:45:36 +00:00
2024-05-03 15:01:47 +01:00
2024-03-19 16:36:29 +00:00
2024-04-12 09:34:46 -04:00
2024-05-03 15:01:47 +01:00
2024-04-25 17:50:59 -07:00
2024-01-09 11:53:12 +00:00
2023-12-28 11:48:25 +00:00
2024-02-12 10:18:20 +01:00
2024-01-25 21:32:37 -08:00
2024-01-25 21:32:37 -08:00
2023-11-11 12:32:15 -08:00
2024-01-02 13:42:56 +05:30
2024-03-25 16:55:22 -07:00
2024-05-09 13:02:32 +01:00
2024-03-12 10:30:39 -07:00
2024-04-17 08:50:14 +02:00
2024-03-06 12:19:32 +05:30
2023-12-11 21:01:36 -08:00
2024-04-09 16:36:08 +01:00
2024-04-24 10:51:18 +01:00
2024-01-02 13:42:56 +05:30
2024-05-09 11:37:56 -04:00
2024-03-06 09:49:58 -06:00
2024-04-03 11:35:09 -07:00
2024-05-09 11:37:56 -04:00
2024-05-10 15:04:38 +01:00
2024-05-09 11:37:56 -04:00
2024-04-16 10:14:15 +01:00
2024-05-02 12:03:51 -07:00
2024-05-01 16:04:35 +01:00
2024-03-10 20:00:13 -07:00
2024-02-26 12:19:52 -08:00
2024-01-17 15:22:48 +00:00
2024-02-14 15:19:04 +01:00
2024-02-26 12:19:52 -08:00
2024-02-26 12:19:52 -08:00
2023-11-16 16:56:46 +01:00
2024-03-25 13:11:58 -07:00
2024-01-26 12:04:58 +01:00
2024-05-09 11:37:28 +01:00
2023-12-12 11:38:24 +01:00
2024-05-10 15:04:38 +01:00
2024-02-20 11:37:44 +00:00
2024-04-24 14:24:14 +01:00
2023-11-14 18:49:21 +01:00
2024-01-14 00:53:29 -08:00
2023-12-11 21:01:36 -08:00
2024-01-30 22:12:07 -08:00
2024-02-01 09:50:44 -08:00
2024-02-01 09:50:44 -08:00
2023-11-22 08:52:53 +00:00
2024-05-02 12:59:31 +02:00
2024-05-07 07:38:58 -04:00
2024-04-24 14:24:14 +01:00
2024-05-07 16:44:00 -04:00
2024-05-01 08:16:55 -07:00
2024-02-09 09:57:38 +01:00
2024-03-06 17:40:13 +00:00
2024-05-01 11:37:57 +01:00
2024-02-16 13:32:59 -05:00
2024-05-10 13:02:05 +02:00
2024-05-01 11:37:13 +01:00
2024-05-09 11:37:56 -04:00
2024-05-13 14:53:26 -07:00
2024-05-15 13:10:16 +01:00
2024-05-06 09:09:19 +02:00
2023-11-06 12:30:07 +01:00
2024-05-02 21:01:51 +01:00
2024-02-05 14:07:01 +01:00
2024-02-05 14:07:01 +01:00
2024-04-18 09:34:27 -05:00
2024-04-29 11:57:06 +01:00
2024-05-03 13:42:40 +01:00
2024-03-10 20:00:13 -07:00
2024-03-06 16:33:52 +01:00
2024-05-03 19:47:15 +02:00
2024-05-06 09:09:19 +02:00
2024-05-06 09:09:19 +02:00
2024-03-08 19:05:00 +05:30
2024-04-24 14:24:14 +01:00
2024-03-06 10:38:20 +01:00
2024-03-11 15:35:05 +00:00
2024-04-24 14:24:14 +01:00
2024-05-09 13:02:32 +01:00
2024-05-11 09:18:05 +02:00
2024-04-24 14:24:14 +01:00
2023-11-24 14:43:18 +01:00
2024-05-13 10:20:37 +05:30
2024-03-06 09:36:01 +05:30
2024-04-24 14:24:14 +01:00
2024-04-24 14:24:14 +01:00
2024-05-09 11:37:56 -04:00
2024-05-09 11:37:56 -04:00
2024-04-01 09:48:37 +08:00
2024-05-14 18:29:16 -04:00
2024-05-09 11:37:56 -04:00
2024-04-26 13:02:57 -07:00
2024-05-09 11:37:56 -04:00
2024-05-09 11:37:56 -04:00
2023-12-12 11:38:24 +01:00
2024-05-09 11:37:56 -04:00