about summary refs log tree commit diff
path: root/src/test/codegen/align-struct.rs
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-71/+0
2022-05-25Update some codegen tests for opaque pointersNikita Popov-3/+2
2022-05-09fix codegen test failureRalf Jung-1/+1
2021-08-04Remove 0-sized paddings from field loyout tests.Hans Kratz-5/+5
2021-04-03Remove redundant `ignore-tidy-linelength` annotationsSimon Jakobi-1/+1
This is step 2 towards fixing #77548. In the codegen and codegen-units test suites, the `//` comment markers were kept in order not to affect any source locations. This is because these tests cannot be automatically `--bless`ed.
2020-05-16Disable MIR optimization for alignment codegen testsDylan MacKenzie-1/+1
NRVO optimizes away the locals whose alignment is tested. I don't think this affects the purpose of the test.
2019-12-02Update the minimum external LLVM to 7Josh Stone-1/+0
LLVM 7 is over a year old, which should be plenty for compatibility. The last LLVM 6 holdout was llvm-emscripten, which went away in #65501. I've also included a fix for LLVM 8 lacking `MemorySanitizerOptions`, which was broken by #66522.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-09-24Rely only on base alignment and offset for computing field alignmentColin Pronovost-0/+10
Fix #54028
2018-07-10Upgrade to LLVM's master branch (LLVM 7)Alex Crichton-1/+2
This commit upgrades the main LLVM submodule to LLVM's current master branch. The LLD submodule is updated in tandem as well as compiler-builtins. Along the way support was also added for LLVM 7's new features. This primarily includes the support for custom section concatenation natively in LLD so we now add wasm custom sections in LLVM IR rather than having custom support in rustc itself for doing so. Some other miscellaneous changes are: * We now pass `--gc-sections` to `wasm-ld` * The optimization level is now passed to `wasm-ld` * A `--stack-first` option is passed to LLD to have stack overflow always cause a trap instead of corrupting static data * The wasm target for LLVM switched to `wasm32-unknown-unknown`. * The syntax for aligned pointers has changed in LLVM IR and tests are updated to reflect this. * The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug] Nowadays we've been mostly only upgrading whenever there's a major release of LLVM but enough changes have been happening on the wasm target that there's been growing motivation for quite some time now to upgrade out version of LLD. To upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet another version of LLVM on the builders. The revision of LLVM in use here is arbitrarily chosen. We will likely need to continue to update it over time if and when we discover bugs. Once LLVM 7 is fully released we can switch to that channel as well. [llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382
2018-04-26Use ScalarPair for tagged enumsAnthony Ramine-2/+1
2018-01-23Stabilized `#[repr(align(x))]` attribute (RFC 1358)Cameron Hart-3/+0
2017-12-26rustc: don't use union layouts for tagged union enums.Eduard-Mihai Burtescu-2/+3
2017-12-15rustc_trans: approximate ABI alignment for padding/union fillers.Eduard-Mihai Burtescu-0/+20
2017-10-26Avoid unnecessary copies of arguments that are simple bindingsBjörn Steinbrink-2/+0
Initially MIR differentiated between arguments and locals, which introduced a need to add extra copies assigning the argument to a local, even for simple bindings. This differentiation no longer exists, but we're still creating those copies, bloating the MIR and LLVM IR we emit. Additionally, the current approach means that we create debug info for both the incoming argument (marking it as an argument), and then immediately shadow it a local that goes by the same name. This can be confusing when using e.g. "info args" in gdb, or when e.g. a debugger with a GUI displays the function arguments separately from the local variables, especially when the binding is mutable, because the argument doesn't change, while the local variable does.
2017-05-01Add simple `[repr(align)]` codegen test.Cameron Hart-0/+57
Checks alloca and memcpy are aligned correctly.