diff options
| author | bors <bors@rust-lang.org> | 2022-04-16 04:46:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-04-16 04:46:01 +0000 |
| commit | 5cf2920ef30457067bc024afa6499f7e15014bba (patch) | |
| tree | 2eef6377efa7f0726d98b633ae883a42a4c465a7 /tests/rustdoc-js-std/parser-errors.js | |
| parent | 3d5dc413840d0a6706a99d8926fa9b48d110dc17 (diff) | |
| parent | 0de314b3b3d7ac30edfa2bdd6627683d6a19e694 (diff) | |
| download | rust-5cf2920ef30457067bc024afa6499f7e15014bba.tar.gz rust-5cf2920ef30457067bc024afa6499f7e15014bba.zip | |
Auto merge of #94468 - Amanieu:global_asm_sym, r=nagisa
Implement sym operands for global_asm! Tracking issue: #93333 This PR is pretty much a complete rewrite of `sym` operand support for inline assembly so that the same implementation can be shared by `asm!` and `global_asm!`. The main changes are: - At the AST level, `sym` is represented as a special `InlineAsmSym` AST node containing a path instead of an `Expr`. - At the HIR level, `sym` is split into `SymStatic` and `SymFn` depending on whether the path resolves to a static during AST lowering (defaults to `SynFn` if `get_early_res` fails). - `SymFn` is just an `AnonConst`. It runs through typeck and we just collect the resulting type at the end. An error is emitted if the type is not a `FnDef`. - `SymStatic` directly holds a path and the `DefId` of the `static` that it is pointing to. - The representation at the MIR level is mostly unchanged. There is a minor change to THIR where `SymFn` is a constant instead of an expression. - At the codegen level we need to apply the target's symbol mangling to the result of `tcx.symbol_name()` depending on the target. This is done by calling the LLVM name mangler, which handles all of the details. - On Mach-O, all symbols have a leading underscore. - On x86 Windows, different mangling is used for cdecl, stdcall, fastcall and vectorcall. - No mangling is needed on other platforms. r? `@nagisa` cc `@eddyb`
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions
