Files
carbon-lang/toolchain/lowering/testdata/struct/empty.carbon
T
Richard Smith abed195c87 Use memcpy for memory-to-memory assignment. (#3147)
For types using a pointer value representation, emit an `llvm.memcpy`
call to perform assignment rather performing a first-class aggregate
load and store.
2023-08-24 20:25:35 +00:00

25 lines
756 B
Plaintext

// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// AUTOUPDATE
fn Run() -> i32 {
var x: {} = {};
var y: {} = x;
return 0;
}
// CHECK:STDOUT: ; ModuleID = 'empty.carbon'
// CHECK:STDOUT: source_filename = "empty.carbon"
// CHECK:STDOUT:
// CHECK:STDOUT: define i32 @Run() {
// CHECK:STDOUT: %struct = alloca {}, align 8
// CHECK:STDOUT: %x = alloca {}, align 8
// CHECK:STDOUT: %struct1 = alloca {}, align 8
// CHECK:STDOUT: %struct2 = alloca {}, align 8
// CHECK:STDOUT: %y = alloca {}, align 8
// CHECK:STDOUT: %1 = load {}, ptr %x, align 1
// CHECK:STDOUT: ret i32 0
// CHECK:STDOUT: }