mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-01 19:35:54 +01:00
This unifies `dump-tokens` and `dump-parse-tree` so that we don't keep writing basically the same code repeatedly. I'll need to modify the output of SemanticsIR::Print more, and may soon unify printing multiple IRs this way (particularly including the builtins SemanticsIR) but this is intended to offer a starting point. I may eventually try to unify lit.cfg.py files, but I was thinking about whether that works in various contexts we may run in and eventually decided copying the driver/testdata/lit.cfg.py file would be the easiest solution.
13 lines
435 B
Plaintext
13 lines
435 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
|
|
//
|
|
// RUN: %{carbon} dump semantics-ir %s 2>&1 | \
|
|
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s
|
|
// CHECK: Function(%0, {IntegerLiteral(%1, 0), Return(%1)})
|
|
// CHECK: SetName(`Main`, %0)
|
|
|
|
fn Main() {
|
|
return 0;
|
|
}
|