From e6061f6910c3d4f26ae97f93f8e159fa62c295c7 Mon Sep 17 00:00:00 2001 From: Jon Ross-Perkins Date: Thu, 2 May 2024 16:29:43 -0700 Subject: [PATCH] Update LLVM (#3932) Fixes #3136, wherein the clangd patch is upstreamed so we don't need to apply it anymore. Updates goldens relative to a yaml output change in LLVM. --- MODULE.bazel | 7 +- MODULE.bazel.lock | 24 ++--- .../0003_Add_library_for_clangd.patch | 77 --------------- language_server/BUILD | 2 +- .../testdata/basics/builtin_insts.carbon | 4 +- .../multifile_raw_and_textual_ir.carbon | 20 ++-- .../basics/no_prelude/multifile_raw_ir.carbon | 20 ++-- .../no_prelude/raw_and_textual_ir.carbon | 94 +++++++++---------- .../testdata/basics/no_prelude/raw_ir.carbon | 94 +++++++++---------- 9 files changed, 129 insertions(+), 213 deletions(-) delete mode 100644 bazel/llvm_project/0003_Add_library_for_clangd.patch diff --git a/MODULE.bazel b/MODULE.bazel index af5acca96445..29c2728445d4 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -105,8 +105,8 @@ bazel_dep(name = "zstd", version = "1.5.5.bcr.1", repo_name = "llvm_zstd") # We pin to specific upstream commits and try to track top-of-tree reasonably # closely rather than pinning to a specific release. -# HEAD as of 2024-03-06. -llvm_project_version = "be15a6b3b68bed7b9d982f25b2e10a273302002a" +# HEAD as of 2024-04-30. +llvm_project_version = "a7b968a57834a0e522505b56fab0ca4b979cb68f" # Load a repository for the raw llvm-project, pre-overlay. http_archive( @@ -116,9 +116,8 @@ http_archive( patches = [ "@carbon//bazel/llvm_project:0001_Patch_for_mallinfo2_when_using_Bazel_build_system.patch", "@carbon//bazel/llvm_project:0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch", - "@carbon//bazel/llvm_project:0003_Add_library_for_clangd.patch", ], - sha256 = "1e6cc2eb634438a59fb5e1b87e7bb35883fb680dc2934f431150db22fb3a6c09", + sha256 = "57c598287c774ff0a6919de6bcdf331bb60bb962f8ba74b4ce6a3fc0cb6aaa0c", strip_prefix = "llvm-project-{0}".format(llvm_project_version), urls = ["https://github.com/llvm/llvm-project/archive/{0}.tar.gz".format(llvm_project_version)], ) diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index fc3914d47b0e..80c1585c35a4 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -1,6 +1,6 @@ { "lockFileVersion": 6, - "moduleFileHash": "f747f3ca0f4cd26f15f1bdb5d4e117245377124dbe291fddc28136aa40a927c4", + "moduleFileHash": "93b7acb43f1cabce8291aa0a0f87b56afabbfb021e6625c01be806a93726e716", "flags": { "cmdRegistries": [ "https://bcr.bazel.build/" @@ -68,13 +68,12 @@ ], "patches": [ "@carbon//bazel/llvm_project:0001_Patch_for_mallinfo2_when_using_Bazel_build_system.patch", - "@carbon//bazel/llvm_project:0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch", - "@carbon//bazel/llvm_project:0003_Add_library_for_clangd.patch" + "@carbon//bazel/llvm_project:0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch" ], - "sha256": "1e6cc2eb634438a59fb5e1b87e7bb35883fb680dc2934f431150db22fb3a6c09", - "strip_prefix": "llvm-project-be15a6b3b68bed7b9d982f25b2e10a273302002a", + "sha256": "57c598287c774ff0a6919de6bcdf331bb60bb962f8ba74b4ce6a3fc0cb6aaa0c", + "strip_prefix": "llvm-project-a7b968a57834a0e522505b56fab0ca4b979cb68f", "urls": [ - "https://github.com/llvm/llvm-project/archive/be15a6b3b68bed7b9d982f25b2e10a273302002a.tar.gz" + "https://github.com/llvm/llvm-project/archive/a7b968a57834a0e522505b56fab0ca4b979cb68f.tar.gz" ], "name": "llvm-raw" }, @@ -112,7 +111,7 @@ "usingModule": "", "location": { "file": "@@//:MODULE.bazel", - "line": 127, + "line": 126, "column": 29 }, "imports": { @@ -129,7 +128,7 @@ "usingModule": "", "location": { "file": "@@//:MODULE.bazel", - "line": 139, + "line": 138, "column": 23 }, "imports": { @@ -145,7 +144,7 @@ "devDependency": false, "location": { "file": "@@//:MODULE.bazel", - "line": 140, + "line": 139, "column": 17 } } @@ -1714,7 +1713,7 @@ }, "//bazel/llvm_project:llvm_project.bzl%llvm_project": { "general": { - "bzlTransitiveDigest": "tHgfM+Nmv0eP7sYjIzNwlZ8PBPZsDBwZN0+xb709g6Y=", + "bzlTransitiveDigest": "QG2kkxgw5yvNHGJYbsdwlidT0uFXu5uZMW6KftuXDsI=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -1735,11 +1734,6 @@ "", "llvm-raw", "_main~_repo_rules~llvm-raw" - ], - [ - "_main~_repo_rules~llvm-raw", - "bazel_tools", - "bazel_tools" ] ] } diff --git a/bazel/llvm_project/0003_Add_library_for_clangd.patch b/bazel/llvm_project/0003_Add_library_for_clangd.patch deleted file mode 100644 index 7c53b531916d..000000000000 --- a/bazel/llvm_project/0003_Add_library_for_clangd.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 2625e497fef1429f2041922a739d841050eda909 Mon Sep 17 00:00:00 2001 -From: maan2003 -Date: Sat, 19 Aug 2023 02:32:03 +0530 -Subject: [PATCH] Add library for clangd - -This exports clangd language server protocol helpers publically. -Feature.h needs Feature.inc which is generated during build process, so we -disable all features for now. ---- - clang-tools-extra/clangd/BUILD.bazel | 36 +++++++++++++++++++++++++++ - clang-tools-extra/clangd/Protocol.cpp | 15 +++++++---- - clang-tools-extra/clangd/Protocol.h | 12 +++++++-- - clang-tools-extra/clangd/Transport.h | 1 - - 4 files changed, 56 insertions(+), 8 deletions(-) - create mode 100644 clang-tools-extra/clangd/BUILD.bazel - -diff --git a/clang-tools-extra/clangd/BUILD.bazel b/clang-tools-extra/clangd/BUILD.bazel -new file mode 100644 -index 000000000..9f3f93f24 ---- /dev/null -+++ b/clang-tools-extra/clangd/BUILD.bazel -@@ -0,0 +1,39 @@ -+package(default_visibility = ["//visibility:public"]) -+ -+cc_library( -+ name = "clangd_library", -+ srcs = [ -+ "JSONTransport.cpp", -+ "Protocol.cpp", -+ "URI.cpp", -+ "index/SymbolID.cpp", -+ "support/Logger.cpp", -+ "support/Trace.cpp", -+ "support/MemoryTree.cpp", -+ "support/Context.cpp", -+ "support/Cancellation.cpp", -+ "support/ThreadCrashReporter.cpp", -+ "support/Shutdown.cpp", -+ ], -+ hdrs = [ -+ "Transport.h", -+ "Protocol.h", -+ "URI.h", -+ "LSPBinder.h", -+ "index/SymbolID.h", -+ "support/Function.h", -+ "support/Cancellation.h", -+ "support/ThreadCrashReporter.h", -+ "support/Logger.h", -+ "support/Trace.h", -+ "support/MemoryTree.h", -+ "support/Context.h", -+ "support/Shutdown.h", -+ ], -+ includes = ["."], -+ deps = [ -+ "//llvm:Support", -+ "//clang:basic", -+ "//clang:index", -+ ], -+) -diff --git a/clang-tools-extra/clangd/Transport.h b/clang-tools-extra/clangd/Transport.h -index 4e80ea95b..f17441cfc 100644 ---- a/clang-tools-extra/clangd/Transport.h -+++ b/clang-tools-extra/clangd/Transport.h -@@ -17,9 +17,8 @@ - - #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_TRANSPORT_H - #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_TRANSPORT_H - --#include "Feature.h" - #include "llvm/ADT/StringRef.h" - #include "llvm/Support/JSON.h" - #include "llvm/Support/raw_ostream.h" - --- -2.41.0 diff --git a/language_server/BUILD b/language_server/BUILD index 9a2ffb1e8020..68fd83595f5d 100644 --- a/language_server/BUILD +++ b/language_server/BUILD @@ -29,7 +29,7 @@ cc_binary( "//toolchain/parse:node_kind", "//toolchain/parse:tree", "//toolchain/source:source_buffer", - "@llvm-project//clang-tools-extra/clangd:clangd_library", + "@llvm-project//clang-tools-extra/clangd:ClangDaemon", "@llvm-project//llvm:Support", ], ) diff --git a/toolchain/check/testdata/basics/builtin_insts.carbon b/toolchain/check/testdata/basics/builtin_insts.carbon index cdcb5c832212..2ed1492b50e4 100644 --- a/toolchain/check/testdata/basics/builtin_insts.carbon +++ b/toolchain/check/testdata/basics/builtin_insts.carbon @@ -29,7 +29,7 @@ // CHECK:STDOUT: instBoundMethodType: {kind: Builtin, arg0: BoundMethodType, type: typeTypeType} // CHECK:STDOUT: instNamespaceType: {kind: Builtin, arg0: NamespaceType, type: typeTypeType} // CHECK:STDOUT: instWitnessType: {kind: Builtin, arg0: WitnessType, type: typeTypeType} -// CHECK:STDOUT: inst+0: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type0} +// CHECK:STDOUT: 'inst+0': {kind: Namespace, arg0: name_scope0, arg1: inst, type: type0} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: instTypeType: template instTypeType // CHECK:STDOUT: instError: template instError @@ -41,7 +41,7 @@ // CHECK:STDOUT: instBoundMethodType: template instBoundMethodType // CHECK:STDOUT: instNamespaceType: template instNamespaceType // CHECK:STDOUT: instWitnessType: template instWitnessType -// CHECK:STDOUT: inst+0: template inst+0 +// CHECK:STDOUT: 'inst+0': template inst+0 // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: empty: {} // CHECK:STDOUT: exports: {} diff --git a/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon index 46b5f65fe873..01db165a2c42 100644 --- a/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon @@ -33,12 +33,12 @@ fn B() {} // CHECK:STDOUT: type1: {constant: template instFunctionType, value_rep: {kind: copy, type: type1}} // CHECK:STDOUT: type_blocks: {} // CHECK:STDOUT: insts: -// CHECK:STDOUT: inst+0: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type0} -// CHECK:STDOUT: inst+1: {kind: FunctionDecl, arg0: function0, arg1: empty, type: type1} -// CHECK:STDOUT: inst+2: {kind: Return} +// CHECK:STDOUT: 'inst+0': {kind: Namespace, arg0: name_scope0, arg1: inst, type: type0} +// CHECK:STDOUT: 'inst+1': {kind: FunctionDecl, arg0: function0, arg1: empty, type: type1} +// CHECK:STDOUT: 'inst+2': {kind: Return} // CHECK:STDOUT: constant_values: -// CHECK:STDOUT: inst+0: template inst+0 -// CHECK:STDOUT: inst+1: template inst+1 +// CHECK:STDOUT: 'inst+0': template inst+0 +// CHECK:STDOUT: 'inst+1': template inst+1 // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: empty: {} // CHECK:STDOUT: exports: @@ -80,12 +80,12 @@ fn B() {} // CHECK:STDOUT: type1: {constant: template instFunctionType, value_rep: {kind: copy, type: type1}} // CHECK:STDOUT: type_blocks: {} // CHECK:STDOUT: insts: -// CHECK:STDOUT: inst+0: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type0} -// CHECK:STDOUT: inst+1: {kind: FunctionDecl, arg0: function0, arg1: empty, type: type1} -// CHECK:STDOUT: inst+2: {kind: Return} +// CHECK:STDOUT: 'inst+0': {kind: Namespace, arg0: name_scope0, arg1: inst, type: type0} +// CHECK:STDOUT: 'inst+1': {kind: FunctionDecl, arg0: function0, arg1: empty, type: type1} +// CHECK:STDOUT: 'inst+2': {kind: Return} // CHECK:STDOUT: constant_values: -// CHECK:STDOUT: inst+0: template inst+0 -// CHECK:STDOUT: inst+1: template inst+1 +// CHECK:STDOUT: 'inst+0': template inst+0 +// CHECK:STDOUT: 'inst+1': template inst+1 // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: empty: {} // CHECK:STDOUT: exports: diff --git a/toolchain/check/testdata/basics/no_prelude/multifile_raw_ir.carbon b/toolchain/check/testdata/basics/no_prelude/multifile_raw_ir.carbon index 87466604e2ee..55350ac5ccba 100644 --- a/toolchain/check/testdata/basics/no_prelude/multifile_raw_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/multifile_raw_ir.carbon @@ -33,12 +33,12 @@ fn B() {} // CHECK:STDOUT: type1: {constant: template instFunctionType, value_rep: {kind: copy, type: type1}} // CHECK:STDOUT: type_blocks: {} // CHECK:STDOUT: insts: -// CHECK:STDOUT: inst+0: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type0} -// CHECK:STDOUT: inst+1: {kind: FunctionDecl, arg0: function0, arg1: empty, type: type1} -// CHECK:STDOUT: inst+2: {kind: Return} +// CHECK:STDOUT: 'inst+0': {kind: Namespace, arg0: name_scope0, arg1: inst, type: type0} +// CHECK:STDOUT: 'inst+1': {kind: FunctionDecl, arg0: function0, arg1: empty, type: type1} +// CHECK:STDOUT: 'inst+2': {kind: Return} // CHECK:STDOUT: constant_values: -// CHECK:STDOUT: inst+0: template inst+0 -// CHECK:STDOUT: inst+1: template inst+1 +// CHECK:STDOUT: 'inst+0': template inst+0 +// CHECK:STDOUT: 'inst+1': template inst+1 // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: empty: {} // CHECK:STDOUT: exports: @@ -65,12 +65,12 @@ fn B() {} // CHECK:STDOUT: type1: {constant: template instFunctionType, value_rep: {kind: copy, type: type1}} // CHECK:STDOUT: type_blocks: {} // CHECK:STDOUT: insts: -// CHECK:STDOUT: inst+0: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type0} -// CHECK:STDOUT: inst+1: {kind: FunctionDecl, arg0: function0, arg1: empty, type: type1} -// CHECK:STDOUT: inst+2: {kind: Return} +// CHECK:STDOUT: 'inst+0': {kind: Namespace, arg0: name_scope0, arg1: inst, type: type0} +// CHECK:STDOUT: 'inst+1': {kind: FunctionDecl, arg0: function0, arg1: empty, type: type1} +// CHECK:STDOUT: 'inst+2': {kind: Return} // CHECK:STDOUT: constant_values: -// CHECK:STDOUT: inst+0: template inst+0 -// CHECK:STDOUT: inst+1: template inst+1 +// CHECK:STDOUT: 'inst+0': template inst+0 +// CHECK:STDOUT: 'inst+1': template inst+1 // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: empty: {} // CHECK:STDOUT: exports: diff --git a/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon index fbcb433c275a..49c52212eb35 100644 --- a/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon @@ -48,54 +48,54 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: 0: type1 // CHECK:STDOUT: 1: type1 // CHECK:STDOUT: insts: -// CHECK:STDOUT: inst+0: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type0} -// CHECK:STDOUT: inst+1: {kind: TupleType, arg0: typeBlock0, type: typeTypeType} -// CHECK:STDOUT: inst+2: {kind: TupleLiteral, arg0: empty, type: type1} -// CHECK:STDOUT: inst+3: {kind: Converted, arg0: inst+2, arg1: inst+1, type: typeTypeType} -// CHECK:STDOUT: inst+4: {kind: Param, arg0: name1, type: type1} -// CHECK:STDOUT: inst+5: {kind: BindName, arg0: bindName0, arg1: inst+4, type: type1} -// CHECK:STDOUT: inst+6: {kind: TupleLiteral, arg0: empty, type: type1} -// CHECK:STDOUT: inst+7: {kind: TupleLiteral, arg0: empty, type: type1} -// CHECK:STDOUT: inst+8: {kind: TupleType, arg0: typeBlock4, type: typeTypeType} -// CHECK:STDOUT: inst+9: {kind: TupleLiteral, arg0: block4, type: type2} -// CHECK:STDOUT: inst+10: {kind: Converted, arg0: inst+6, arg1: inst+1, type: typeTypeType} -// CHECK:STDOUT: inst+11: {kind: Converted, arg0: inst+7, arg1: inst+1, type: typeTypeType} -// CHECK:STDOUT: inst+12: {kind: Converted, arg0: inst+9, arg1: inst+8, type: typeTypeType} -// CHECK:STDOUT: inst+13: {kind: VarStorage, arg0: nameReturnSlot, type: type2} -// CHECK:STDOUT: inst+14: {kind: FunctionDecl, arg0: function0, arg1: block5, type: type3} -// CHECK:STDOUT: inst+15: {kind: PointerType, arg0: type2, type: typeTypeType} -// CHECK:STDOUT: inst+16: {kind: NameRef, arg0: name1, arg1: inst+5, type: type1} -// CHECK:STDOUT: inst+17: {kind: TupleLiteral, arg0: empty, type: type1} -// CHECK:STDOUT: inst+18: {kind: TupleLiteral, arg0: block7, type: type2} -// CHECK:STDOUT: inst+19: {kind: TupleAccess, arg0: inst+13, arg1: element0, type: type1} -// CHECK:STDOUT: inst+20: {kind: TupleInit, arg0: block8, arg1: inst+19, type: type1} -// CHECK:STDOUT: inst+21: {kind: TupleValue, arg0: block9, type: type1} -// CHECK:STDOUT: inst+22: {kind: Converted, arg0: inst+16, arg1: inst+20, type: type1} -// CHECK:STDOUT: inst+23: {kind: TupleAccess, arg0: inst+13, arg1: element1, type: type1} -// CHECK:STDOUT: inst+24: {kind: TupleInit, arg0: empty, arg1: inst+23, type: type1} -// CHECK:STDOUT: inst+25: {kind: Converted, arg0: inst+17, arg1: inst+24, type: type1} -// CHECK:STDOUT: inst+26: {kind: TupleInit, arg0: block10, arg1: inst+13, type: type2} -// CHECK:STDOUT: inst+27: {kind: TupleValue, arg0: block12, type: type2} -// CHECK:STDOUT: inst+28: {kind: Converted, arg0: inst+18, arg1: inst+26, type: type2} -// CHECK:STDOUT: inst+29: {kind: ReturnExpr, arg0: inst+28, arg1: inst+13} +// CHECK:STDOUT: 'inst+0': {kind: Namespace, arg0: name_scope0, arg1: inst, type: type0} +// CHECK:STDOUT: 'inst+1': {kind: TupleType, arg0: typeBlock0, type: typeTypeType} +// CHECK:STDOUT: 'inst+2': {kind: TupleLiteral, arg0: empty, type: type1} +// CHECK:STDOUT: 'inst+3': {kind: Converted, arg0: inst+2, arg1: inst+1, type: typeTypeType} +// CHECK:STDOUT: 'inst+4': {kind: Param, arg0: name1, type: type1} +// CHECK:STDOUT: 'inst+5': {kind: BindName, arg0: bindName0, arg1: inst+4, type: type1} +// CHECK:STDOUT: 'inst+6': {kind: TupleLiteral, arg0: empty, type: type1} +// CHECK:STDOUT: 'inst+7': {kind: TupleLiteral, arg0: empty, type: type1} +// CHECK:STDOUT: 'inst+8': {kind: TupleType, arg0: typeBlock4, type: typeTypeType} +// CHECK:STDOUT: 'inst+9': {kind: TupleLiteral, arg0: block4, type: type2} +// CHECK:STDOUT: 'inst+10': {kind: Converted, arg0: inst+6, arg1: inst+1, type: typeTypeType} +// CHECK:STDOUT: 'inst+11': {kind: Converted, arg0: inst+7, arg1: inst+1, type: typeTypeType} +// CHECK:STDOUT: 'inst+12': {kind: Converted, arg0: inst+9, arg1: inst+8, type: typeTypeType} +// CHECK:STDOUT: 'inst+13': {kind: VarStorage, arg0: nameReturnSlot, type: type2} +// CHECK:STDOUT: 'inst+14': {kind: FunctionDecl, arg0: function0, arg1: block5, type: type3} +// CHECK:STDOUT: 'inst+15': {kind: PointerType, arg0: type2, type: typeTypeType} +// CHECK:STDOUT: 'inst+16': {kind: NameRef, arg0: name1, arg1: inst+5, type: type1} +// CHECK:STDOUT: 'inst+17': {kind: TupleLiteral, arg0: empty, type: type1} +// CHECK:STDOUT: 'inst+18': {kind: TupleLiteral, arg0: block7, type: type2} +// CHECK:STDOUT: 'inst+19': {kind: TupleAccess, arg0: inst+13, arg1: element0, type: type1} +// CHECK:STDOUT: 'inst+20': {kind: TupleInit, arg0: block8, arg1: inst+19, type: type1} +// CHECK:STDOUT: 'inst+21': {kind: TupleValue, arg0: block9, type: type1} +// CHECK:STDOUT: 'inst+22': {kind: Converted, arg0: inst+16, arg1: inst+20, type: type1} +// CHECK:STDOUT: 'inst+23': {kind: TupleAccess, arg0: inst+13, arg1: element1, type: type1} +// CHECK:STDOUT: 'inst+24': {kind: TupleInit, arg0: empty, arg1: inst+23, type: type1} +// CHECK:STDOUT: 'inst+25': {kind: Converted, arg0: inst+17, arg1: inst+24, type: type1} +// CHECK:STDOUT: 'inst+26': {kind: TupleInit, arg0: block10, arg1: inst+13, type: type2} +// CHECK:STDOUT: 'inst+27': {kind: TupleValue, arg0: block12, type: type2} +// CHECK:STDOUT: 'inst+28': {kind: Converted, arg0: inst+18, arg1: inst+26, type: type2} +// CHECK:STDOUT: 'inst+29': {kind: ReturnExpr, arg0: inst+28, arg1: inst+13} // CHECK:STDOUT: constant_values: -// CHECK:STDOUT: inst+0: template inst+0 -// CHECK:STDOUT: inst+1: template inst+1 -// CHECK:STDOUT: inst+3: template inst+1 -// CHECK:STDOUT: inst+8: template inst+8 -// CHECK:STDOUT: inst+10: template inst+1 -// CHECK:STDOUT: inst+11: template inst+1 -// CHECK:STDOUT: inst+12: template inst+8 -// CHECK:STDOUT: inst+14: template inst+14 -// CHECK:STDOUT: inst+15: template inst+15 -// CHECK:STDOUT: inst+20: template inst+21 -// CHECK:STDOUT: inst+21: template inst+21 -// CHECK:STDOUT: inst+22: template inst+21 -// CHECK:STDOUT: inst+24: template inst+21 -// CHECK:STDOUT: inst+25: template inst+21 -// CHECK:STDOUT: inst+26: template inst+27 -// CHECK:STDOUT: inst+27: template inst+27 -// CHECK:STDOUT: inst+28: template inst+27 +// CHECK:STDOUT: 'inst+0': template inst+0 +// CHECK:STDOUT: 'inst+1': template inst+1 +// CHECK:STDOUT: 'inst+3': template inst+1 +// CHECK:STDOUT: 'inst+8': template inst+8 +// CHECK:STDOUT: 'inst+10': template inst+1 +// CHECK:STDOUT: 'inst+11': template inst+1 +// CHECK:STDOUT: 'inst+12': template inst+8 +// CHECK:STDOUT: 'inst+14': template inst+14 +// CHECK:STDOUT: 'inst+15': template inst+15 +// CHECK:STDOUT: 'inst+20': template inst+21 +// CHECK:STDOUT: 'inst+21': template inst+21 +// CHECK:STDOUT: 'inst+22': template inst+21 +// CHECK:STDOUT: 'inst+24': template inst+21 +// CHECK:STDOUT: 'inst+25': template inst+21 +// CHECK:STDOUT: 'inst+26': template inst+27 +// CHECK:STDOUT: 'inst+27': template inst+27 +// CHECK:STDOUT: 'inst+28': template inst+27 // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: empty: {} // CHECK:STDOUT: exports: diff --git a/toolchain/check/testdata/basics/no_prelude/raw_ir.carbon b/toolchain/check/testdata/basics/no_prelude/raw_ir.carbon index aec01a027b19..1f4db164806c 100644 --- a/toolchain/check/testdata/basics/no_prelude/raw_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/raw_ir.carbon @@ -48,54 +48,54 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: 0: type1 // CHECK:STDOUT: 1: type1 // CHECK:STDOUT: insts: -// CHECK:STDOUT: inst+0: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type0} -// CHECK:STDOUT: inst+1: {kind: TupleType, arg0: typeBlock0, type: typeTypeType} -// CHECK:STDOUT: inst+2: {kind: TupleLiteral, arg0: empty, type: type1} -// CHECK:STDOUT: inst+3: {kind: Converted, arg0: inst+2, arg1: inst+1, type: typeTypeType} -// CHECK:STDOUT: inst+4: {kind: Param, arg0: name1, type: type1} -// CHECK:STDOUT: inst+5: {kind: BindName, arg0: bindName0, arg1: inst+4, type: type1} -// CHECK:STDOUT: inst+6: {kind: TupleLiteral, arg0: empty, type: type1} -// CHECK:STDOUT: inst+7: {kind: TupleLiteral, arg0: empty, type: type1} -// CHECK:STDOUT: inst+8: {kind: TupleType, arg0: typeBlock4, type: typeTypeType} -// CHECK:STDOUT: inst+9: {kind: TupleLiteral, arg0: block4, type: type2} -// CHECK:STDOUT: inst+10: {kind: Converted, arg0: inst+6, arg1: inst+1, type: typeTypeType} -// CHECK:STDOUT: inst+11: {kind: Converted, arg0: inst+7, arg1: inst+1, type: typeTypeType} -// CHECK:STDOUT: inst+12: {kind: Converted, arg0: inst+9, arg1: inst+8, type: typeTypeType} -// CHECK:STDOUT: inst+13: {kind: VarStorage, arg0: nameReturnSlot, type: type2} -// CHECK:STDOUT: inst+14: {kind: FunctionDecl, arg0: function0, arg1: block5, type: type3} -// CHECK:STDOUT: inst+15: {kind: PointerType, arg0: type2, type: typeTypeType} -// CHECK:STDOUT: inst+16: {kind: NameRef, arg0: name1, arg1: inst+5, type: type1} -// CHECK:STDOUT: inst+17: {kind: TupleLiteral, arg0: empty, type: type1} -// CHECK:STDOUT: inst+18: {kind: TupleLiteral, arg0: block7, type: type2} -// CHECK:STDOUT: inst+19: {kind: TupleAccess, arg0: inst+13, arg1: element0, type: type1} -// CHECK:STDOUT: inst+20: {kind: TupleInit, arg0: block8, arg1: inst+19, type: type1} -// CHECK:STDOUT: inst+21: {kind: TupleValue, arg0: block9, type: type1} -// CHECK:STDOUT: inst+22: {kind: Converted, arg0: inst+16, arg1: inst+20, type: type1} -// CHECK:STDOUT: inst+23: {kind: TupleAccess, arg0: inst+13, arg1: element1, type: type1} -// CHECK:STDOUT: inst+24: {kind: TupleInit, arg0: empty, arg1: inst+23, type: type1} -// CHECK:STDOUT: inst+25: {kind: Converted, arg0: inst+17, arg1: inst+24, type: type1} -// CHECK:STDOUT: inst+26: {kind: TupleInit, arg0: block10, arg1: inst+13, type: type2} -// CHECK:STDOUT: inst+27: {kind: TupleValue, arg0: block12, type: type2} -// CHECK:STDOUT: inst+28: {kind: Converted, arg0: inst+18, arg1: inst+26, type: type2} -// CHECK:STDOUT: inst+29: {kind: ReturnExpr, arg0: inst+28, arg1: inst+13} +// CHECK:STDOUT: 'inst+0': {kind: Namespace, arg0: name_scope0, arg1: inst, type: type0} +// CHECK:STDOUT: 'inst+1': {kind: TupleType, arg0: typeBlock0, type: typeTypeType} +// CHECK:STDOUT: 'inst+2': {kind: TupleLiteral, arg0: empty, type: type1} +// CHECK:STDOUT: 'inst+3': {kind: Converted, arg0: inst+2, arg1: inst+1, type: typeTypeType} +// CHECK:STDOUT: 'inst+4': {kind: Param, arg0: name1, type: type1} +// CHECK:STDOUT: 'inst+5': {kind: BindName, arg0: bindName0, arg1: inst+4, type: type1} +// CHECK:STDOUT: 'inst+6': {kind: TupleLiteral, arg0: empty, type: type1} +// CHECK:STDOUT: 'inst+7': {kind: TupleLiteral, arg0: empty, type: type1} +// CHECK:STDOUT: 'inst+8': {kind: TupleType, arg0: typeBlock4, type: typeTypeType} +// CHECK:STDOUT: 'inst+9': {kind: TupleLiteral, arg0: block4, type: type2} +// CHECK:STDOUT: 'inst+10': {kind: Converted, arg0: inst+6, arg1: inst+1, type: typeTypeType} +// CHECK:STDOUT: 'inst+11': {kind: Converted, arg0: inst+7, arg1: inst+1, type: typeTypeType} +// CHECK:STDOUT: 'inst+12': {kind: Converted, arg0: inst+9, arg1: inst+8, type: typeTypeType} +// CHECK:STDOUT: 'inst+13': {kind: VarStorage, arg0: nameReturnSlot, type: type2} +// CHECK:STDOUT: 'inst+14': {kind: FunctionDecl, arg0: function0, arg1: block5, type: type3} +// CHECK:STDOUT: 'inst+15': {kind: PointerType, arg0: type2, type: typeTypeType} +// CHECK:STDOUT: 'inst+16': {kind: NameRef, arg0: name1, arg1: inst+5, type: type1} +// CHECK:STDOUT: 'inst+17': {kind: TupleLiteral, arg0: empty, type: type1} +// CHECK:STDOUT: 'inst+18': {kind: TupleLiteral, arg0: block7, type: type2} +// CHECK:STDOUT: 'inst+19': {kind: TupleAccess, arg0: inst+13, arg1: element0, type: type1} +// CHECK:STDOUT: 'inst+20': {kind: TupleInit, arg0: block8, arg1: inst+19, type: type1} +// CHECK:STDOUT: 'inst+21': {kind: TupleValue, arg0: block9, type: type1} +// CHECK:STDOUT: 'inst+22': {kind: Converted, arg0: inst+16, arg1: inst+20, type: type1} +// CHECK:STDOUT: 'inst+23': {kind: TupleAccess, arg0: inst+13, arg1: element1, type: type1} +// CHECK:STDOUT: 'inst+24': {kind: TupleInit, arg0: empty, arg1: inst+23, type: type1} +// CHECK:STDOUT: 'inst+25': {kind: Converted, arg0: inst+17, arg1: inst+24, type: type1} +// CHECK:STDOUT: 'inst+26': {kind: TupleInit, arg0: block10, arg1: inst+13, type: type2} +// CHECK:STDOUT: 'inst+27': {kind: TupleValue, arg0: block12, type: type2} +// CHECK:STDOUT: 'inst+28': {kind: Converted, arg0: inst+18, arg1: inst+26, type: type2} +// CHECK:STDOUT: 'inst+29': {kind: ReturnExpr, arg0: inst+28, arg1: inst+13} // CHECK:STDOUT: constant_values: -// CHECK:STDOUT: inst+0: template inst+0 -// CHECK:STDOUT: inst+1: template inst+1 -// CHECK:STDOUT: inst+3: template inst+1 -// CHECK:STDOUT: inst+8: template inst+8 -// CHECK:STDOUT: inst+10: template inst+1 -// CHECK:STDOUT: inst+11: template inst+1 -// CHECK:STDOUT: inst+12: template inst+8 -// CHECK:STDOUT: inst+14: template inst+14 -// CHECK:STDOUT: inst+15: template inst+15 -// CHECK:STDOUT: inst+20: template inst+21 -// CHECK:STDOUT: inst+21: template inst+21 -// CHECK:STDOUT: inst+22: template inst+21 -// CHECK:STDOUT: inst+24: template inst+21 -// CHECK:STDOUT: inst+25: template inst+21 -// CHECK:STDOUT: inst+26: template inst+27 -// CHECK:STDOUT: inst+27: template inst+27 -// CHECK:STDOUT: inst+28: template inst+27 +// CHECK:STDOUT: 'inst+0': template inst+0 +// CHECK:STDOUT: 'inst+1': template inst+1 +// CHECK:STDOUT: 'inst+3': template inst+1 +// CHECK:STDOUT: 'inst+8': template inst+8 +// CHECK:STDOUT: 'inst+10': template inst+1 +// CHECK:STDOUT: 'inst+11': template inst+1 +// CHECK:STDOUT: 'inst+12': template inst+8 +// CHECK:STDOUT: 'inst+14': template inst+14 +// CHECK:STDOUT: 'inst+15': template inst+15 +// CHECK:STDOUT: 'inst+20': template inst+21 +// CHECK:STDOUT: 'inst+21': template inst+21 +// CHECK:STDOUT: 'inst+22': template inst+21 +// CHECK:STDOUT: 'inst+24': template inst+21 +// CHECK:STDOUT: 'inst+25': template inst+21 +// CHECK:STDOUT: 'inst+26': template inst+27 +// CHECK:STDOUT: 'inst+27': template inst+27 +// CHECK:STDOUT: 'inst+28': template inst+27 // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: empty: {} // CHECK:STDOUT: exports: