mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-17 00:58:40 +00:00
This adds names for more LLVM IR entries. For now, `var` is just a placeholder due to the difficulty of associating a name, but the rest reasonably reflect intent. I'm trying to comment logic for this because I suspect we'll want to make it more conditional later. Even though chandlerc noted the expectation that IRBuilder would have a way to disable them in output, that's fine for things like anonymous names; other places they'll still take extra work to calculate. e.g., as with struct fields where the type's fields are only fetched to print a name, not otherwise needed for the gep.
16 lines
490 B
Plaintext
16 lines
490 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
|
|
// CHECK:STDOUT: ; ModuleID = 'params_zero.carbon'
|
|
// CHECK:STDOUT: source_filename = "params_zero.carbon"
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: %EmptyTuple = type {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: define %EmptyTuple @Foo() {
|
|
// CHECK:STDOUT: entry:
|
|
// CHECK:STDOUT: }
|
|
|
|
fn Foo() {}
|