mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 11:01:05 +01:00
Instructions created by splices during conversion are now evaluated, as are instructions created in cases where we first create a placeholder instruction and later replace it by a different instruction. This also removes the ability to set a parse node and instruction independently after creating an `InstId`, which could lead to them accidentally not matching.
20 lines
772 B
Plaintext
20 lines
772 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
|
|
//
|
|
// ARGS: -v compile --phase=check %s
|
|
//
|
|
// Only checks a couple statements in order to minimize manual update churn.
|
|
// NOAUTOUPDATE
|
|
// SET-CHECK-SUBSET
|
|
// CHECK:STDERR: Node Push 0: FunctionIntroducer -> <none>
|
|
// CHECK:STDERR: AddPlaceholderInst: {kind: FunctionDecl, arg0: {{.*}}, type: type{{[0-9]+}}}
|
|
// CHECK:STDERR: ReplaceInst: inst+{{[0-9]+}} -> {kind: FunctionDecl, arg0: {{.*}}, type: type{{[0-9]+}}}
|
|
// CHECK:STDERR: inst_block_stack_ Push 1
|
|
// CHECK:STDERR: AddInst: {kind: Return}
|
|
// CHECK:STDERR: inst_block_stack_ Pop 1: block{{[0-9]+}}
|
|
|
|
fn Foo() {
|
|
return;
|
|
}
|