diff --git a/core/prelude/default.carbon b/core/prelude/default.carbon index 54fe85c0e12c..69d8b7815eaa 100644 --- a/core/prelude/default.carbon +++ b/core/prelude/default.carbon @@ -5,7 +5,6 @@ package Core library "prelude/default"; import library "prelude/types/bool"; -import library "prelude/types/int_literal"; // Provides the default value of an object. If implemented for a type `T`, this // is used to initialize declarations without an explicit initializer, such as @@ -29,7 +28,6 @@ interface UnformedInit { // own. impl bool as UnformedInit {} impl forall [T: type] T* as UnformedInit {} -impl forall [T: UnformedInit, N: IntLiteral] array(T, N) as UnformedInit {} // TODO: Generalize these to apply to tuples and structs containing only // `UnformedInit` types. impl () as UnformedInit {} diff --git a/core/prelude/types.carbon b/core/prelude/types.carbon index 1198b73f543c..4d84358e1143 100644 --- a/core/prelude/types.carbon +++ b/core/prelude/types.carbon @@ -4,6 +4,7 @@ package Core library "prelude/types"; +export import library "prelude/types/array"; export import library "prelude/types/bool"; export import library "prelude/types/char"; export import library "prelude/types/char_literal"; diff --git a/core/prelude/types/array.carbon b/core/prelude/types/array.carbon new file mode 100644 index 000000000000..7dc31e7dfa39 --- /dev/null +++ b/core/prelude/types/array.carbon @@ -0,0 +1,17 @@ +// 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 + +package Core library "prelude/types/array"; + +import library "prelude/default"; +import library "prelude/types/int_literal"; + +private fn MakeArray(T: type, N: IntLiteral) -> type = "array.make_type"; + +// The type `array(T, N)`. +class Array(T: type, N: IntLiteral) { + adapt MakeArray(T, N); +} + +impl forall [T: UnformedInit, N: IntLiteral] Array(T, N) as UnformedInit {} diff --git a/toolchain/check/convert.cpp b/toolchain/check/convert.cpp index 4fca2e030c8a..19619ffa9bdb 100644 --- a/toolchain/check/convert.cpp +++ b/toolchain/check/convert.cpp @@ -1640,9 +1640,12 @@ static auto PerformBuiltinConversion(Context& context, SemIR::LocId loc_id, } // A tuple (T1, T2, ..., Tn) converts to array(T, n) if each Ti converts to T. - if (auto target_array_type = target_type_inst.TryAs()) { - if (auto src_tuple_type = - sem_ir.types().TryGetAs(value_type_id)) { + // This applies both to `Core.Array(T, n)`, which is the type named by + // `array(T, n)`, and to the primitive array type that it adapts. + if (auto src_tuple_type = + sem_ir.types().TryGetAs(value_type_id)) { + if (auto target_array_type = + TryGetAsArrayType(context, loc_id, target.type_id)) { return ConvertTupleToArray(context, *src_tuple_type, *target_array_type, value_id, target); } diff --git a/toolchain/check/core_identifier.def b/toolchain/check/core_identifier.def index b318ec9ebce9..31feb96173a8 100644 --- a/toolchain/check/core_identifier.def +++ b/toolchain/check/core_identifier.def @@ -18,6 +18,7 @@ CARBON_CORE_IDENTIFIER(AddAssignWith) CARBON_CORE_IDENTIFIER(AddWith) +CARBON_CORE_IDENTIFIER(Array) CARBON_CORE_IDENTIFIER(As) CARBON_CORE_IDENTIFIER(AssignWith) CARBON_CORE_IDENTIFIER(At) diff --git a/toolchain/check/cpp/export.cpp b/toolchain/check/cpp/export.cpp index ddae3f769bc1..4f13258589c0 100644 --- a/toolchain/check/cpp/export.cpp +++ b/toolchain/check/cpp/export.cpp @@ -613,6 +613,10 @@ auto ExportAllFieldsToCpp(Context& context, auto ExportFieldToCpp(Context& context, SemIR::InstId field_inst_id, SemIR::FieldDecl field_decl, SemIR::SpecificId specific_id) -> clang::FieldDecl* { + if (field_decl.type_id == SemIR::ErrorInst::TypeId) { + return nullptr; + } + // Get the `SemIR::Class` that contains the `field_decl`. auto unbound_element_type = context.types().GetAs(field_decl.type_id); diff --git a/toolchain/check/cpp/import.cpp b/toolchain/check/cpp/import.cpp index bfb74616827f..4d2c2868b9c8 100644 --- a/toolchain/check/cpp/import.cpp +++ b/toolchain/check/cpp/import.cpp @@ -1444,8 +1444,9 @@ static auto MapReferenceType(Context& context, clang::QualType type, return TypeExpr::ForUnsugared(context, pointer_type_id); } -// Maps a C++ array type to a Carbon array type. -static auto MapArrayType(Context& context, const clang::ArrayType* array_type, +// Maps a C++ array type to a Carbon array type, `Core.Array(T, N)`. +static auto MapArrayType(Context& context, SemIR::LocId loc_id, + const clang::ArrayType* array_type, TypeExpr element_type_expr) -> TypeExpr { if (const auto* constant_array_type = llvm::dyn_cast(array_type)) { @@ -1456,9 +1457,8 @@ static auto MapArrayType(Context& context, const clang::ArrayType* array_type, .int_id = context.ints().AddUnsigned( constant_array_type->getSize())}); auto bound_inst_id = context.constant_values().GetInstId(bound_const_id); - auto array_type_id = - GetArrayType(context, bound_inst_id, element_type_expr.inst_id); - return TypeExpr::ForUnsugared(context, array_type_id); + return MakeArrayType(context, loc_id, element_type_expr.inst_id, + bound_inst_id); } return TypeExpr::None; @@ -1502,7 +1502,7 @@ static auto MapType(Context& context, SemIR::LocId loc_id, clang::QualType type) } else if (wrapper->isReferenceType()) { mapped = MapReferenceType(context, wrapper, mapped); } else if (const auto* array_type = wrapper->getAsArrayTypeUnsafe()) { - mapped = MapArrayType(context, array_type, mapped); + mapped = MapArrayType(context, loc_id, array_type, mapped); } else { CARBON_FATAL("Unexpected wrapper type {0}", wrapper.getAsString()); } diff --git a/toolchain/check/cpp/operators.cpp b/toolchain/check/cpp/operators.cpp index 1065b183537e..6b5e64228a07 100644 --- a/toolchain/check/cpp/operators.cpp +++ b/toolchain/check/cpp/operators.cpp @@ -17,6 +17,7 @@ #include "toolchain/check/custom_witness.h" #include "toolchain/check/function.h" #include "toolchain/check/inst.h" +#include "toolchain/check/literal.h" #include "toolchain/check/name_lookup.h" #include "toolchain/check/pattern.h" #include "toolchain/check/type.h" @@ -255,15 +256,9 @@ static auto MakeCppStdInitializerListMake(Context& context, SemIR::LocId loc_id, .type_id = GetSingletonType( context, SemIR::IntLiteralType::TypeInstId), .int_id = context.ints().Add(size)})); - auto array_type_inst_id = AddTypeInst( - context, - SemIR::LocIdAndInst::RuntimeVerified( - context.sem_ir(), loc_id, - SemIR::ArrayType{.type_id = SemIR::TypeType::TypeId, - .bound_id = bound_id, - .element_type_inst_id = element_type_inst_id})); auto array_type_id = - context.types().GetTypeIdForTypeInstId(array_type_inst_id); + MakeArrayType(context, loc_id, element_type_inst_id, bound_id).type_id; + TryToCompleteType(context, array_type_id, loc_id); // Create a builtin function to perform the conversion from array type to // initializer list type. We name the synthesized function as if it were a diff --git a/toolchain/check/cpp/type_mapping.cpp b/toolchain/check/cpp/type_mapping.cpp index 143b3d04c522..fd2c68841d95 100644 --- a/toolchain/check/cpp/type_mapping.cpp +++ b/toolchain/check/cpp/type_mapping.cpp @@ -138,6 +138,31 @@ static auto VerifyIntegerTypeWidth(Context& context, clang::QualType type, return clang::QualType(); } +// Maps a Carbon array type with the given bound and element type to a C++ +// array type. +static auto TryMapArrayType(Context& context, SemIR::InstId bound_id, + SemIR::TypeInstId element_type_inst_id) + -> TryMapTypeResult { + auto bound_const_id = context.constant_values().Get(bound_id); + if (!bound_const_id.is_constant()) { + return clang::QualType(); + } + auto bound_val_inst = + context.constant_values().TryGetInstAs(bound_const_id); + if (!bound_val_inst) { + return clang::QualType(); + } + return WrappedType{ + .inner_type_id = + context.types().GetTypeIdForTypeInstId(element_type_inst_id), + .wrap_fn = [int_id = bound_val_inst->int_id](Context& context, + clang::QualType inner_type) { + return context.ast_context().getConstantArrayType( + inner_type, context.ints().Get(int_id), /*SizeExpr=*/nullptr, + clang::ArraySizeModifier::Normal, /*IndexTypeQuals=*/0); + }}; +} + // Maps a Carbon class type to a C++ type. Returns a null `QualType` if the // type is not supported. static auto TryMapClassType(Context& context, SemIR::ClassType class_type) @@ -226,6 +251,14 @@ static auto TryMapClassType(Context& context, SemIR::ClassType class_type) case SemIR::RecognizedTypeInfo::Str: { return LookupCppType(context, {"std", "string_view"}); } + case SemIR::RecognizedTypeInfo::Array: { + auto args = context.inst_blocks().Get(type_info.args_id); + if (args.size() == 2) { + return TryMapArrayType(context, args[1], + context.types().GetAsTypeInstId(args[0])); + } + break; + } } // Otherwise, find the existing C++ declaration or create a new one. @@ -316,25 +349,8 @@ static auto TryMapType(Context& context, SemIR::TypeId type_id) }}; } case CARBON_KIND(SemIR::ArrayType array_type): { - auto bound_const_id = context.constant_values().Get(array_type.bound_id); - if (!bound_const_id.is_constant()) { - return clang::QualType(); - } - auto bound_val_inst = - context.constant_values().TryGetInstAs( - bound_const_id); - if (!bound_val_inst) { - return clang::QualType(); - } - return WrappedType{ - .inner_type_id = context.types().GetTypeIdForTypeInstId( - array_type.element_type_inst_id), - .wrap_fn = [int_id = bound_val_inst->int_id]( - Context& context, clang::QualType inner_type) { - return context.ast_context().getConstantArrayType( - inner_type, context.ints().Get(int_id), /*SizeExpr=*/nullptr, - clang::ArraySizeModifier::Normal, /*IndexTypeQuals=*/0); - }}; + return TryMapArrayType(context, array_type.bound_id, + array_type.element_type_inst_id); } case SemIR::SymbolicBinding::Kind: { auto type_inst_id = context.types().GetTypeInstId(type_id); diff --git a/toolchain/check/custom_witness.cpp b/toolchain/check/custom_witness.cpp index adbe411a4a52..e6e6ab8dbcb6 100644 --- a/toolchain/check/custom_witness.cpp +++ b/toolchain/check/custom_witness.cpp @@ -218,6 +218,22 @@ static auto HasWitnessForOneField( return has_witness ? DestroyFormat::NonTrivial : DestroyFormat::NoDestroy; } +// Returns true if `array_type` should impl `Destroy`. +static auto CanDestroyArray(Context& context, SemIR::LocId loc_id, + SemIR::ArrayType array_type, + SemIR::SpecificInterface query_specific_interface) + -> DestroyFormat { + // A zero element array is always trivially destructible. + if (auto int_bound = context.sem_ir().GetZExtIntValue(array_type.bound_id); + !int_bound || *int_bound == 0) { + return DestroyFormat::Trivial; + } + + // Verify the element can be destroyed. + return HasWitnessForOneField(context, loc_id, array_type.element_type_inst_id, + query_specific_interface); +} + // Returns true if `class_type` should impl `Destroy`. static auto CanDestroyClass(Context& context, SemIR::LocId loc_id, SemIR::ClassType class_type, @@ -238,7 +254,13 @@ static auto CanDestroyClass(Context& context, SemIR::LocId loc_id, auto object_repr_id = class_info.GetAdaptedType(context.sem_ir(), class_type.specific_id); - if (!object_repr_id.has_value()) { + if (object_repr_id.has_value()) { + if (auto array_type = + context.types().TryGetAs(object_repr_id)) { + return CanDestroyArray(context, loc_id, *array_type, + query_specific_interface); + } + } else { object_repr_id = class_info.GetObjectRepr(context.sem_ir(), class_type.specific_id); } @@ -299,17 +321,8 @@ static auto CanDestroyType(Context& context, SemIR::LocId loc_id, } case CARBON_KIND(SemIR::ArrayType array_type): { - // A zero element array is always trivially destructible. - if (auto int_bound = - context.sem_ir().GetZExtIntValue(array_type.bound_id); - !int_bound || *int_bound == 0) { - return DestroyFormat::Trivial; - } - - // Verify the element can be destroyed. - return HasWitnessForOneField(context, loc_id, - array_type.element_type_inst_id, - query_specific_interface); + return CanDestroyArray(context, loc_id, array_type, + query_specific_interface); } case SemIR::Call::Kind: @@ -426,9 +439,8 @@ static auto MakeSubobjectDestroyOpBody(Context& context, SemIR::LocId loc_id, // calls to `Destroy.SelfDestruct` loop over the array that calls the // method in its body. // - // We probably need to use `StartLoopHeader`, `BranchAndStartLoopBody`, - // and `FinishLoopBody`, which are currently private functions in - // `/toolchain/check/handle_loop_statement.cpp`. + // Add an `impl` for `Core.Destroy` on `Core.Array` containing a loop, + // and make primitive array destruction a no-op. while (--size >= 0) { auto int_id = context.ints().Add(size); auto index_id = AddInst( @@ -445,7 +457,18 @@ static auto MakeSubobjectDestroyOpBody(Context& context, SemIR::LocId loc_id, return; } case CARBON_KIND(SemIR::ClassType class_type): { - auto class_info = context.classes().Get(class_type.class_id); + // An adapter for a primitive array type, such as `Core.Array`, is + // destroyed by destroying its elements in place. + // TODO: Handle destruction of adapters generally by destroying the + // adapted type. + const auto& class_info = context.classes().Get(class_type.class_id); + if (auto adapted_type_id = class_info.GetAdaptedType( + context.sem_ir(), class_type.specific_id); + adapted_type_id.has_value() && + context.types().Is(adapted_type_id)) { + self_type_id = adapted_type_id; + break; + } auto access_context = llvm::SaveAndRestore(context.access_context(), SemIR::NameScopeId::AllowHighestAccessLevel); diff --git a/toolchain/check/eval.cpp b/toolchain/check/eval.cpp index cd97f70bb83b..621eb338d0d9 100644 --- a/toolchain/check/eval.cpp +++ b/toolchain/check/eval.cpp @@ -1096,8 +1096,12 @@ static auto PerformArrayIndex(EvalContext& eval_context, SemIR::ArrayIndex inst) // regardless of whether the array itself is constant. const auto& index_val = eval_context.ints().Get(index->int_id); auto aggregate_type_id = eval_context.GetTypeOfInst(inst.array_id); - if (auto array_type = - eval_context.types().TryGetAs(aggregate_type_id)) { + // The array operand may have a type that adapts an array type, such as + // `Core.Array`. + if (auto array_type = eval_context.types().TryGetAs( + eval_context.types() + .GetTransitiveUnqualifiedAdaptedType(aggregate_type_id) + .first)) { if (auto bound = eval_context.insts().TryGetAs( array_type->bound_id)) { // This awkward call to `getZExtValue` is a workaround for APInt not @@ -1288,6 +1292,22 @@ static auto PerformCharLiteralSubChar(Context& context, SemIR::InstId lhs_id, llvm::APInt(32, result, /*isSigned=*/true)); } +// Forms a constant array type as an evaluation result. Requires that +// `element_type_id` and `bound_id` are constant. +static auto MakeArrayTypeResult(Context& context, SemIR::LocId loc_id, + SemIR::InstId element_type_id, + SemIR::InstId bound_id, Phase phase) + -> SemIR::ConstantId { + auto result = SemIR::ArrayType{ + .type_id = SemIR::TypeType::TypeId, + .bound_id = bound_id, + .element_type_inst_id = context.types().GetAsTypeInstId(element_type_id)}; + if (!ValidateArrayType(context, loc_id, result)) { + return SemIR::ErrorInst::ConstantId; + } + return MakeConstantResult(context, result, phase); +} + // Forms a constant int type as an evaluation result. Requires that width_id is // constant. static auto MakeIntTypeResult(Context& context, SemIR::LocId loc_id, @@ -2654,6 +2674,11 @@ static auto MakeConstantForBuiltinCall(EvalContext& eval_context, phase); } + case SemIR::BuiltinFunctionKind::ArrayMakeType: { + return MakeArrayTypeResult(context, loc_id, arg_ids[0], arg_ids[1], + phase); + } + case SemIR::BuiltinFunctionKind::FormMakeType: { return context.constant_values().Get(SemIR::FormType::TypeInstId); } diff --git a/toolchain/check/eval_inst.cpp b/toolchain/check/eval_inst.cpp index a9d42d426afc..6595ccafe754 100644 --- a/toolchain/check/eval_inst.cpp +++ b/toolchain/check/eval_inst.cpp @@ -59,40 +59,14 @@ auto EvalConstantInst(Context& /*context*/, SemIR::ArrayInit inst) auto EvalConstantInst(Context& context, SemIR::InstId inst_id, SemIR::ArrayType inst) -> ConstantEvalResult { - auto bound_inst = context.insts().Get(inst.bound_id); - auto int_bound = bound_inst.TryAs(); - if (!int_bound) { - CARBON_CHECK(context.constant_values().Get(inst.bound_id).is_symbolic(), - "Unexpected inst {0} for template constant int", bound_inst); - return ConstantEvalResult::NewSamePhase(inst); - } - auto orig_inst = context.insts().GetAs(inst_id); auto error_loc = context.insts().GetCanonicalLocId(orig_inst.bound_id).has_value() ? orig_inst.bound_id : inst_id; - - // TODO: We should check that the size of the resulting array type - // fits in 64 bits, not just that the bound does. Should we use a - // 32-bit limit for 32-bit targets? - const auto& bound_val = context.ints().Get(int_bound->int_id); - if (context.types().IsSignedInt(int_bound->type_id) && - bound_val.isNegative()) { - CARBON_DIAGNOSTIC(ArrayBoundNegative, Error, - "array bound of {0} is negative", TypedInt); - context.emitter().Emit(error_loc, ArrayBoundNegative, - {.type = int_bound->type_id, .value = bound_val}); - return ConstantEvalResult::Error; - } - if (bound_val.getActiveBits() > 64) { - CARBON_DIAGNOSTIC(ArrayBoundTooLarge, Error, - "array bound of {0} is too large", TypedInt); - context.emitter().Emit(error_loc, ArrayBoundTooLarge, - {.type = int_bound->type_id, .value = bound_val}); - return ConstantEvalResult::Error; - } - return ConstantEvalResult::NewSamePhase(inst); + return ValidateArrayType(context, SemIR::LocId(error_loc), inst) + ? ConstantEvalResult::NewSamePhase(inst) + : ConstantEvalResult::Error; } auto EvalConstantInst(Context& context, SemIR::AsCompatible inst) diff --git a/toolchain/check/handle_array.cpp b/toolchain/check/handle_array.cpp index fe0da0fa0435..f5ddb36e360f 100644 --- a/toolchain/check/handle_array.cpp +++ b/toolchain/check/handle_array.cpp @@ -6,6 +6,7 @@ #include "toolchain/check/convert.h" #include "toolchain/check/handle.h" #include "toolchain/check/inst.h" +#include "toolchain/check/literal.h" #include "toolchain/check/type.h" #include "toolchain/parse/node_kind.h" @@ -50,11 +51,33 @@ auto HandleParseNode(Context& context, Parse::ArrayExprId node_id) -> bool { bound_inst_id = ConvertToValueOfType( context, SemIR::LocId(bound_inst_id), bound_inst_id, GetSingletonType(context, SemIR::IntLiteralType::TypeInstId)); - AddInstAndPush( - context, node_id, - {.type_id = SemIR::TypeType::TypeId, - .bound_id = bound_inst_id, - .element_type_inst_id = element_type.inst_id}); + + if (element_type.type_id == SemIR::ErrorInst::TypeId) { + context.node_stack().Push(node_id, SemIR::ErrorInst::InstId); + return true; + } + + // Diagnose an invalid concrete bound here, rather than when completing + // `Core.Array` below, so that the diagnostic points at the bound. + // + // As with `Core.Int`, an invalid symbolic bound is diagnosed only when the + // type is completed. + // TODO: Express the constraint on the bound in the prelude. + if (!ValidateArrayType( + context, SemIR::LocId(bound_inst_id), + {.type_id = SemIR::TypeType::TypeId, + .bound_id = + context.constant_values().GetConstantInstId(bound_inst_id), + .element_type_inst_id = element_type.inst_id})) { + context.node_stack().Push(node_id, SemIR::ErrorInst::InstId); + return true; + } + + // `array(T, N)` is `Core.Array(T, N)`. The call is attributed to the + // `array(T, N)` expression, so that the resulting type has a location. + auto type_expr = + MakeArrayType(context, node_id, element_type.inst_id, bound_inst_id); + context.node_stack().Push(node_id, type_expr.inst_id); return true; } diff --git a/toolchain/check/handle_index.cpp b/toolchain/check/handle_index.cpp index e397456e995a..7a3e7a732f28 100644 --- a/toolchain/check/handle_index.cpp +++ b/toolchain/check/handle_index.cpp @@ -46,51 +46,48 @@ auto HandleParseNode(Context& context, Parse::IndexExprId node_id) -> bool { auto index_inst_id = context.node_stack().PopExpr(); auto operand_inst_id = context.node_stack().PopExpr(); operand_inst_id = ConvertToValueOrRefExpr(context, operand_inst_id); - auto operand_inst = context.insts().Get(operand_inst_id); - auto operand_type_id = operand_inst.type_id(); + auto operand_type_id = context.insts().Get(operand_inst_id).type_id(); - CARBON_KIND_SWITCH(context.types().GetAsInst(operand_type_id)) { - case CARBON_KIND(SemIR::ArrayType array_type): { - auto cast_index_id = ConvertToValueOfType( - context, SemIR::LocId(index_inst_id), index_inst_id, - // TODO: Replace this with impl lookup rather than hardcoding `i32`. - MakeIntType(context, node_id, SemIR::IntKind::Signed, - context.ints().Add(32))); - auto array_cat = - SemIR::GetExprCategory(context.sem_ir(), operand_inst_id); - if (array_cat == SemIR::ExprCategory::Value) { - // If the operand is an array value, convert it to an ephemeral - // reference to an array so we can perform a primitive indexing into it. - operand_inst_id = AddInst( - context, node_id, - {.type_id = operand_type_id, .value_id = operand_inst_id}); - } - // Constant evaluation will perform a bounds check on this array indexing - // if the index is constant. - auto elem_id = AddInst( + // `Core.Array(T, N)` is indexed as the primitive array type it adapts. + // `ArrayIndex` accepts an operand whose type adapts an array type directly. + // TODO: Model this as an `IndexWith` / `IndirectIndexWith` impl in the + // prelude once that can produce a durable reference. + if (auto array_type = TryGetAsArrayType(context, node_id, operand_type_id)) { + auto cast_index_id = ConvertToValueOfType( + context, SemIR::LocId(index_inst_id), index_inst_id, + // TODO: Replace this with impl lookup rather than hardcoding `i32`. + MakeIntType(context, node_id, SemIR::IntKind::Signed, + context.ints().Add(32))); + auto array_cat = SemIR::GetExprCategory(context.sem_ir(), operand_inst_id); + if (array_cat == SemIR::ExprCategory::Value) { + // If the operand is an array value, convert it to an ephemeral + // reference to an array so we can perform a primitive indexing into it. + operand_inst_id = AddInst( context, node_id, - {.type_id = context.types().GetTypeIdForTypeInstId( - array_type.element_type_inst_id), - .array_id = operand_inst_id, - .index_id = cast_index_id}); - if (array_cat != SemIR::ExprCategory::DurableRef) { - // Indexing a durable reference gives a durable reference expression. - // Indexing anything else gives a value expression. - // TODO: This should be replaced by a choice between using `IndexWith` - // and `IndirectIndexWith`. - elem_id = ConvertToValueExpr(context, elem_id); - } - context.node_stack().Push(node_id, elem_id); - return true; + {.type_id = operand_type_id, .value_id = operand_inst_id}); } - - default: { - auto elem_id = - PerformIndexWith(context, node_id, operand_inst_id, index_inst_id); - context.node_stack().Push(node_id, elem_id); - return true; + // Constant evaluation will perform a bounds check on this array indexing + // if the index is constant. + auto elem_id = AddInst( + context, node_id, + {.type_id = context.types().GetTypeIdForTypeInstId( + array_type->element_type_inst_id), + .array_id = operand_inst_id, + .index_id = cast_index_id}); + if (array_cat != SemIR::ExprCategory::DurableRef) { + // Indexing a durable reference gives a durable reference expression. + // Indexing anything else gives a value expression. + // TODO: This should be replaced by a choice between using `IndexWith` + // and `IndirectIndexWith`. + elem_id = ConvertToValueExpr(context, elem_id); } + context.node_stack().Push(node_id, elem_id); + } else { + auto elem_id = + PerformIndexWith(context, node_id, operand_inst_id, index_inst_id); + context.node_stack().Push(node_id, elem_id); } + return true; } } // namespace Carbon::Check diff --git a/toolchain/check/literal.cpp b/toolchain/check/literal.cpp index 9b0a6fe9f1d4..6bfc09d69bca 100644 --- a/toolchain/check/literal.cpp +++ b/toolchain/check/literal.cpp @@ -243,4 +243,15 @@ auto MakeStringType(Context& context, SemIR::LocId loc_id) -> TypeExpr { return ExprAsType(context, loc_id, type_inst_id); } +auto MakeArrayType(Context& context, SemIR::LocId loc_id, + SemIR::InstId element_type_inst_id, SemIR::InstId bound_id) + -> TypeExpr { + auto desugared_loc_id = context.insts().GetLocIdForDesugaring(loc_id); + auto fn_inst_id = + LookupNameInCore(context, desugared_loc_id, CoreIdentifier::Array); + auto call_id = PerformCall(context, loc_id, fn_inst_id, + {element_type_inst_id, bound_id}); + return ExprAsType(context, loc_id, call_id); +} + } // namespace Carbon::Check diff --git a/toolchain/check/literal.h b/toolchain/check/literal.h index fe890dce6939..0b7a2abd04de 100644 --- a/toolchain/check/literal.h +++ b/toolchain/check/literal.h @@ -58,6 +58,12 @@ auto MakeStringTypeLiteral(Context& context, Parse::StringTypeLiteralId node_id) // Forms a string type. auto MakeStringType(Context& context, SemIR::LocId loc_id) -> TypeExpr; +// Forms an array type `Core.Array(T, N)` with the given `element_type_inst_id` +// and `bound_id`. +auto MakeArrayType(Context& context, SemIR::LocId loc_id, + SemIR::InstId element_type_inst_id, SemIR::InstId bound_id) + -> TypeExpr; + } // namespace Carbon::Check #endif // CARBON_TOOLCHAIN_CHECK_LITERAL_H_ diff --git a/toolchain/check/pattern.cpp b/toolchain/check/pattern.cpp index 201c200beb3a..85aa4444953b 100644 --- a/toolchain/check/pattern.cpp +++ b/toolchain/check/pattern.cpp @@ -224,6 +224,9 @@ auto GetParamPatternKind(Context& context, SemIR::InstId param_inst_id) return ParamPatternKind::Var; case SemIR::ValueParamPattern::Kind: return ParamPatternKind::Value; + case SemIR::ErrorInst::Kind: + // For error recovery, treat errors as values. + return ParamPatternKind::Value; default: CARBON_FATAL("Unexpected pattern kind: {0}", param); } diff --git a/toolchain/check/testdata/alias/preserve_in_type_printing.carbon b/toolchain/check/testdata/alias/preserve_in_type_printing.carbon index db6bdd6edb2d..90283645df22 100644 --- a/toolchain/check/testdata/alias/preserve_in_type_printing.carbon +++ b/toolchain/check/testdata/alias/preserve_in_type_printing.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -43,10 +43,11 @@ fn G() -> A* { return; } // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fn H() -> const A* { return; } +// TODO: Preserve type sugar in generic arguments, such as for `Core.Array`. // CHECK:STDERR: fail_alias_nested_in_type.carbon:[[@LINE+7]]:26: error: missing return value [ReturnStatementMissingExpr] // CHECK:STDERR: fn I() -> array(A, 42) { return; } // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_alias_nested_in_type.carbon:[[@LINE+4]]:11: note: return type of function is `array(A, 42)` [ReturnTypeHereNote] +// CHECK:STDERR: fail_alias_nested_in_type.carbon:[[@LINE+4]]:11: note: return type of function is `array(C, 42)` [ReturnTypeHereNote] // CHECK:STDERR: fn I() -> array(A, 42) { return; } // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: diff --git a/toolchain/check/testdata/array/basics.carbon b/toolchain/check/testdata/array/basics.carbon index b4d8dcf8a7da..e3e1412faa2f 100644 --- a/toolchain/check/testdata/array/basics.carbon +++ b/toolchain/check/testdata/array/basics.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -81,10 +81,20 @@ library "[[@TEST_NAME]]"; class Incomplete; +// CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE+17]]:8: error: binding pattern has incomplete type `array(Incomplete, 1)` in name binding declaration [IncompleteTypeInBindingDecl] +// CHECK:STDERR: var a: array(Incomplete, 1); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: min_prelude/parts/array.carbon:12:3: note: `` evaluates to incomplete type `` [IncompleteTypeInMonomorphization] +// CHECK:STDERR: adapt MakeArray(T, N); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE-8]]:1: note: class was forward declared here [ClassForwardDeclaredHere] +// CHECK:STDERR: class Incomplete; +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~ +// CHECK:STDERR: // CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE+7]]:8: error: binding pattern has incomplete type `array(Incomplete, 1)` in name binding declaration [IncompleteTypeInBindingDecl] // CHECK:STDERR: var a: array(Incomplete, 1); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE-5]]:1: note: class was forward declared here [ClassForwardDeclaredHere] +// CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE-15]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Incomplete; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -113,31 +123,31 @@ var a: array(1, 1); // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type, %empty_tuple.type, %empty_tuple.type) [concrete] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %empty_tuple.type [concrete] -// CHECK:STDOUT: %pattern_type.035: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.035 = ref_binding_pattern b [concrete] -// CHECK:STDOUT: %b.var_patt: %pattern_type.035 = var_pattern %b.patt [concrete] +// CHECK:STDOUT: %Array.13b: type = class_type @Array, @Array(%empty_tuple.type, %int_3) [concrete] +// CHECK:STDOUT: %pattern_type.bfc: type = pattern_type %Array.13b [concrete] +// CHECK:STDOUT: %b.patt: %pattern_type.bfc = ref_binding_pattern b [concrete] +// CHECK:STDOUT: %b.var_patt: %pattern_type.bfc = var_pattern %b.patt [concrete] // CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access file.%a.var, element0 [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access file.%a.var, element1 [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %tuple.elem2: ref %empty_tuple.type = tuple_access file.%a.var, element2 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%empty_tuple, %empty_tuple, %empty_tuple) [concrete] +// CHECK:STDOUT: %array: %Array.13b = tuple_value (%empty_tuple, %empty_tuple, %empty_tuple) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { -// CHECK:STDOUT: %b.var: ref %array_type = var_storage %b.var_patt [concrete] -// CHECK:STDOUT: %.loc6_19: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %b.var: ref %Array.13b = var_storage %b.var_patt [concrete] +// CHECK:STDOUT: %.loc6_19: type = splice_block %Array [concrete = constants.%Array.13b] { // CHECK:STDOUT: %.loc6_15.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] // CHECK:STDOUT: %.loc6_15.2: type = converted %.loc6_15.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %.loc6_15.2 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%empty_tuple.type, constants.%int_3) [concrete = constants.%Array.13b] // CHECK:STDOUT: } -// CHECK:STDOUT: %b: ref %array_type = wrapper_binding b, %b.var [concrete = %b.var] +// CHECK:STDOUT: %b: ref %Array.13b = wrapper_binding b, %b.var [concrete = %b.var] // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %b.patt: %pattern_type.035 = ref_binding_pattern b [concrete = constants.%b.patt] -// CHECK:STDOUT: %b.var_patt: %pattern_type.035 = var_pattern %b.patt [concrete = constants.%b.var_patt] +// CHECK:STDOUT: %b.patt: %pattern_type.bfc = ref_binding_pattern b [concrete = constants.%b.patt] +// CHECK:STDOUT: %b.var_patt: %pattern_type.bfc = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -163,8 +173,8 @@ var a: array(1, 1); // CHECK:STDOUT: %.loc6_23.10: init %empty_tuple.type to %.loc6_23.9 = tuple_init () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_23.11: init %empty_tuple.type = converted %tuple.elem2, %.loc6_23.10 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_23.12: init %empty_tuple.type to %.loc6_23.9 = in_place_init %.loc6_23.11 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc6_23.13: init %array_type to file.%b.var = array_init (%.loc6_23.4, %.loc6_23.8, %.loc6_23.12) [concrete = constants.%array] -// CHECK:STDOUT: %.loc6_1: init %array_type = converted %a.ref, %.loc6_23.13 [concrete = constants.%array] +// CHECK:STDOUT: %.loc6_23.13: init %Array.13b to file.%b.var = array_init (%.loc6_23.4, %.loc6_23.8, %.loc6_23.12) [concrete = constants.%array] +// CHECK:STDOUT: %.loc6_1: init %Array.13b = converted %a.ref, %.loc6_23.13 [concrete = constants.%array] // CHECK:STDOUT: assign file.%b.var, %.loc6_1 // CHECK:STDOUT: // CHECK:STDOUT: } @@ -183,10 +193,10 @@ var a: array(1, 1); // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_2, %tuple.type.a8c [concrete] -// CHECK:STDOUT: %pattern_type.c3e: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %v.patt: %pattern_type.c3e = ref_binding_pattern v [concrete] -// CHECK:STDOUT: %v.var_patt: %pattern_type.c3e = var_pattern %v.patt [concrete] +// CHECK:STDOUT: %Array.982: type = class_type @Array, @Array(%tuple.type.a8c, %int_2) [concrete] +// CHECK:STDOUT: %pattern_type.7c3: type = pattern_type %Array.982 [concrete] +// CHECK:STDOUT: %v.patt: %pattern_type.7c3 = ref_binding_pattern v [concrete] +// CHECK:STDOUT: %v.var_patt: %pattern_type.7c3 = var_pattern %v.patt [concrete] // CHECK:STDOUT: %tuple.type.8c7: type = tuple_type (%tuple.type.a8c, %tuple.type.a8c) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] @@ -214,8 +224,8 @@ var a: array(1, 1); // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e5f: %pattern_type.c3e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1ad: %pattern_type.c3e = wrapper_binding_pattern self, %self.param_patt.e5f [concrete] +// CHECK:STDOUT: %self.param_patt.7ce: %pattern_type.7c3 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.b64: %pattern_type.7c3 = wrapper_binding_pattern self, %self.param_patt.7ce [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.4 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10_3.4 [concrete] @@ -268,24 +278,24 @@ var a: array(1, 1); // CHECK:STDOUT: %self: ref %tuple.type.a8c = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c3e = ref_param_pattern [concrete = constants.%self.param_patt.e5f] -// CHECK:STDOUT: %self.patt: %pattern_type.c3e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1ad] +// CHECK:STDOUT: %self.param_patt: %pattern_type.7c3 = ref_param_pattern [concrete = constants.%self.param_patt.7ce] +// CHECK:STDOUT: %self.patt: %pattern_type.7c3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b64] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.982 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.982 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10_3.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c3e = ref_param_pattern [concrete = constants.%self.param_patt.e5f] -// CHECK:STDOUT: %self.patt: %pattern_type.c3e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1ad] +// CHECK:STDOUT: %self.param_patt: %pattern_type.7c3 = ref_param_pattern [concrete = constants.%self.param_patt.7ce] +// CHECK:STDOUT: %self.patt: %pattern_type.7c3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b64] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.982 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.982 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.var: ref %array_type = var_storage %v.var_patt +// CHECK:STDOUT: %v.var: ref %Array.982 = var_storage %v.var_patt // CHECK:STDOUT: %F.ref.loc10_40: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %.loc10_48.1: ref %tuple.type.a8c = splice_block %.loc10_48.6 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] @@ -299,22 +309,22 @@ var a: array(1, 1); // CHECK:STDOUT: } // CHECK:STDOUT: %F.call.loc10_47: init %tuple.type.a8c to %.loc10_48.2 = call %F.ref.loc10_45() // CHECK:STDOUT: %.loc10_48.3: %tuple.type.8c7 = tuple_literal (%F.call.loc10_42, %F.call.loc10_47) -// CHECK:STDOUT: %.loc10_48.4: init %array_type to %v.var = array_init (%F.call.loc10_42, %F.call.loc10_47) -// CHECK:STDOUT: %.loc10_3: init %array_type = converted %.loc10_48.3, %.loc10_48.4 +// CHECK:STDOUT: %.loc10_48.4: init %Array.982 to %v.var = array_init (%F.call.loc10_42, %F.call.loc10_47) +// CHECK:STDOUT: %.loc10_3: init %Array.982 = converted %.loc10_48.3, %.loc10_48.4 // CHECK:STDOUT: assign %v.var, %.loc10_3 -// CHECK:STDOUT: %.loc10_35: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc10_35: type = splice_block %Array [concrete = constants.%Array.982] { // CHECK:STDOUT: %C.ref.loc10_24: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %C.ref.loc10_27: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %C.ref.loc10_30: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %.loc10_31.1: %tuple.type.531 = tuple_literal (%C.ref.loc10_24, %C.ref.loc10_27, %C.ref.loc10_30) [concrete = constants.%tuple] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc10_31.2: type = converted %.loc10_31.1, constants.%tuple.type.a8c [concrete = constants.%tuple.type.a8c] -// CHECK:STDOUT: %array_type: type = array_type %int_2, %.loc10_31.2 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%tuple.type.a8c, constants.%int_2) [concrete = constants.%Array.982] // CHECK:STDOUT: } -// CHECK:STDOUT: %v: ref %array_type = wrapper_binding v, %v.var +// CHECK:STDOUT: %v: ref %Array.982 = wrapper_binding v, %v.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %v.patt: %pattern_type.c3e = ref_binding_pattern v [concrete = constants.%v.patt] -// CHECK:STDOUT: %v.var_patt: %pattern_type.c3e = var_pattern %v.patt [concrete = constants.%v.var_patt] +// CHECK:STDOUT: %v.patt: %pattern_type.7c3 = ref_binding_pattern v [concrete = constants.%v.patt] +// CHECK:STDOUT: %v.var_patt: %pattern_type.7c3 = var_pattern %v.patt [concrete = constants.%v.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) @@ -369,7 +379,7 @@ var a: array(1, 1); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.4(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.4(%self.param: ref %Array.982) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %.loc10_3.1: ref %tuple.type.a8c = array_index %self.param, %int_1 @@ -382,9 +392,9 @@ var a: array(1, 1); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.4(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.4(%self.param: ref %Array.982) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.4(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.4(%self.param: ref %Array.982) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) @@ -398,16 +408,16 @@ var a: array(1, 1); // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %empty_tuple.type [concrete] -// CHECK:STDOUT: %pattern_type.035: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.035 = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.035 = var_pattern %a.patt [concrete] -// CHECK:STDOUT: %DefaultOrUnformed.type: type = facet_type <@DefaultOrUnformed> [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Array.13b: type = class_type @Array, @Array(%empty_tuple.type, %int_3) [concrete] +// CHECK:STDOUT: %pattern_type.bfc: type = pattern_type %Array.13b [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.bfc = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.bfc = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %DefaultOrUnformed.type: type = facet_type <@DefaultOrUnformed> [concrete] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.type.150: type = fn_type @T.as.DefaultOrUnformed.impl.Op, @T.as.DefaultOrUnformed.impl(%T.67d) [symbolic] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.53a: %T.as.DefaultOrUnformed.impl.Op.type.150 = struct_value () [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.impl_witness.cd3: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.856, @T.as.DefaultOrUnformed.impl(%array_type) [concrete] -// CHECK:STDOUT: %DefaultOrUnformed.facet.20f: %DefaultOrUnformed.type = facet_value %array_type, (%DefaultOrUnformed.impl_witness.cd3) [concrete] +// CHECK:STDOUT: %DefaultOrUnformed.impl_witness.037: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.856, @T.as.DefaultOrUnformed.impl(%Array.13b) [concrete] +// CHECK:STDOUT: %DefaultOrUnformed.facet.a31: %DefaultOrUnformed.type = facet_value %Array.13b, (%DefaultOrUnformed.impl_witness.037) [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type, %empty_tuple.type, %empty_tuple.type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%empty_tuple, %empty_tuple, %empty_tuple) [concrete] // CHECK:STDOUT: %pattern_type.8c1: type = pattern_type %tuple.type [concrete] @@ -435,8 +445,8 @@ var a: array(1, 1); // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.279: %pattern_type.035 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.06d: %pattern_type.035 = wrapper_binding_pattern self, %self.param_patt.279 [concrete] +// CHECK:STDOUT: %self.param_patt.f6b: %pattern_type.bfc = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.555: %pattern_type.bfc = wrapper_binding_pattern self, %self.param_patt.f6b [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc7 [concrete] @@ -480,42 +490,42 @@ var a: array(1, 1); // CHECK:STDOUT: %self: ref %tuple.type = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.035 = ref_param_pattern [concrete = constants.%self.param_patt.279] -// CHECK:STDOUT: %self.patt: %pattern_type.035 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.06d] +// CHECK:STDOUT: %self.param_patt: %pattern_type.bfc = ref_param_pattern [concrete = constants.%self.param_patt.f6b] +// CHECK:STDOUT: %self.patt: %pattern_type.bfc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.555] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.13b = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.13b = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc7 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.035 = ref_param_pattern [concrete = constants.%self.param_patt.279] -// CHECK:STDOUT: %self.patt: %pattern_type.035 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.06d] +// CHECK:STDOUT: %self.param_patt: %pattern_type.bfc = ref_param_pattern [concrete = constants.%self.param_patt.f6b] +// CHECK:STDOUT: %self.patt: %pattern_type.bfc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.555] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.13b = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.13b = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt -// CHECK:STDOUT: %DefaultOrUnformed.facet.loc7: %DefaultOrUnformed.type = facet_value constants.%array_type, (constants.%DefaultOrUnformed.impl_witness.cd3) [concrete = constants.%DefaultOrUnformed.facet.20f] -// CHECK:STDOUT: %.loc7_29.1: %DefaultOrUnformed.type = converted constants.%array_type, %DefaultOrUnformed.facet.loc7 [concrete = constants.%DefaultOrUnformed.facet.20f] -// CHECK:STDOUT: %as_type.loc7: type = facet_access_type %.loc7_29.1 [concrete = constants.%array_type] -// CHECK:STDOUT: %.loc7_29.2: type = converted %.loc7_29.1, %as_type.loc7 [concrete = constants.%array_type] +// CHECK:STDOUT: %a.var: ref %Array.13b = var_storage %a.var_patt +// CHECK:STDOUT: %DefaultOrUnformed.facet.loc7: %DefaultOrUnformed.type = facet_value constants.%Array.13b, (constants.%DefaultOrUnformed.impl_witness.037) [concrete = constants.%DefaultOrUnformed.facet.a31] +// CHECK:STDOUT: %.loc7_29.1: %DefaultOrUnformed.type = converted constants.%Array.13b, %DefaultOrUnformed.facet.loc7 [concrete = constants.%DefaultOrUnformed.facet.a31] +// CHECK:STDOUT: %as_type.loc7: type = facet_access_type %.loc7_29.1 [concrete = constants.%Array.13b] +// CHECK:STDOUT: %.loc7_29.2: type = converted %.loc7_29.1, %as_type.loc7 [concrete = constants.%Array.13b] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc7_3: ref %array_type = splice_block %a.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc7: init %array_type to %.loc7_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.1() +// CHECK:STDOUT: %.loc7_3: ref %Array.13b = splice_block %a.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc7: init %Array.13b to %.loc7_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.1() // CHECK:STDOUT: assign %a.var, %T.as.DefaultOrUnformed.impl.Op.call.loc7 -// CHECK:STDOUT: %.loc7_28: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc7_28: type = splice_block %Array [concrete = constants.%Array.13b] { // CHECK:STDOUT: %.loc7_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] // CHECK:STDOUT: %.loc7_24.2: type = converted %.loc7_24.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %.loc7_24.2 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%empty_tuple.type, constants.%int_3) [concrete = constants.%Array.13b] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.13b = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.035 = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.035 = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.bfc = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.bfc = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref %tuple.type = var_storage %b.var_patt // CHECK:STDOUT: %DefaultOrUnformed.facet.loc8: %DefaultOrUnformed.type = facet_value constants.%tuple.type, (constants.%DefaultOrUnformed.impl_witness.b33) [concrete = constants.%DefaultOrUnformed.facet.f59] @@ -585,7 +595,7 @@ var a: array(1, 1); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7(%self.param: ref %Array.13b) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc7_3.1: ref %empty_tuple.type = array_index %self.param, %int_2 @@ -602,9 +612,9 @@ var a: array(1, 1); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7(%self.param: ref %Array.13b) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7(%self.param: ref %Array.13b) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) @@ -622,12 +632,12 @@ var a: array(1, 1); // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %empty_tuple.type [concrete] -// CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %t.patt: %pattern_type.fe8 = ref_binding_pattern t [concrete] -// CHECK:STDOUT: %t.var_patt: %pattern_type.fe8 = var_pattern %t.patt [concrete] +// CHECK:STDOUT: %Array.70c: type = class_type @Array, @Array(%empty_tuple.type, %int_1) [concrete] +// CHECK:STDOUT: %pattern_type.1f2: type = pattern_type %Array.70c [concrete] +// CHECK:STDOUT: %t.patt: %pattern_type.1f2 = ref_binding_pattern t [concrete] +// CHECK:STDOUT: %t.var_patt: %pattern_type.1f2 = var_pattern %t.patt [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%empty_tuple) [concrete] +// CHECK:STDOUT: %array: %Array.70c = tuple_value (%empty_tuple) [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] @@ -645,8 +655,8 @@ var a: array(1, 1); // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_34.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.f73: %pattern_type.fe8 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.741: %pattern_type.fe8 = wrapper_binding_pattern self, %self.param_patt.f73 [concrete] +// CHECK:STDOUT: %self.param_patt.b3b: %pattern_type.1f2 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.34f: %pattern_type.1f2 = wrapper_binding_pattern self, %self.param_patt.b3b [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc8_3 [concrete] @@ -685,24 +695,24 @@ var a: array(1, 1); // CHECK:STDOUT: %self: ref %tuple.type = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.fe8 = ref_param_pattern [concrete = constants.%self.param_patt.f73] -// CHECK:STDOUT: %self.patt: %pattern_type.fe8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.741] +// CHECK:STDOUT: %self.param_patt: %pattern_type.1f2 = ref_param_pattern [concrete = constants.%self.param_patt.b3b] +// CHECK:STDOUT: %self.patt: %pattern_type.1f2 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.34f] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.70c = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.70c = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc8_3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.fe8 = ref_param_pattern [concrete = constants.%self.param_patt.f73] -// CHECK:STDOUT: %self.patt: %pattern_type.fe8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.741] +// CHECK:STDOUT: %self.param_patt: %pattern_type.1f2 = ref_param_pattern [concrete = constants.%self.param_patt.b3b] +// CHECK:STDOUT: %self.patt: %pattern_type.1f2 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.34f] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.70c = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.70c = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.var: ref %array_type = var_storage %t.var_patt +// CHECK:STDOUT: %t.var: ref %Array.70c = var_storage %t.var_patt // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %F.call: init %tuple.type = call %F.ref() // CHECK:STDOUT: %.loc8_34.1: ref %tuple.type = temporary_storage @@ -713,19 +723,19 @@ var a: array(1, 1); // CHECK:STDOUT: %.loc8_34.4: init %empty_tuple.type to %.loc8_34.3 = tuple_init () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_34.5: init %empty_tuple.type = converted %tuple.elem0, %.loc8_34.4 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_34.6: init %empty_tuple.type to %.loc8_34.3 = in_place_init %.loc8_34.5 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_34.7: init %array_type to %t.var = array_init (%.loc8_34.6) [concrete = constants.%array] -// CHECK:STDOUT: %.loc8_3: init %array_type = converted %F.call, %.loc8_34.7 [concrete = constants.%array] +// CHECK:STDOUT: %.loc8_34.7: init %Array.70c to %t.var = array_init (%.loc8_34.6) [concrete = constants.%array] +// CHECK:STDOUT: %.loc8_3: init %Array.70c = converted %F.call, %.loc8_34.7 [concrete = constants.%array] // CHECK:STDOUT: assign %t.var, %.loc8_3 -// CHECK:STDOUT: %.loc8_28: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc8_28: type = splice_block %Array [concrete = constants.%Array.70c] { // CHECK:STDOUT: %.loc8_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %.loc8_24.2: type = converted %.loc8_24.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %.loc8_24.2 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%empty_tuple.type, constants.%int_1) [concrete = constants.%Array.70c] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: ref %array_type = wrapper_binding t, %t.var +// CHECK:STDOUT: %t: ref %Array.70c = wrapper_binding t, %t.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %t.patt: %pattern_type.fe8 = ref_binding_pattern t [concrete = constants.%t.patt] -// CHECK:STDOUT: %t.var_patt: %pattern_type.fe8 = var_pattern %t.patt [concrete = constants.%t.var_patt] +// CHECK:STDOUT: %t.patt: %pattern_type.1f2 = ref_binding_pattern t [concrete = constants.%t.patt] +// CHECK:STDOUT: %t.var_patt: %pattern_type.1f2 = var_pattern %t.patt [concrete = constants.%t.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_34: = bound_method %.loc8_34.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_34: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_34(%.loc8_34.2) @@ -763,7 +773,7 @@ var a: array(1, 1); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3(%self.param: ref %Array.70c) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc8: ref %empty_tuple.type = array_index %self.param, %int_0 @@ -772,9 +782,9 @@ var a: array(1, 1); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3(%self.param: ref %Array.70c) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3(%self.param: ref %Array.70c) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) @@ -798,10 +808,10 @@ var a: array(1, 1); // CHECK:STDOUT: %tuple.elem7: ref %empty_tuple.type = tuple_access file.%a.var, element7 [concrete] // CHECK:STDOUT: %tuple.elem8: ref %empty_tuple.type = tuple_access file.%a.var, element8 [concrete] // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_9, %empty_tuple.type [concrete] -// CHECK:STDOUT: %pattern_type.3db: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.3db = ref_binding_pattern b [concrete] -// CHECK:STDOUT: %b.var_patt: %pattern_type.3db = var_pattern %b.patt [concrete] +// CHECK:STDOUT: %Array.ac9: type = class_type @Array, @Array(%empty_tuple.type, %int_9) [concrete] +// CHECK:STDOUT: %pattern_type.d5a: type = pattern_type %Array.ac9 [concrete] +// CHECK:STDOUT: %b.patt: %pattern_type.d5a = ref_binding_pattern b [concrete] +// CHECK:STDOUT: %b.var_patt: %pattern_type.d5a = var_pattern %b.patt [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] @@ -811,21 +821,21 @@ var a: array(1, 1); // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete] // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete] // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple) [concrete] +// CHECK:STDOUT: %array: %Array.ac9 = tuple_value (%empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { -// CHECK:STDOUT: %b.var: ref %array_type = var_storage %b.var_patt [concrete] -// CHECK:STDOUT: %.loc9_19: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %b.var: ref %Array.ac9 = var_storage %b.var_patt [concrete] +// CHECK:STDOUT: %.loc9_19: type = splice_block %Array [concrete = constants.%Array.ac9] { // CHECK:STDOUT: %.loc9_15.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9] // CHECK:STDOUT: %.loc9_15.2: type = converted %.loc9_15.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %array_type: type = array_type %int_9, %.loc9_15.2 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%empty_tuple.type, constants.%int_9) [concrete = constants.%Array.ac9] // CHECK:STDOUT: } -// CHECK:STDOUT: %b: ref %array_type = wrapper_binding b, %b.var [concrete = %b.var] +// CHECK:STDOUT: %b: ref %Array.ac9 = wrapper_binding b, %b.var [concrete = %b.var] // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %b.patt: %pattern_type.3db = ref_binding_pattern b [concrete = constants.%b.patt] -// CHECK:STDOUT: %b.var_patt: %pattern_type.3db = var_pattern %b.patt [concrete = constants.%b.var_patt] +// CHECK:STDOUT: %b.patt: %pattern_type.d5a = ref_binding_pattern b [concrete = constants.%b.patt] +// CHECK:STDOUT: %b.var_patt: %pattern_type.d5a = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -887,8 +897,8 @@ var a: array(1, 1); // CHECK:STDOUT: %.loc9_23.34: init %empty_tuple.type to %.loc9_23.33 = tuple_init () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc9_23.35: init %empty_tuple.type = converted %tuple.elem8.loc9, %.loc9_23.34 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc9_23.36: init %empty_tuple.type to %.loc9_23.33 = in_place_init %.loc9_23.35 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc9_23.37: init %array_type to file.%b.var = array_init (%.loc9_23.4, %.loc9_23.8, %.loc9_23.12, %.loc9_23.16, %.loc9_23.20, %.loc9_23.24, %.loc9_23.28, %.loc9_23.32, %.loc9_23.36) [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_1: init %array_type = converted %a.ref, %.loc9_23.37 [concrete = constants.%array] +// CHECK:STDOUT: %.loc9_23.37: init %Array.ac9 to file.%b.var = array_init (%.loc9_23.4, %.loc9_23.8, %.loc9_23.12, %.loc9_23.16, %.loc9_23.20, %.loc9_23.24, %.loc9_23.28, %.loc9_23.32, %.loc9_23.36) [concrete = constants.%array] +// CHECK:STDOUT: %.loc9_1: init %Array.ac9 = converted %a.ref, %.loc9_23.37 [concrete = constants.%array] // CHECK:STDOUT: assign file.%b.var, %.loc9_1 // CHECK:STDOUT: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/bound_values.carbon b/toolchain/check/testdata/array/bound_values.carbon index e8cb993da31c..a23c93997aa1 100644 --- a/toolchain/check/testdata/array/bound_values.carbon +++ b/toolchain/check/testdata/array/bound_values.carbon @@ -82,7 +82,7 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: %Core.IntLiteral.as.AddWith.impl.Op: %Core.IntLiteral.as.AddWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.AddWith.impl.Op.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.AddWith.impl.Op [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete] +// CHECK:STDOUT: %Array.b3a: type = class_type @Array, @Array(%i32, %int_3.1ba) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -92,7 +92,7 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { -// CHECK:STDOUT: %.loc6_21: type = splice_block %array_type.loc6 [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc6_21: type = splice_block %Array.loc6 [concrete = constants.%Array.b3a] { // CHECK:STDOUT: %i32.loc6: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] @@ -101,7 +101,7 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: %Core.IntLiteral.as.AddWith.impl.Op.call: init Core.IntLiteral = call %bound_method(%int_1, %int_2) [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = value_of_initializer %Core.IntLiteral.as.AddWith.impl.Op.call [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc6_18.2: Core.IntLiteral = converted %Core.IntLiteral.as.AddWith.impl.Op.call, %.loc6_18.1 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type.loc6: type = array_type %.loc6_18.2, %i32.loc6 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.loc6: type = class_type @Array, @Array(constants.%i32, constants.%int_3.1ba) [concrete = constants.%Array.b3a] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -145,7 +145,7 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.bound: = bound_method %int_3.543, %UInt.as.ImplicitAs.impl.Convert.364 [concrete] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %UInt.as.ImplicitAs.impl.Convert.364, @UInt.as.ImplicitAs.impl.Convert.1(%int_32) [concrete] // CHECK:STDOUT: %bound_method.51a: = bound_method %int_3.543, %UInt.as.ImplicitAs.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete] +// CHECK:STDOUT: %Array.b3a: type = class_type @Array, @Array(%i32, %int_3.1ba) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -156,7 +156,7 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { -// CHECK:STDOUT: %.loc6_24: type = splice_block %array_type.loc6 [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc6_24: type = splice_block %Array.loc6 [concrete = constants.%Array.b3a] { // CHECK:STDOUT: %i32.loc6: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_3.loc6: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %u32: type = type_literal constants.%u32 [concrete = constants.%u32] @@ -174,7 +174,7 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc6_18.4(%.loc6_18.2) [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc6_18.3: Core.IntLiteral = value_of_initializer %UInt.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc6_18.4: Core.IntLiteral = converted %.loc6_18.2, %.loc6_18.3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type.loc6: type = array_type %.loc6_18.4, %i32.loc6 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.loc6: type = class_type @Array, @Array(constants.%i32, constants.%int_3.1ba) [concrete = constants.%Array.b3a] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/element_mismatches.carbon b/toolchain/check/testdata/array/element_mismatches.carbon index 85eef1ae7bd6..77a71329a613 100644 --- a/toolchain/check/testdata/array/element_mismatches.carbon +++ b/toolchain/check/testdata/array/element_mismatches.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/array/import.carbon b/toolchain/check/testdata/array/import.carbon index 37b4c397b38d..89bda6375108 100644 --- a/toolchain/check/testdata/array/import.carbon +++ b/toolchain/check/testdata/array/import.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -56,16 +56,16 @@ fn F() -> i32 { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.6b6: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_42, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.c07: type = pattern_type %array_type [concrete] +// CHECK:STDOUT: %Array.db6: type = class_type @Array, @Array(%i32, %int_42) [concrete] +// CHECK:STDOUT: %pattern_type.b4a: type = pattern_type %Array.db6 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.b51: = impl_witness imports.%Copy.impl_witness_table.8d2, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3f6: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] @@ -82,8 +82,8 @@ fn F() -> i32 { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc6_12.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.087: %pattern_type.c07 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b22: %pattern_type.c07 = wrapper_binding_pattern self, %self.param_patt.087 [concrete] +// CHECK:STDOUT: %self.param_patt.d6f: %pattern_type.b4a = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.365: %pattern_type.b4a = wrapper_binding_pattern self, %self.param_patt.d6f [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc6_12.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %int_41: Core.IntLiteral = int_value 41 [concrete] @@ -155,28 +155,28 @@ fn F() -> i32 { // CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc6_12.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c07 = ref_param_pattern [concrete = constants.%self.param_patt.087] -// CHECK:STDOUT: %self.patt: %pattern_type.c07 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b22] +// CHECK:STDOUT: %self.param_patt: %pattern_type.b4a = ref_param_pattern [concrete = constants.%self.param_patt.d6f] +// CHECK:STDOUT: %self.patt: %pattern_type.b4a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.365] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.db6 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.db6 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc6_12.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c07 = ref_param_pattern [concrete = constants.%self.param_patt.087] -// CHECK:STDOUT: %self.patt: %pattern_type.c07 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b22] +// CHECK:STDOUT: %self.param_patt: %pattern_type.b4a = ref_param_pattern [concrete = constants.%self.param_patt.d6f] +// CHECK:STDOUT: %self.patt: %pattern_type.b4a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.365] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.db6 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.db6 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%n.param: %i32) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%Main.F [concrete = constants.%F] -// CHECK:STDOUT: %.loc6_12.1: ref %array_type = temporary_storage -// CHECK:STDOUT: %F.call: init %array_type to %.loc6_12.1 = call %F.ref() +// CHECK:STDOUT: %.loc6_12.1: ref %Array.db6 = temporary_storage +// CHECK:STDOUT: %F.call: init %Array.db6 to %.loc6_12.1 = call %F.ref() // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %.loc6_12.2: ref %array_type = temporary %.loc6_12.1, %F.call +// CHECK:STDOUT: %.loc6_12.2: ref %Array.db6 = temporary %.loc6_12.1, %F.call // CHECK:STDOUT: %.loc6_15.1: ref %i32 = array_index %.loc6_12.2, %n.ref // CHECK:STDOUT: %.loc6_15.2: %i32 = acquire_value %.loc6_15.1 // CHECK:STDOUT: %impl.elem0: %.737 = impl_witness_access constants.%Copy.impl_witness.b51, element0 [concrete = constants.%Int.as.Copy.impl.Op.4f6] @@ -200,7 +200,7 @@ fn F() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_12.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_12.2(%self.param: ref %Array.db6) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_41: Core.IntLiteral = int_value 41 [concrete = constants.%int_41] // CHECK:STDOUT: %.loc6_12.1: ref %i32 = array_index %self.param, %int_41 @@ -373,9 +373,9 @@ fn F() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_12.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_12.2(%self.param: ref %Array.db6) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc6_12.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc6_12.2(%self.param: ref %Array.db6) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) @@ -389,27 +389,27 @@ fn F() -> i32 { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.97e: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.97e = value_binding_pattern a [concrete] +// CHECK:STDOUT: %Array.096: type = class_type @Array, @Array(%i32, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.297: type = pattern_type %Array.096 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.297 = value_binding_pattern a [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.524: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.98e [concrete] +// CHECK:STDOUT: %assoc0.535: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.468 [concrete] // CHECK:STDOUT: %int_1.0c6: %i32 = int_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.0c6) [concrete] +// CHECK:STDOUT: %array: %Array.096 = tuple_value (%int_1.0c6) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//symbolic_decl, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.C: type = import_ref Main//symbolic_decl, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.3ab: %I.assoc_type = import_ref Main//symbolic_decl, loc5_12, loaded [concrete = constants.%assoc0.524] -// CHECK:STDOUT: %Main.import_ref.c09: %array_type = import_ref Main//symbolic_decl, loc10_33, loaded [concrete = constants.%array] -// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.c09), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.98e: %array_type = import_ref Main//symbolic_decl, loc5_12, loaded [concrete = %value] -// CHECK:STDOUT: %value: %array_type = assoc_const_decl @value [concrete] {} +// CHECK:STDOUT: %Main.import_ref.b43: %I.assoc_type = import_ref Main//symbolic_decl, loc5_12, loaded [concrete = constants.%assoc0.535] +// CHECK:STDOUT: %Main.import_ref.150: %Array.096 = import_ref Main//symbolic_decl, loc10_33, loaded [concrete = constants.%array] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.150), @C.as.I.impl [concrete] +// CHECK:STDOUT: %Main.import_ref.468: %Array.096 = import_ref Main//symbolic_decl, loc5_12, loaded [concrete = %value] +// CHECK:STDOUT: %value: %Array.096 = assoc_const_decl @value [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> out %return.param: %i32 { @@ -420,16 +420,16 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc7_29: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc7_29 [concrete = constants.%C] // CHECK:STDOUT: %.loc7_34: type = converted %.loc7_29, %as_type [concrete = constants.%C] -// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.3ab [concrete = constants.%assoc0.524] -// CHECK:STDOUT: %impl.elem0.loc7: %array_type = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%array] -// CHECK:STDOUT: %.loc7_22: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.b43 [concrete = constants.%assoc0.535] +// CHECK:STDOUT: %impl.elem0.loc7: %Array.096 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%array] +// CHECK:STDOUT: %.loc7_22: type = splice_block %Array [concrete = constants.%Array.096] { // CHECK:STDOUT: %i32.loc7: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32.loc7 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_1.5b8) [concrete = constants.%Array.096] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: %array_type = wrapper_binding a, %impl.elem0.loc7 +// CHECK:STDOUT: %a: %Array.096 = wrapper_binding a, %impl.elem0.loc7 // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.97e = value_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.patt: %pattern_type.297 = value_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index f8119cc41e5d..dc70ab4ef439 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -52,16 +52,16 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.771: type = pattern_type %array_type [concrete] +// CHECK:STDOUT: %Array.b3a: type = class_type @Array, @Array(%i32, %int_3.1ba) [concrete] +// CHECK:STDOUT: %pattern_type.7a1: type = pattern_type %Array.b3a [concrete] // CHECK:STDOUT: %pattern_type.6b6: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.b51: = impl_witness imports.%Copy.impl_witness_table.8d2, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3f6: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] @@ -95,8 +95,8 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.485: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] // CHECK:STDOUT: %bound_method.763: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.410: %i32 = int_value 3 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.0c6, %int_2.295, %int_3.410) [concrete] -// CHECK:STDOUT: %.981: ref %array_type = temporary invalid, %array [concrete] +// CHECK:STDOUT: %array: %Array.b3a = tuple_value (%int_1.0c6, %int_2.295, %int_3.410) [concrete] +// CHECK:STDOUT: %.293: ref %Array.b3a = temporary invalid, %array [concrete] // CHECK:STDOUT: %self.param_patt.705: %pattern_type.6b6 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.70d: %pattern_type.6b6 = wrapper_binding_pattern self, %self.param_patt.705 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_20.1 [concrete] @@ -105,15 +105,15 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_20.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c42: %pattern_type.771 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3bc: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt.c42 [concrete] +// CHECK:STDOUT: %self.param_patt.717: %pattern_type.7a1 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.cb9: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt.717 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_20.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_20.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_20.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.981, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.293, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -139,26 +139,26 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_20.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.771 = ref_param_pattern [concrete = constants.%self.param_patt.c42] -// CHECK:STDOUT: %self.patt: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3bc] +// CHECK:STDOUT: %self.param_patt: %pattern_type.7a1 = ref_param_pattern [concrete = constants.%self.param_patt.717] +// CHECK:STDOUT: %self.patt: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb9] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.b3a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.b3a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_20.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.771 = ref_param_pattern [concrete = constants.%self.param_patt.c42] -// CHECK:STDOUT: %self.patt: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3bc] +// CHECK:STDOUT: %self.param_patt: %pattern_type.7a1 = ref_param_pattern [concrete = constants.%self.param_patt.717] +// CHECK:STDOUT: %self.patt: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb9] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.b3a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.b3a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%arr.param: %array_type, %i.param: %i32) -> out %return.param: %i32 { +// CHECK:STDOUT: fn @F(%arr.param: %Array.b3a, %i.param: %i32) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: %array_type = name_ref arr, %arr +// CHECK:STDOUT: %arr.ref: %Array.b3a = name_ref arr, %arr // CHECK:STDOUT: %i.ref: %i32 = name_ref i, %i -// CHECK:STDOUT: %.loc4_15.1: ref %array_type = value_as_ref %arr.ref +// CHECK:STDOUT: %.loc4_15.1: ref %Array.b3a = value_as_ref %arr.ref // CHECK:STDOUT: %.loc4_15.2: ref %i32 = array_index %.loc4_15.1, %i.ref // CHECK:STDOUT: %.loc4_15.3: %i32 = acquire_value %.loc4_15.2 // CHECK:STDOUT: %impl.elem0: %.737 = impl_witness_access constants.%Copy.impl_witness.b51, element0 [concrete = constants.%Int.as.Copy.impl.Op.4f6] @@ -183,7 +183,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %bound_method.loc10_20.2: = bound_method %int_1.loc10_13, %specific_fn.loc10_20.1 [concrete = constants.%bound_method.953] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_20.1: init %i32 = call %bound_method.loc10_20.2(%int_1.loc10_13) [concrete = constants.%int_1.0c6] // CHECK:STDOUT: %.loc10_20.2: init %i32 = converted %int_1.loc10_13, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_20.1 [concrete = constants.%int_1.0c6] -// CHECK:STDOUT: %.loc10_20.3: ref %array_type = temporary_storage +// CHECK:STDOUT: %.loc10_20.3: ref %Array.b3a = temporary_storage // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc10_20.4: ref %i32 = array_index %.loc10_20.3, %int_0 // CHECK:STDOUT: %.loc10_20.5: init %i32 to %.loc10_20.4 = in_place_init %.loc10_20.2 [concrete = constants.%int_1.0c6] @@ -205,10 +205,10 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %int_2.loc10_20: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc10_20.10: ref %i32 = array_index %.loc10_20.3, %int_2.loc10_20 // CHECK:STDOUT: %.loc10_20.11: init %i32 to %.loc10_20.10 = in_place_init %.loc10_20.9 [concrete = constants.%int_3.410] -// CHECK:STDOUT: %.loc10_20.12: init %array_type to %.loc10_20.3 = array_init (%.loc10_20.5, %.loc10_20.8, %.loc10_20.11) [concrete = constants.%array] -// CHECK:STDOUT: %.loc10_20.13: init %array_type = converted %.loc10_20.1, %.loc10_20.12 [concrete = constants.%array] -// CHECK:STDOUT: %.loc10_20.14: ref %array_type = temporary %.loc10_20.3, %.loc10_20.13 [concrete = constants.%.981] -// CHECK:STDOUT: %.loc10_20.15: %array_type = acquire_value %.loc10_20.14 [concrete = constants.%array] +// CHECK:STDOUT: %.loc10_20.12: init %Array.b3a to %.loc10_20.3 = array_init (%.loc10_20.5, %.loc10_20.8, %.loc10_20.11) [concrete = constants.%array] +// CHECK:STDOUT: %.loc10_20.13: init %Array.b3a = converted %.loc10_20.1, %.loc10_20.12 [concrete = constants.%array] +// CHECK:STDOUT: %.loc10_20.14: ref %Array.b3a = temporary %.loc10_20.3, %.loc10_20.13 [concrete = constants.%.293] +// CHECK:STDOUT: %.loc10_20.15: %Array.b3a = acquire_value %.loc10_20.14 [concrete = constants.%array] // CHECK:STDOUT: %impl.elem0.loc10_23: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc10_23.1: = bound_method %int_1.loc10_23, %impl.elem0.loc10_23 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.094] // CHECK:STDOUT: %specific_fn.loc10_23: = specific_function %impl.elem0.loc10_23, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] @@ -217,7 +217,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %.loc10_23.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_23 [concrete = constants.%int_1.0c6] // CHECK:STDOUT: %.loc10_23.2: %i32 = converted %int_1.loc10_23, %.loc10_23.1 [concrete = constants.%int_1.0c6] // CHECK:STDOUT: %F.call: init %i32 = call %F.ref(%.loc10_20.15, %.loc10_23.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.981) +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.293) // CHECK:STDOUT: return %F.call // CHECK:STDOUT: } // CHECK:STDOUT: @@ -232,7 +232,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_20.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_20.2(%self.param: ref %Array.b3a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc10_20.1: ref %i32 = array_index %self.param, %int_2 @@ -249,9 +249,9 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_20.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_20.2(%self.param: ref %Array.b3a) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_20.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_20.2(%self.param: ref %Array.b3a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) @@ -265,7 +265,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %empty_struct_type [concrete] +// CHECK:STDOUT: %Array.814: type = class_type @Array, @Array(%empty_struct_type, %int_3) [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %struct_type.index: type = struct_type {.index: Core.IntLiteral} [concrete] // CHECK:STDOUT: %struct: %struct_type.index = struct_value (%int_2.ecc) [concrete] @@ -292,9 +292,9 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1aa = impl_witness_table (%Core.import_ref.edf), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%a.param: %array_type) -> out %return.param: %empty_struct_type { +// CHECK:STDOUT: fn @F(%a.param: %Array.814) -> out %return.param: %empty_struct_type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %array_type = name_ref a, %a +// CHECK:STDOUT: %a.ref: %Array.814 = name_ref a, %a // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc6_23.1: %struct_type.index = struct_literal (%int_2) [concrete = constants.%struct] // CHECK:STDOUT: %struct: %struct_type.index = struct_value (%int_2) [concrete = constants.%struct] @@ -307,7 +307,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc6_24.2(%.loc6_24.1) [concrete = constants.%int_2.295] // CHECK:STDOUT: %.loc6_24.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_2.295] // CHECK:STDOUT: %.loc6_24.3: %i32 = converted %.loc6_24.1, %.loc6_24.2 [concrete = constants.%int_2.295] -// CHECK:STDOUT: %.loc6_30.1: ref %array_type = value_as_ref %a.ref +// CHECK:STDOUT: %.loc6_30.1: ref %Array.814 = value_as_ref %a.ref // CHECK:STDOUT: %.loc6_30.2: ref %empty_struct_type = array_index %.loc6_30.1, %.loc6_24.3 // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc6_30.3: %empty_struct_type = converted %.loc6_30.2, %empty_struct [concrete = constants.%empty_struct] diff --git a/toolchain/check/testdata/array/init_dependent_bound.carbon b/toolchain/check/testdata/array/init_dependent_bound.carbon index 7e75d9d1df2c..675049ce5644 100644 --- a/toolchain/check/testdata/array/init_dependent_bound.carbon +++ b/toolchain/check/testdata/array/init_dependent_bound.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -39,17 +39,12 @@ fn F(generic N: i32) { var unused arr: array(i32, N) = (1, 2, 3); } -// --- fail_todo_init_template_dependent_bound.carbon +// --- init_template_dependent_bound.carbon library "[[@TEST_NAME]]"; -// TODO: This should be valid. fn G(template N: i32) { //@dump-sem-ir-begin - // CHECK:STDERR: fail_todo_init_template_dependent_bound.carbon:[[@LINE+4]]:35: error: cannot initialize array with dependent bound from a list of initializers [ArrayInitDependentBound] - // CHECK:STDERR: var unused arr: array(i32, N) = (1, 2, 3); - // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: var unused arr: array(i32, N) = (1, 2, 3); //@dump-sem-ir-end } @@ -65,29 +60,30 @@ fn H() { G(3); } // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %array_type.1b3: type = array_type %int_0, %T [symbolic] -// CHECK:STDOUT: %require_complete.cc5: = require_complete_type %array_type.1b3 [symbolic] -// CHECK:STDOUT: %pattern_type.bd6: type = pattern_type %array_type.1b3 [symbolic] -// CHECK:STDOUT: %arr.patt.770: %pattern_type.bd6 = ref_binding_pattern arr [symbolic] -// CHECK:STDOUT: %arr.var_patt.5fc: %pattern_type.bd6 = var_pattern %arr.patt.770 [symbolic] +// CHECK:STDOUT: %Array.7cb: type = class_type @Array, @Array(%T, %int_0) [symbolic] +// CHECK:STDOUT: %require_complete.0fe: = require_complete_type %Array.7cb [symbolic] +// CHECK:STDOUT: %pattern_type.335: type = pattern_type %Array.7cb [symbolic] +// CHECK:STDOUT: %arr.patt.c57: %pattern_type.335 = ref_binding_pattern arr [symbolic] +// CHECK:STDOUT: %arr.var_patt.35b: %pattern_type.335 = var_pattern %arr.patt.c57 [symbolic] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] -// CHECK:STDOUT: %array.ca4: %array_type.1b3 = tuple_value () [symbolic] +// CHECK:STDOUT: %array.ec9: %Array.7cb = tuple_value () [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.ac5: = lookup_impl_witness %array_type.1b3, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.a52: %Destroy.type = facet_value %array_type.1b3, (%Destroy.lookup_impl_witness.ac5) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.e30: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.a52) [symbolic] -// CHECK:STDOUT: %.c54: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.e30, %Destroy.facet.a52 [symbolic] -// CHECK:STDOUT: %impl.elem2: %.c54 = impl_witness_access %Destroy.lookup_impl_witness.ac5, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.0cb: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.a52) [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.a12: = lookup_impl_witness %Array.7cb, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.7b0: %Destroy.type = facet_value %Array.7cb, (%Destroy.lookup_impl_witness.a12) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.aa3: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.7b0) [symbolic] +// CHECK:STDOUT: %.6d4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.aa3, %Destroy.facet.7b0 [symbolic] +// CHECK:STDOUT: %impl.elem2: %.6d4 = impl_witness_access %Destroy.lookup_impl_witness.a12, element2 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.ade: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.7b0) [symbolic] // CHECK:STDOUT: %C: type = class_type @C [concrete] +// CHECK:STDOUT: %Array.9d5: type = class_type @Array, @Array(%C, %int_0) [concrete] // CHECK:STDOUT: %array_type.988: type = array_type %int_0, %C [concrete] // CHECK:STDOUT: %complete_type.e80: = complete_type_witness %array_type.988 [concrete] -// CHECK:STDOUT: %pattern_type.6be: type = pattern_type %array_type.988 [concrete] -// CHECK:STDOUT: %arr.patt.c91: %pattern_type.6be = ref_binding_pattern arr [concrete] -// CHECK:STDOUT: %arr.var_patt.9dd: %pattern_type.6be = var_pattern %arr.patt.c91 [concrete] -// CHECK:STDOUT: %array.497: %array_type.988 = tuple_value () [concrete] -// CHECK:STDOUT: %self.param_patt.5c1: %pattern_type.6be = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1a6: %pattern_type.6be = wrapper_binding_pattern self, %self.param_patt.5c1 [concrete] +// CHECK:STDOUT: %pattern_type.553: type = pattern_type %Array.9d5 [concrete] +// CHECK:STDOUT: %arr.patt.bc7: %pattern_type.553 = ref_binding_pattern arr [concrete] +// CHECK:STDOUT: %arr.var_patt.491: %pattern_type.553 = var_pattern %arr.patt.bc7 [concrete] +// CHECK:STDOUT: %array.03e: %Array.9d5 = tuple_value () [concrete] +// CHECK:STDOUT: %self.param_patt.1c9: %pattern_type.553 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.e2c: %pattern_type.553 = wrapper_binding_pattern self, %self.param_patt.1c9 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc7 [concrete] @@ -95,25 +91,25 @@ fn H() { G(3); } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.f8f: = custom_witness (%Destroy.WithSelf.Op.403, %Destroy.WithSelf.SubobjectDestroy.d01, %Destroy.WithSelf.SelfDestruct.db3), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.23c: %Destroy.type = facet_value %array_type.988, (%custom_witness.f8f) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.180: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.23c) [concrete] -// CHECK:STDOUT: %.a26: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.180, %Destroy.facet.23c [concrete] +// CHECK:STDOUT: %Destroy.facet.b75: %Destroy.type = facet_value %Array.9d5, (%custom_witness.f8f) [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.f08: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.b75) [concrete] +// CHECK:STDOUT: %.ba8: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.f08, %Destroy.facet.b75 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generated { // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6be = ref_param_pattern [concrete = constants.%self.param_patt.5c1] -// CHECK:STDOUT: %self.patt: %pattern_type.6be = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1a6] +// CHECK:STDOUT: %self.param_patt: %pattern_type.553 = ref_param_pattern [concrete = constants.%self.param_patt.1c9] +// CHECK:STDOUT: %self.patt: %pattern_type.553 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e2c] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.988 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.988 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.9d5 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.9d5 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc7 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6be = ref_param_pattern [concrete = constants.%self.param_patt.5c1] -// CHECK:STDOUT: %self.patt: %pattern_type.6be = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1a6] +// CHECK:STDOUT: %self.param_patt: %pattern_type.553 = ref_param_pattern [concrete = constants.%self.param_patt.1c9] +// CHECK:STDOUT: %self.patt: %pattern_type.553 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e2c] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.988 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.988 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.9d5 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.9d5 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -121,54 +117,54 @@ fn H() { G(3); } // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %array_type.loc7_29.2: type = array_type constants.%int_0, %T.loc4_15.1 [symbolic = %array_type.loc7_29.2 (constants.%array_type.1b3)] -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc7_29.2 [symbolic = %require_complete (constants.%require_complete.cc5)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc7_29.2 [symbolic = %pattern_type (constants.%pattern_type.bd6)] -// CHECK:STDOUT: %arr.patt.loc7_17.2: @G.%pattern_type (%pattern_type.bd6) = ref_binding_pattern arr [symbolic = %arr.patt.loc7_17.2 (constants.%arr.patt.770)] -// CHECK:STDOUT: %arr.var_patt.loc7_3.2: @G.%pattern_type (%pattern_type.bd6) = var_pattern %arr.patt.loc7_17.2 [symbolic = %arr.var_patt.loc7_3.2 (constants.%arr.var_patt.5fc)] -// CHECK:STDOUT: %array: @G.%array_type.loc7_29.2 (%array_type.1b3) = tuple_value () [symbolic = %array (constants.%array.ca4)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %array_type.loc7_29.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.ac5)] -// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value %array_type.loc7_29.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.a52)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.loc7_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.e30)] -// CHECK:STDOUT: %.loc7_3.4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc7_3.3 [symbolic = %.loc7_3.4 (constants.%.c54)] -// CHECK:STDOUT: %impl.elem2.loc7_3.2: @G.%.loc7_3.4 (%.c54) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc7_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem2.loc7_3.2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.loc7_3.3) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.0cb)] +// CHECK:STDOUT: %Array.loc7_29.2: type = class_type @Array, @Array(%T.loc4_15.1, constants.%int_0) [symbolic = %Array.loc7_29.2 (constants.%Array.7cb)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Array.loc7_29.2 [symbolic = %require_complete (constants.%require_complete.0fe)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Array.loc7_29.2 [symbolic = %pattern_type (constants.%pattern_type.335)] +// CHECK:STDOUT: %arr.patt.loc7_17.2: @G.%pattern_type (%pattern_type.335) = ref_binding_pattern arr [symbolic = %arr.patt.loc7_17.2 (constants.%arr.patt.c57)] +// CHECK:STDOUT: %arr.var_patt.loc7_3.2: @G.%pattern_type (%pattern_type.335) = var_pattern %arr.patt.loc7_17.2 [symbolic = %arr.var_patt.loc7_3.2 (constants.%arr.var_patt.35b)] +// CHECK:STDOUT: %array: @G.%Array.loc7_29.2 (%Array.7cb) = tuple_value () [symbolic = %array (constants.%array.ec9)] +// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Array.loc7_29.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.a12)] +// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value %Array.loc7_29.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.7b0)] +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.loc7_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.aa3)] +// CHECK:STDOUT: %.loc7_3.4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc7_3.3 [symbolic = %.loc7_3.4 (constants.%.6d4)] +// CHECK:STDOUT: %impl.elem2.loc7_3.2: @G.%.loc7_3.4 (%.6d4) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc7_3.2 (constants.%impl.elem2)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem2.loc7_3.2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.loc7_3.3) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.ade)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.var: ref @G.%array_type.loc7_29.2 (%array_type.1b3) = var_storage %arr.var_patt.loc7_3.1 +// CHECK:STDOUT: %arr.var: ref @G.%Array.loc7_29.2 (%Array.7cb) = var_storage %arr.var_patt.loc7_3.1 // CHECK:STDOUT: %.loc7_34.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_34.2: init @G.%array_type.loc7_29.2 (%array_type.1b3) to %arr.var = array_init () [symbolic = %array (constants.%array.ca4)] -// CHECK:STDOUT: %.loc7_3.1: init @G.%array_type.loc7_29.2 (%array_type.1b3) = converted %.loc7_34.1, %.loc7_34.2 [symbolic = %array (constants.%array.ca4)] +// CHECK:STDOUT: %.loc7_34.2: init @G.%Array.loc7_29.2 (%Array.7cb) to %arr.var = array_init () [symbolic = %array (constants.%array.ec9)] +// CHECK:STDOUT: %.loc7_3.1: init @G.%Array.loc7_29.2 (%Array.7cb) = converted %.loc7_34.1, %.loc7_34.2 [symbolic = %array (constants.%array.ec9)] // CHECK:STDOUT: assign %arr.var, %.loc7_3.1 -// CHECK:STDOUT: %.loc7_29: type = splice_block %array_type.loc7_29.1 [symbolic = %array_type.loc7_29.2 (constants.%array_type.1b3)] { +// CHECK:STDOUT: %.loc7_29: type = splice_block %Array.loc7_29.1 [symbolic = %Array.loc7_29.2 (constants.%Array.7cb)] { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %array_type.loc7_29.1: type = array_type %int_0, %T.ref [symbolic = %array_type.loc7_29.2 (constants.%array_type.1b3)] +// CHECK:STDOUT: %Array.loc7_29.1: type = class_type @Array, @Array(constants.%T, constants.%int_0) [symbolic = %Array.loc7_29.2 (constants.%Array.7cb)] // CHECK:STDOUT: } -// CHECK:STDOUT: %arr: ref @G.%array_type.loc7_29.2 (%array_type.1b3) = wrapper_binding arr, %arr.var +// CHECK:STDOUT: %arr: ref @G.%Array.loc7_29.2 (%Array.7cb) = wrapper_binding arr, %arr.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %arr.patt.loc7_17.1: @G.%pattern_type (%pattern_type.bd6) = ref_binding_pattern arr [symbolic = %arr.patt.loc7_17.2 (constants.%arr.patt.770)] -// CHECK:STDOUT: %arr.var_patt.loc7_3.1: @G.%pattern_type (%pattern_type.bd6) = var_pattern %arr.patt.loc7_17.1 [symbolic = %arr.var_patt.loc7_3.2 (constants.%arr.var_patt.5fc)] +// CHECK:STDOUT: %arr.patt.loc7_17.1: @G.%pattern_type (%pattern_type.335) = ref_binding_pattern arr [symbolic = %arr.patt.loc7_17.2 (constants.%arr.patt.c57)] +// CHECK:STDOUT: %arr.var_patt.loc7_3.1: @G.%pattern_type (%pattern_type.335) = var_pattern %arr.patt.loc7_17.1 [symbolic = %arr.var_patt.loc7_3.2 (constants.%arr.var_patt.35b)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem2.loc7_3.1: @G.%.loc7_3.4 (%.c54) = impl_witness_access constants.%Destroy.lookup_impl_witness.ac5, element2 [symbolic = %impl.elem2.loc7_3.2 (constants.%impl.elem2)] +// CHECK:STDOUT: %impl.elem2.loc7_3.1: @G.%.loc7_3.4 (%.6d4) = impl_witness_access constants.%Destroy.lookup_impl_witness.a12, element2 [symbolic = %impl.elem2.loc7_3.2 (constants.%impl.elem2)] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %arr.var, %impl.elem2.loc7_3.1 -// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%array_type.1b3, (constants.%Destroy.lookup_impl_witness.ac5) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.a52)] -// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%array_type.1b3, %Destroy.facet.loc7_3.1 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.a52)] -// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%array_type.1b3, (constants.%Destroy.lookup_impl_witness.ac5) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.a52)] -// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%array_type.1b3, %Destroy.facet.loc7_3.2 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.a52)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem2.loc7_3.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Destroy.facet.a52) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.0cb)] +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%Array.7cb, (constants.%Destroy.lookup_impl_witness.a12) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.7b0)] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%Array.7cb, %Destroy.facet.loc7_3.1 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.7b0)] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%Array.7cb, (constants.%Destroy.lookup_impl_witness.a12) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.7b0)] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%Array.7cb, %Destroy.facet.loc7_3.2 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.7b0)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem2.loc7_3.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Destroy.facet.7b0) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.ade)] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %arr.var, %specific_impl_fn.loc7_3.1 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc7_3.2(%arr.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7(%self.param: ref %array_type.988) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7(%self.param: ref %Array.9d5) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7(%self.param: ref %array_type.988) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7(%self.param: ref %Array.9d5) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7(%self.param: ref %array_type.988) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7(%self.param: ref %Array.9d5) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) @@ -185,21 +181,21 @@ fn H() { G(3); } // CHECK:STDOUT: %T.loc4_15.1 => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %array_type.loc7_29.2 => constants.%array_type.988 +// CHECK:STDOUT: %Array.loc7_29.2 => constants.%Array.9d5 // CHECK:STDOUT: %require_complete => constants.%complete_type.e80 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.6be -// CHECK:STDOUT: %arr.patt.loc7_17.2 => constants.%arr.patt.c91 -// CHECK:STDOUT: %arr.var_patt.loc7_3.2 => constants.%arr.var_patt.9dd -// CHECK:STDOUT: %array => constants.%array.497 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.553 +// CHECK:STDOUT: %arr.patt.loc7_17.2 => constants.%arr.patt.bc7 +// CHECK:STDOUT: %arr.var_patt.loc7_3.2 => constants.%arr.var_patt.491 +// CHECK:STDOUT: %array => constants.%array.03e // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f -// CHECK:STDOUT: %Destroy.facet.loc7_3.3 => constants.%Destroy.facet.23c -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.180 -// CHECK:STDOUT: %.loc7_3.4 => constants.%.a26 +// CHECK:STDOUT: %Destroy.facet.loc7_3.3 => constants.%Destroy.facet.b75 +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.f08 +// CHECK:STDOUT: %.loc7_3.4 => constants.%.ba8 // CHECK:STDOUT: %impl.elem2.loc7_3.2 => constants.%Destroy.WithSelf.SelfDestruct.db3 // CHECK:STDOUT: %specific_impl_fn.loc7_3.2 => constants.%Destroy.WithSelf.SelfDestruct.db3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: --- fail_todo_init_template_dependent_bound.carbon +// CHECK:STDOUT: --- init_template_dependent_bound.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] @@ -209,27 +205,33 @@ fn H() { G(3); } // CHECK:STDOUT: %pattern_type.6b6: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %N.patt.38a: %pattern_type.6b6 = symbolic_binding_pattern N, 0, template [template] // CHECK:STDOUT: %N.37f: %i32 = symbolic_binding N, 0, template [template] -// CHECK:STDOUT: %.da2: Core.IntLiteral = splice_inst @G.%.loc11_30.2 [template] -// CHECK:STDOUT: %array_type.2dd: type = array_type %.da2, %i32 [template] -// CHECK:STDOUT: %require_complete.1f3: = require_complete_type %array_type.2dd [template] -// CHECK:STDOUT: %pattern_type.273: type = pattern_type %array_type.2dd [template] -// CHECK:STDOUT: %arr.patt.8e5: %pattern_type.273 = ref_binding_pattern arr [template] -// CHECK:STDOUT: %arr.var_patt.8ae: %pattern_type.273 = var_pattern %arr.patt.8e5 [template] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] +// CHECK:STDOUT: %.da2: Core.IntLiteral = splice_inst @G.%.loc6_30.2 [template] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %.78a: type = type_of_inst @G.%.loc6_31.5 [template] +// CHECK:STDOUT: %.c76: %.78a = splice_inst @G.%.loc6_31.5 [template] +// CHECK:STDOUT: %.537: type = splice_inst @G.%.loc6_31.8 [template] +// CHECK:STDOUT: %require_complete.cb0: = require_complete_type %.537 [template] +// CHECK:STDOUT: %pattern_type.fcb: type = pattern_type %.537 [template] +// CHECK:STDOUT: %arr.patt.c8d: %pattern_type.fcb = ref_binding_pattern arr [template] +// CHECK:STDOUT: %arr.var_patt.1e0: %pattern_type.fcb = var_pattern %arr.patt.c8d [template] +// CHECK:STDOUT: %int_1.5b8115.1: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %int_2.ecc8af.1: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] -// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%int_1, %int_2, %int_3.1ba) [concrete] +// CHECK:STDOUT: %tuple.type.37f: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] +// CHECK:STDOUT: %tuple.2d5: %tuple.type.37f = tuple_value (%int_1.5b8115.1, %int_2.ecc8af.1, %int_3.1ba) [concrete] +// CHECK:STDOUT: %tuple.type.f7a: type = tuple_type () [concrete] +// CHECK:STDOUT: %.5d6: %.537 = splice_inst @G.%tuple.elem0 [template] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Self.0e7: %Destroy.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.4e5: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self.0e7) [symbolic] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.4a0: %Destroy.WithSelf.SelfDestruct.type.4e5 = struct_value () [symbolic] // CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete] // CHECK:STDOUT: %assoc2: %Destroy.assoc_type = assoc_entity element2, imports.%Core.import_ref.71d [concrete] -// CHECK:STDOUT: %.8cb: type = type_of_inst @G.%.loc11_3.5 [template] -// CHECK:STDOUT: %.c23: %.8cb = splice_inst @G.%.loc11_3.5 [template] -// CHECK:STDOUT: %.57c: type = type_of_inst @G.%.loc11_3.8 [template] -// CHECK:STDOUT: %.e63: %.57c = splice_inst @G.%.loc11_3.8 [template] +// CHECK:STDOUT: %.8cb: type = type_of_inst @G.%.loc6_3.8 [template] +// CHECK:STDOUT: %.c23: %.8cb = splice_inst @G.%.loc6_3.8 [template] +// CHECK:STDOUT: %.57c: type = type_of_inst @G.%.loc6_3.11 [template] +// CHECK:STDOUT: %.e63: %.57c = splice_inst @G.%.loc6_3.11 [template] // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.7cb: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.48d: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic] @@ -248,47 +250,65 @@ fn H() { G(3); } // CHECK:STDOUT: %.354: Core.IntLiteral = splice_block %.238 [concrete = %int_3.1ba] { // CHECK:STDOUT: %impl.elem0.923: %.e3f = impl_witness_access %ImplicitAs.impl_witness.590, element0 [concrete = %Int.as.ImplicitAs.impl.Convert.69e] // CHECK:STDOUT: %bound_method.1cb: = bound_method %int_3.410, %impl.elem0.923 [concrete = %Int.as.ImplicitAs.impl.Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.923, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete = %Int.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.ae8: = bound_method %int_3.410, %specific_fn [concrete = %bound_method.545] +// CHECK:STDOUT: %specific_fn.c3e: = specific_function %impl.elem0.923, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete = %Int.as.ImplicitAs.impl.Convert.specific_fn] +// CHECK:STDOUT: %bound_method.ae8: = bound_method %int_3.410, %specific_fn.c3e [concrete = %bound_method.545] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.ae8(%int_3.410) [concrete = %int_3.1ba] // CHECK:STDOUT: %.238: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = %int_3.1ba] // CHECK:STDOUT: } // CHECK:STDOUT: } +// CHECK:STDOUT: %Array.b3a0ad.1: type = class_type @Array, @Array(%i32, %int_3.1ba) [concrete] +// CHECK:STDOUT: %inst.class_type: = inst_value [concrete] { +// CHECK:STDOUT: %Array.b3a0ad.2: type = class_type @Array, @Array(%i32, %int_3.1ba) [concrete = %Array.b3a0ad.1] +// CHECK:STDOUT: } +// CHECK:STDOUT: %inst.splice_block.426619.2: = inst_value [concrete] { +// CHECK:STDOUT: %.d7b: type = splice_block %Array.b3a0ad.1 [concrete = %Array.b3a0ad.1] {} +// CHECK:STDOUT: } // CHECK:STDOUT: %array_type.dc7: type = array_type %int_3.1ba, %i32 [concrete] // CHECK:STDOUT: %complete_type.b77: = complete_type_witness %array_type.dc7 [concrete] -// CHECK:STDOUT: %pattern_type.771: type = pattern_type %array_type.dc7 [concrete] -// CHECK:STDOUT: %arr.patt.316: %pattern_type.771 = ref_binding_pattern arr [concrete] -// CHECK:STDOUT: %arr.var_patt.c63: %pattern_type.771 = var_pattern %arr.patt.316 [concrete] +// CHECK:STDOUT: %pattern_type.7a1: type = pattern_type %Array.b3a0ad.1 [concrete] +// CHECK:STDOUT: %arr.patt.843: %pattern_type.7a1 = ref_binding_pattern arr [concrete] +// CHECK:STDOUT: %arr.var_patt.c0b: %pattern_type.7a1 = var_pattern %arr.patt.843 [concrete] +// CHECK:STDOUT: %int_0.5c61a1.1: Core.IntLiteral = int_value 0 [concrete] +// CHECK:STDOUT: %int_1.0c6: %i32 = int_value 1 [concrete] +// CHECK:STDOUT: %int_2.295: %i32 = int_value 2 [concrete] +// CHECK:STDOUT: %array: %Array.b3a0ad.1 = tuple_value (%int_1.0c6, %int_2.295, %int_3.410) [concrete] +// CHECK:STDOUT: %inst.splice_block.426619.3: = inst_value [concrete] { +// CHECK:STDOUT: %.d3c: init %Array.b3a0ad.1 = splice_block %.7ac [concrete = %array] { +// CHECK:STDOUT: +// CHECK:STDOUT: %.3d2a41.2: ref %Array.b3a0ad.1 = specific_inst @G.%arr.var, @G(%int_3.410) +// CHECK:STDOUT: +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: %tuple.242: %tuple.type.f7a = tuple_value (%inst.splice_block.426619.3) [concrete] // CHECK:STDOUT: %self.param_patt.705: %pattern_type.6b6 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.70d: %pattern_type.6b6 = wrapper_binding_pattern self, %self.param_patt.705 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc6_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11_3.1 [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc6_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.1 [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc6_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c42: %pattern_type.771 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3bc: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt.c42 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] +// CHECK:STDOUT: %self.param_patt.717: %pattern_type.7a1 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.cb9: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt.717 [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc6_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc6_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.2 [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc6_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.f8f19d.2: = custom_witness (%Destroy.WithSelf.Op.403171.2, %Destroy.WithSelf.SubobjectDestroy.d01daf.2, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.149: %Destroy.type = facet_value %array_type.dc7, (%custom_witness.f8f19d.2) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.95e: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.149) [concrete] -// CHECK:STDOUT: %.7f7: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.95e, %Destroy.facet.149 [concrete] -// CHECK:STDOUT: %inst.splice_block.426619.2: = inst_value [concrete] { -// CHECK:STDOUT: %.9a5: = splice_block %bound_method.529 { -// CHECK:STDOUT: %.460: ref %array_type.dc7 = specific_inst @G.%arr.var, @G(%int_3.410) -// CHECK:STDOUT: %impl.elem2: %.7f7 = impl_witness_access %custom_witness.f8f19d.2, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.2] -// CHECK:STDOUT: %bound_method.529: = bound_method %.460, %impl.elem2 +// CHECK:STDOUT: %Destroy.facet.cff: %Destroy.type = facet_value %Array.b3a0ad.1, (%custom_witness.f8f19d.2) [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.caa: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.cff) [concrete] +// CHECK:STDOUT: %.afd: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.caa, %Destroy.facet.cff [concrete] +// CHECK:STDOUT: %inst.splice_block.426619.4: = inst_value [concrete] { +// CHECK:STDOUT: %.6c0: = splice_block %bound_method.213 { +// CHECK:STDOUT: %.3d2a41.1: ref %Array.b3a0ad.1 = specific_inst @G.%arr.var, @G(%int_3.410) +// CHECK:STDOUT: %impl.elem2: %.afd = impl_witness_access %custom_witness.f8f19d.2, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.2] +// CHECK:STDOUT: %bound_method.213: = bound_method %.3d2a41.1, %impl.elem2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %inst.call: = inst_value [concrete] { -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %.9a5(%.460) +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %.6c0(%.3d2a41.1) // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -299,112 +319,122 @@ fn H() { G(3); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { +// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc6_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { // CHECK:STDOUT: %self.param_patt: %pattern_type.6b6 = ref_param_pattern [concrete = constants.%self.param_patt.705] // CHECK:STDOUT: %self.patt: %pattern_type.6b6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.70d] // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 // CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { +// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc6_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { // CHECK:STDOUT: %self.param_patt: %pattern_type.6b6 = ref_param_pattern [concrete = constants.%self.param_patt.705] // CHECK:STDOUT: %self.patt: %pattern_type.6b6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.70d] // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 // CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.771 = ref_param_pattern [concrete = constants.%self.param_patt.c42] -// CHECK:STDOUT: %self.patt: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3bc] +// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc6_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { +// CHECK:STDOUT: %self.param_patt: %pattern_type.7a1 = ref_param_pattern [concrete = constants.%self.param_patt.717] +// CHECK:STDOUT: %self.patt: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb9] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.dc7 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.dc7 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.b3a0ad.1 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.b3a0ad.1 = wrapper_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.771 = ref_param_pattern [concrete = constants.%self.param_patt.c42] -// CHECK:STDOUT: %self.patt: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3bc] +// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc6_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { +// CHECK:STDOUT: %self.param_patt: %pattern_type.7a1 = ref_param_pattern [concrete = constants.%self.param_patt.717] +// CHECK:STDOUT: %self.patt: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb9] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.dc7 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.dc7 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.b3a0ad.1 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.b3a0ad.1 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%N.loc5_16.2: %i32) { +// CHECK:STDOUT: generic fn @G(%N.loc4_16.2: %i32) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc11_30.2: = convert_to_value_action %N.ref, Core.IntLiteral [template] -// CHECK:STDOUT: %.loc11_30.3: Core.IntLiteral = splice_inst %.loc11_30.2 [template = %.loc11_30.3 (constants.%.da2)] -// CHECK:STDOUT: %array_type.loc11_31.2: type = array_type %.loc11_30.3, constants.%i32 [template = %array_type.loc11_31.2 (constants.%array_type.2dd)] -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc11_31.2 [template = %require_complete (constants.%require_complete.1f3)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc11_31.2 [template = %pattern_type (constants.%pattern_type.273)] -// CHECK:STDOUT: %arr.patt.loc11_17.2: @G.%pattern_type (%pattern_type.273) = ref_binding_pattern arr [template = %arr.patt.loc11_17.2 (constants.%arr.patt.8e5)] -// CHECK:STDOUT: %arr.var_patt.loc11_3.2: @G.%pattern_type (%pattern_type.273) = var_pattern %arr.patt.loc11_17.2 [template = %arr.var_patt.loc11_3.2 (constants.%arr.var_patt.8ae)] -// CHECK:STDOUT: %.loc11_3.5: = compound_member_access_action %arr.var, constants.%assoc2 [template] -// CHECK:STDOUT: %.loc11_3.6: type = type_of_inst %.loc11_3.5 [template = %.loc11_3.6 (constants.%.8cb)] -// CHECK:STDOUT: %.loc11_3.7: @G.%.loc11_3.6 (%.8cb) = splice_inst %.loc11_3.5 [template = %.loc11_3.7 (constants.%.c23)] -// CHECK:STDOUT: %.loc11_3.8: = call_action (%.loc11_3.2), true [template] -// CHECK:STDOUT: %.loc11_3.9: type = type_of_inst %.loc11_3.8 [template = %.loc11_3.9 (constants.%.57c)] -// CHECK:STDOUT: %.loc11_3.10: @G.%.loc11_3.9 (%.57c) = splice_inst %.loc11_3.8 [template = %.loc11_3.10 (constants.%.e63)] +// CHECK:STDOUT: %.loc6_30.2: = convert_to_value_action %N.ref, Core.IntLiteral [template] +// CHECK:STDOUT: %.loc6_30.3: Core.IntLiteral = splice_inst %.loc6_30.2 [template = %.loc6_30.3 (constants.%.da2)] +// CHECK:STDOUT: %.loc6_31.5: = call_action (constants.%Array.generic, %i32.loc6, %.loc6_30.1), false [template] +// CHECK:STDOUT: %.loc6_31.6: type = type_of_inst %.loc6_31.5 [template = %.loc6_31.6 (constants.%.78a)] +// CHECK:STDOUT: %.loc6_31.7: @G.%.loc6_31.6 (%.78a) = splice_inst %.loc6_31.5 [template = %.loc6_31.7 (constants.%.c76)] +// CHECK:STDOUT: %.loc6_31.8: = convert_to_value_action %.loc6_31.3, type [template] +// CHECK:STDOUT: %.loc6_31.9: type = splice_inst %.loc6_31.8 [template = %.loc6_31.9 (constants.%.537)] +// CHECK:STDOUT: %require_complete: = require_complete_type %.loc6_31.9 [template = %require_complete (constants.%require_complete.cb0)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc6_31.9 [template = %pattern_type (constants.%pattern_type.fcb)] +// CHECK:STDOUT: %arr.patt.loc6_17.2: @G.%pattern_type (%pattern_type.fcb) = ref_binding_pattern arr [template = %arr.patt.loc6_17.2 (constants.%arr.patt.c8d)] +// CHECK:STDOUT: %arr.var_patt.loc6_3.2: @G.%pattern_type (%pattern_type.fcb) = var_pattern %arr.patt.loc6_17.2 [template = %arr.var_patt.loc6_3.2 (constants.%arr.var_patt.1e0)] +// CHECK:STDOUT: %.loc6_3.6: %tuple.type.f7a = initialize_action %.loc6_43, %.loc6_31.9, %arr.var, false [template] +// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc6_3.6, element0 [template] +// CHECK:STDOUT: %.loc6_3.7: @G.%.loc6_31.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc6_3.7 (constants.%.5d6)] +// CHECK:STDOUT: %.loc6_3.8: = compound_member_access_action %arr.var, constants.%assoc2 [template] +// CHECK:STDOUT: %.loc6_3.9: type = type_of_inst %.loc6_3.8 [template = %.loc6_3.9 (constants.%.8cb)] +// CHECK:STDOUT: %.loc6_3.10: @G.%.loc6_3.9 (%.8cb) = splice_inst %.loc6_3.8 [template = %.loc6_3.10 (constants.%.c23)] +// CHECK:STDOUT: %.loc6_3.11: = call_action (%.loc6_3.3), true [template] +// CHECK:STDOUT: %.loc6_3.12: type = type_of_inst %.loc6_3.11 [template = %.loc6_3.12 (constants.%.57c)] +// CHECK:STDOUT: %.loc6_3.13: @G.%.loc6_3.12 (%.57c) = splice_inst %.loc6_3.11 [template = %.loc6_3.13 (constants.%.e63)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.var: ref @G.%array_type.loc11_31.2 (%array_type.2dd) = var_storage %arr.var_patt.loc11_3.1 -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] +// CHECK:STDOUT: %arr.var: ref @G.%.loc6_31.9 (%.537) = var_storage %arr.var_patt.loc6_3.1 +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8115.1] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc8af.1] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %.loc11_43: %tuple.type = tuple_literal (%int_1, %int_2, %int_3) [concrete = constants.%tuple] -// CHECK:STDOUT: assign %arr.var, -// CHECK:STDOUT: %.loc11_31: type = splice_block %array_type.loc11_31.1 [template = %array_type.loc11_31.2 (constants.%array_type.2dd)] { -// CHECK:STDOUT: %i32.loc11: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc5_16.2 [template = %N.loc5_16.1 (constants.%N.37f)] -// CHECK:STDOUT: %.loc11_30.1: Core.IntLiteral = splice_inst %.loc11_30.2 [template = %.loc11_30.3 (constants.%.da2)] -// CHECK:STDOUT: %array_type.loc11_31.1: type = array_type %.loc11_30.1, %i32.loc11 [template = %array_type.loc11_31.2 (constants.%array_type.2dd)] +// CHECK:STDOUT: %.loc6_43: %tuple.type.37f = tuple_literal (%int_1, %int_2, %int_3) [concrete = constants.%tuple.2d5] +// CHECK:STDOUT: %.loc6_3.1: @G.%.loc6_31.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc6_3.7 (constants.%.5d6)] +// CHECK:STDOUT: assign %arr.var, %.loc6_3.1 +// CHECK:STDOUT: %.loc6_31.1: type = splice_block %.loc6_31.4 [template = %.loc6_31.9 (constants.%.537)] { +// CHECK:STDOUT: %i32.loc6: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc4_16.2 [template = %N.loc4_16.1 (constants.%N.37f)] +// CHECK:STDOUT: %.loc6_30.1: Core.IntLiteral = splice_inst %.loc6_30.2 [template = %.loc6_30.3 (constants.%.da2)] +// CHECK:STDOUT: %.loc6_31.2: type = type_of_inst %.loc6_31.5 [template = %.loc6_31.6 (constants.%.78a)] +// CHECK:STDOUT: %.loc6_31.3: @G.%.loc6_31.6 (%.78a) = splice_inst %.loc6_31.5 [template = %.loc6_31.7 (constants.%.c76)] +// CHECK:STDOUT: %.loc6_31.4: type = splice_inst %.loc6_31.8 [template = %.loc6_31.9 (constants.%.537)] // CHECK:STDOUT: } -// CHECK:STDOUT: %arr: ref @G.%array_type.loc11_31.2 (%array_type.2dd) = wrapper_binding arr, %arr.var +// CHECK:STDOUT: %arr: ref @G.%.loc6_31.9 (%.537) = wrapper_binding arr, %arr.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %arr.patt.loc11_17.1: @G.%pattern_type (%pattern_type.273) = ref_binding_pattern arr [template = %arr.patt.loc11_17.2 (constants.%arr.patt.8e5)] -// CHECK:STDOUT: %arr.var_patt.loc11_3.1: @G.%pattern_type (%pattern_type.273) = var_pattern %arr.patt.loc11_17.1 [template = %arr.var_patt.loc11_3.2 (constants.%arr.var_patt.8ae)] +// CHECK:STDOUT: %arr.patt.loc6_17.1: @G.%pattern_type (%pattern_type.fcb) = ref_binding_pattern arr [template = %arr.patt.loc6_17.2 (constants.%arr.patt.c8d)] +// CHECK:STDOUT: %arr.var_patt.loc6_3.1: @G.%pattern_type (%pattern_type.fcb) = var_pattern %arr.patt.loc6_17.1 [template = %arr.var_patt.loc6_3.2 (constants.%arr.var_patt.1e0)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_3.1: type = type_of_inst %.loc11_3.5 [template = %.loc11_3.6 (constants.%.8cb)] -// CHECK:STDOUT: %.loc11_3.2: @G.%.loc11_3.6 (%.8cb) = splice_inst %.loc11_3.5 [template = %.loc11_3.7 (constants.%.c23)] -// CHECK:STDOUT: %.loc11_3.3: type = type_of_inst %.loc11_3.8 [template = %.loc11_3.9 (constants.%.57c)] -// CHECK:STDOUT: %.loc11_3.4: @G.%.loc11_3.9 (%.57c) = splice_inst %.loc11_3.8 [template = %.loc11_3.10 (constants.%.e63)] +// CHECK:STDOUT: %.loc6_3.2: type = type_of_inst %.loc6_3.8 [template = %.loc6_3.9 (constants.%.8cb)] +// CHECK:STDOUT: %.loc6_3.3: @G.%.loc6_3.9 (%.8cb) = splice_inst %.loc6_3.8 [template = %.loc6_3.10 (constants.%.c23)] +// CHECK:STDOUT: %.loc6_3.4: type = type_of_inst %.loc6_3.11 [template = %.loc6_3.12 (constants.%.57c)] +// CHECK:STDOUT: %.loc6_3.5: @G.%.loc6_3.12 (%.57c) = splice_inst %.loc6_3.11 [template = %.loc6_3.13 (constants.%.e63)] // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.1(%self.param: ref %i32) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc6_3.1(%self.param: ref %i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %array_type.dc7) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_3.2(%self.param: ref %Array.b3a0ad.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] -// CHECK:STDOUT: %.loc11_3.1: ref %i32 = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11_3.1: = bound_method %.loc11_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11_3.1(%.loc11_3.1) -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc11_3.2: ref %i32 = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11_3.2: = bound_method %.loc11_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11_3.2(%.loc11_3.2) -// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc11_3.3: ref %i32 = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11_3.3: = bound_method %.loc11_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11_3.3(%.loc11_3.3) +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc8af.1] +// CHECK:STDOUT: %.loc6_3.1: ref %i32 = array_index %self.param, %int_2 +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_3.1: = bound_method %.loc6_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_3.1(%.loc6_3.1) +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8115.1] +// CHECK:STDOUT: %.loc6_3.2: ref %i32 = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_3.2: = bound_method %.loc6_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_3.2(%.loc6_3.2) +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c61a1.1] +// CHECK:STDOUT: %.loc6_3.3: ref %i32 = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_3.3: = bound_method %.loc6_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_3.3(%.loc6_3.3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %array_type.dc7) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_3.2(%self.param: ref %Array.b3a0ad.1) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %array_type.dc7) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc6_3.2(%self.param: ref %Array.b3a0ad.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) @@ -412,27 +442,34 @@ fn H() { G(3); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%N.37f) { -// CHECK:STDOUT: %N.patt.loc5_16.2 => constants.%N.patt.38a -// CHECK:STDOUT: %N.loc5_16.1 => constants.%N.37f +// CHECK:STDOUT: %N.patt.loc4_16.2 => constants.%N.patt.38a +// CHECK:STDOUT: %N.loc4_16.1 => constants.%N.37f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%int_3.410) { -// CHECK:STDOUT: %N.patt.loc5_16.2 => constants.%N.patt.38a -// CHECK:STDOUT: %N.loc5_16.1 => constants.%int_3.410 +// CHECK:STDOUT: %N.patt.loc4_16.2 => constants.%N.patt.38a +// CHECK:STDOUT: %N.loc4_16.1 => constants.%int_3.410 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc11_30.2 => constants.%inst.splice_block.426619.1 -// CHECK:STDOUT: %.loc11_30.3 => constants.%int_3.1ba -// CHECK:STDOUT: %array_type.loc11_31.2 => constants.%array_type.dc7 +// CHECK:STDOUT: %.loc6_30.2 => constants.%inst.splice_block.426619.1 +// CHECK:STDOUT: %.loc6_30.3 => constants.%int_3.1ba +// CHECK:STDOUT: %.loc6_31.5 => constants.%inst.class_type +// CHECK:STDOUT: %.loc6_31.6 => type +// CHECK:STDOUT: %.loc6_31.7 => constants.%Array.b3a0ad.1 +// CHECK:STDOUT: %.loc6_31.8 => constants.%inst.splice_block.426619.2 +// CHECK:STDOUT: %.loc6_31.9 => constants.%Array.b3a0ad.1 // CHECK:STDOUT: %require_complete => constants.%complete_type.b77 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.771 -// CHECK:STDOUT: %arr.patt.loc11_17.2 => constants.%arr.patt.316 -// CHECK:STDOUT: %arr.var_patt.loc11_3.2 => constants.%arr.var_patt.c63 -// CHECK:STDOUT: %.loc11_3.5 => constants.%inst.splice_block.426619.2 -// CHECK:STDOUT: %.loc11_3.6 => -// CHECK:STDOUT: %.loc11_3.7 => -// CHECK:STDOUT: %.loc11_3.8 => constants.%inst.call -// CHECK:STDOUT: %.loc11_3.9 => constants.%empty_tuple.type -// CHECK:STDOUT: %.loc11_3.10 => +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.7a1 +// CHECK:STDOUT: %arr.patt.loc6_17.2 => constants.%arr.patt.843 +// CHECK:STDOUT: %arr.var_patt.loc6_3.2 => constants.%arr.var_patt.c0b +// CHECK:STDOUT: %.loc6_3.6 => constants.%tuple.242 +// CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block.426619.3 +// CHECK:STDOUT: %.loc6_3.7 => constants.%array +// CHECK:STDOUT: %.loc6_3.8 => constants.%inst.splice_block.426619.4 +// CHECK:STDOUT: %.loc6_3.9 => +// CHECK:STDOUT: %.loc6_3.10 => +// CHECK:STDOUT: %.loc6_3.11 => constants.%inst.call +// CHECK:STDOUT: %.loc6_3.12 => constants.%empty_tuple.type +// CHECK:STDOUT: %.loc6_3.13 => // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/array/make_type.carbon b/toolchain/check/testdata/builtins/array/make_type.carbon new file mode 100644 index 000000000000..c8070797795e --- /dev/null +++ b/toolchain/check/testdata/builtins/array/make_type.carbon @@ -0,0 +1,254 @@ +// 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 +// +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/builtins/array/make_type.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/builtins/array/make_type.carbon + +// --- types.carbon + +library "[[@TEST_NAME]]"; + +fn MakeArray(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + +// --- use_types.carbon + +library "[[@TEST_NAME]]"; + +import library "types"; + +//@dump-sem-ir-begin +var a: MakeArray(i32, 3) = (1, 2, 3); +var b: MakeArray(MakeArray(i32, 2), 0) = (); +//@dump-sem-ir-end + +fn Generic[T: type](N: Core.IntLiteral) -> type { + //@dump-sem-ir-begin + return MakeArray(T, N); + //@dump-sem-ir-end +} + +fn Symbolic(generic T: type, generic N: Core.IntLiteral, x: MakeArray(T, N)*) + -> MakeArray(T, N)* { + return x; +} + +// --- import_types.carbon + +library "[[@TEST_NAME]]"; + +import library "types"; +import library "use_types"; + +fn UseA() -> MakeArray(i32, 3)* { + return &a; +} + +fn UseB() -> MakeArray(MakeArray(i32, 2), 0)* { + return &b; +} + +fn UseSymbolic(x: MakeArray(i32, 24)*) -> MakeArray(i32, 24)* { + return Symbolic(i32, 24, x); +} + +// --- fail_negative_bound.carbon + +library "[[@TEST_NAME]]"; + +import library "types"; + +// CHECK:STDERR: fail_negative_bound.carbon:[[@LINE+4]]:8: error: array bound of -1 is negative [ArrayBoundNegative] +// CHECK:STDERR: var n: MakeArray(i32, -1); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: +var n: MakeArray(i32, -1); + +// --- fail_bound_too_large.carbon + +library "[[@TEST_NAME]]"; + +import library "types"; + +// CHECK:STDERR: fail_bound_too_large.carbon:[[@LINE+4]]:8: error: array bound of 18446744073709551616 is too large [ArrayBoundTooLarge] +// CHECK:STDERR: var n: MakeArray(i32, 0x1_0000_0000_0000_0000); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: +var n: MakeArray(i32, 0x1_0000_0000_0000_0000); + +// --- fail_dyn_bound.carbon + +library "[[@TEST_NAME]]"; + +import library "types"; + +fn F(n: Core.IntLiteral) { + // CHECK:STDERR: fail_dyn_bound.carbon:[[@LINE+4]]:17: error: cannot evaluate type expression [TypeExprEvaluationFailure] + // CHECK:STDERR: var unused a: MakeArray(i32, n); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + var unused a: MakeArray(i32, n); +} + +// CHECK:STDOUT: --- use_types.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: type: type = facet_type [concrete] +// CHECK:STDOUT: %MakeArray.type: type = fn_type @MakeArray [concrete] +// CHECK:STDOUT: %MakeArray: %MakeArray.type = struct_value () [concrete] +// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] +// CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] +// CHECK:STDOUT: %array_type.dc7: type = array_type %int_3.1ba, %i32 [concrete] +// CHECK:STDOUT: %pattern_type.771: type = pattern_type %array_type.dc7 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.771 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.771 = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] +// CHECK:STDOUT: %tuple.type.37f: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] +// CHECK:STDOUT: %tuple.2d5: %tuple.type.37f = tuple_value (%int_1.5b8, %int_2.ecc, %int_3.1ba) [concrete] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] +// CHECK:STDOUT: %ImplicitAs.type.914: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] +// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.845: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74 = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.impl_witness.a2a: = impl_witness imports.%ImplicitAs.impl_witness_table.1aa, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.2ba: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.2ba = struct_value () [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.914 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.a2a) [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.8eb: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.b7a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.8eb, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.094: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] +// CHECK:STDOUT: %bound_method.953: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] +// CHECK:STDOUT: %int_1.0c6: %i32 = int_value 1 [concrete] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.9f3: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] +// CHECK:STDOUT: %bound_method.3cb: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] +// CHECK:STDOUT: %int_2.295: %i32 = int_value 2 [concrete] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.485: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] +// CHECK:STDOUT: %bound_method.763: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] +// CHECK:STDOUT: %int_3.410: %i32 = int_value 3 [concrete] +// CHECK:STDOUT: %array.f8d: %array_type.dc7 = tuple_value (%int_1.0c6, %int_2.295, %int_3.410) [concrete] +// CHECK:STDOUT: %array_type.801: type = array_type %int_2.ecc, %i32 [concrete] +// CHECK:STDOUT: %array_type.da1: type = array_type %int_0, %array_type.801 [concrete] +// CHECK:STDOUT: %pattern_type.1f1: type = pattern_type %array_type.da1 [concrete] +// CHECK:STDOUT: %b.patt: %pattern_type.1f1 = ref_binding_pattern b [concrete] +// CHECK:STDOUT: %b.var_patt: %pattern_type.1f1 = var_pattern %b.patt [concrete] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] +// CHECK:STDOUT: %array.c40: %array_type.da1 = tuple_value () [concrete] +// CHECK:STDOUT: %T.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Main.MakeArray: %MakeArray.type = import_ref Main//types, MakeArray, loaded [concrete = constants.%MakeArray] +// CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1aa = impl_witness_table (%Core.import_ref.edf), @Core.IntLiteral.as.ImplicitAs.impl [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: %a.var: ref %array_type.dc7 = var_storage %a.var_patt [concrete] +// CHECK:STDOUT: %.loc7_24.1: type = splice_block %.loc7_24.3 [concrete = constants.%array_type.dc7] { +// CHECK:STDOUT: %MakeArray.ref.loc7: %MakeArray.type = name_ref MakeArray, imports.%Main.MakeArray [concrete = constants.%MakeArray] +// CHECK:STDOUT: %i32.loc7: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] +// CHECK:STDOUT: %MakeArray.call.loc7: init type = call %MakeArray.ref.loc7(%i32.loc7, %int_3) [concrete = constants.%array_type.dc7] +// CHECK:STDOUT: %.loc7_24.2: type = value_of_initializer %MakeArray.call.loc7 [concrete = constants.%array_type.dc7] +// CHECK:STDOUT: %.loc7_24.3: type = converted %MakeArray.call.loc7, %.loc7_24.2 [concrete = constants.%array_type.dc7] +// CHECK:STDOUT: } +// CHECK:STDOUT: %a: ref %array_type.dc7 = wrapper_binding a, %a.var [concrete = %a.var] +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %a.patt: %pattern_type.771 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.771 = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: } +// CHECK:STDOUT: %b.var: ref %array_type.da1 = var_storage %b.var_patt [concrete] +// CHECK:STDOUT: %.loc8_38.1: type = splice_block %.loc8_38.3 [concrete = constants.%array_type.da1] { +// CHECK:STDOUT: %MakeArray.ref.loc8_8: %MakeArray.type = name_ref MakeArray, imports.%Main.MakeArray [concrete = constants.%MakeArray] +// CHECK:STDOUT: %MakeArray.ref.loc8_18: %MakeArray.type = name_ref MakeArray, imports.%Main.MakeArray [concrete = constants.%MakeArray] +// CHECK:STDOUT: %i32.loc8: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] +// CHECK:STDOUT: %MakeArray.call.loc8_34: init type = call %MakeArray.ref.loc8_18(%i32.loc8, %int_2) [concrete = constants.%array_type.801] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] +// CHECK:STDOUT: %.loc8_34.1: type = value_of_initializer %MakeArray.call.loc8_34 [concrete = constants.%array_type.801] +// CHECK:STDOUT: %.loc8_34.2: type = converted %MakeArray.call.loc8_34, %.loc8_34.1 [concrete = constants.%array_type.801] +// CHECK:STDOUT: %MakeArray.call.loc8_38: init type = call %MakeArray.ref.loc8_8(%.loc8_34.2, %int_0) [concrete = constants.%array_type.da1] +// CHECK:STDOUT: %.loc8_38.2: type = value_of_initializer %MakeArray.call.loc8_38 [concrete = constants.%array_type.da1] +// CHECK:STDOUT: %.loc8_38.3: type = converted %MakeArray.call.loc8_38, %.loc8_38.2 [concrete = constants.%array_type.da1] +// CHECK:STDOUT: } +// CHECK:STDOUT: %b: ref %array_type.da1 = wrapper_binding b, %b.var [concrete = %b.var] +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %b.patt: %pattern_type.1f1 = ref_binding_pattern b [concrete = constants.%b.patt] +// CHECK:STDOUT: %b.var_patt: %pattern_type.1f1 = var_pattern %b.patt [concrete = constants.%b.var_patt] +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @Generic(%T.loc11_13.2: type) { +// CHECK:STDOUT: +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%N.param: Core.IntLiteral) -> out %return.param: type { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %MakeArray.ref: %MakeArray.type = name_ref MakeArray, imports.%Main.MakeArray [concrete = constants.%MakeArray] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.2 [symbolic = %T.loc11_13.1 (constants.%T.67d)] +// CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N +// CHECK:STDOUT: %MakeArray.call: init type = call %MakeArray.ref(%T.ref, %N.ref) +// CHECK:STDOUT: return %MakeArray.call +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @__global_init() { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %int_1.loc7_29: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %int_2.loc7_32: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] +// CHECK:STDOUT: %.loc7_36.1: %tuple.type.37f = tuple_literal (%int_1.loc7_29, %int_2.loc7_32, %int_3) [concrete = constants.%tuple.2d5] +// CHECK:STDOUT: %impl.elem0.loc7_36.1: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] +// CHECK:STDOUT: %bound_method.loc7_36.1: = bound_method %int_1.loc7_29, %impl.elem0.loc7_36.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.094] +// CHECK:STDOUT: %specific_fn.loc7_36.1: = specific_function %impl.elem0.loc7_36.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc7_36.2: = bound_method %int_1.loc7_29, %specific_fn.loc7_36.1 [concrete = constants.%bound_method.953] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_36.1: init %i32 = call %bound_method.loc7_36.2(%int_1.loc7_29) [concrete = constants.%int_1.0c6] +// CHECK:STDOUT: %.loc7_36.2: init %i32 = converted %int_1.loc7_29, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_36.1 [concrete = constants.%int_1.0c6] +// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] +// CHECK:STDOUT: %.loc7_36.3: ref %i32 = array_index file.%a.var, %int_0 +// CHECK:STDOUT: %.loc7_36.4: init %i32 to %.loc7_36.3 = in_place_init %.loc7_36.2 [concrete = constants.%int_1.0c6] +// CHECK:STDOUT: %impl.elem0.loc7_36.2: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] +// CHECK:STDOUT: %bound_method.loc7_36.3: = bound_method %int_2.loc7_32, %impl.elem0.loc7_36.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.9f3] +// CHECK:STDOUT: %specific_fn.loc7_36.2: = specific_function %impl.elem0.loc7_36.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc7_36.4: = bound_method %int_2.loc7_32, %specific_fn.loc7_36.2 [concrete = constants.%bound_method.3cb] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_36.2: init %i32 = call %bound_method.loc7_36.4(%int_2.loc7_32) [concrete = constants.%int_2.295] +// CHECK:STDOUT: %.loc7_36.5: init %i32 = converted %int_2.loc7_32, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_36.2 [concrete = constants.%int_2.295] +// CHECK:STDOUT: %int_1.loc7_36: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %.loc7_36.6: ref %i32 = array_index file.%a.var, %int_1.loc7_36 +// CHECK:STDOUT: %.loc7_36.7: init %i32 to %.loc7_36.6 = in_place_init %.loc7_36.5 [concrete = constants.%int_2.295] +// CHECK:STDOUT: %impl.elem0.loc7_36.3: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] +// CHECK:STDOUT: %bound_method.loc7_36.5: = bound_method %int_3, %impl.elem0.loc7_36.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.485] +// CHECK:STDOUT: %specific_fn.loc7_36.3: = specific_function %impl.elem0.loc7_36.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc7_36.6: = bound_method %int_3, %specific_fn.loc7_36.3 [concrete = constants.%bound_method.763] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_36.3: init %i32 = call %bound_method.loc7_36.6(%int_3) [concrete = constants.%int_3.410] +// CHECK:STDOUT: %.loc7_36.8: init %i32 = converted %int_3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_36.3 [concrete = constants.%int_3.410] +// CHECK:STDOUT: %int_2.loc7_36: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] +// CHECK:STDOUT: %.loc7_36.9: ref %i32 = array_index file.%a.var, %int_2.loc7_36 +// CHECK:STDOUT: %.loc7_36.10: init %i32 to %.loc7_36.9 = in_place_init %.loc7_36.8 [concrete = constants.%int_3.410] +// CHECK:STDOUT: %.loc7_36.11: init %array_type.dc7 to file.%a.var = array_init (%.loc7_36.4, %.loc7_36.7, %.loc7_36.10) [concrete = constants.%array.f8d] +// CHECK:STDOUT: %.loc7_1: init %array_type.dc7 = converted %.loc7_36.1, %.loc7_36.11 [concrete = constants.%array.f8d] +// CHECK:STDOUT: assign file.%a.var, %.loc7_1 +// CHECK:STDOUT: %.loc8_43.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc8_43.2: init %array_type.da1 to file.%b.var = array_init () [concrete = constants.%array.c40] +// CHECK:STDOUT: %.loc8_1: init %array_type.da1 = converted %.loc8_43.1, %.loc8_43.2 [concrete = constants.%array.c40] +// CHECK:STDOUT: assign file.%b.var, %.loc8_1 +// CHECK:STDOUT: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc11_13.1 => constants.%T.67d +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/int/and.carbon b/toolchain/check/testdata/builtins/int/and.carbon index 4c5da6317150..7398619a134c 100644 --- a/toolchain/check/testdata/builtins/int/and.carbon +++ b/toolchain/check/testdata/builtins/int/and.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/builtins/int/complement.carbon b/toolchain/check/testdata/builtins/int/complement.carbon index 4d400214e433..04dd2080af3f 100644 --- a/toolchain/check/testdata/builtins/int/complement.carbon +++ b/toolchain/check/testdata/builtins/int/complement.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/builtins/int/or.carbon b/toolchain/check/testdata/builtins/int/or.carbon index 0b84759a30d3..2a744e8147c9 100644 --- a/toolchain/check/testdata/builtins/int/or.carbon +++ b/toolchain/check/testdata/builtins/int/or.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/builtins/int/sdiv.carbon b/toolchain/check/testdata/builtins/int/sdiv.carbon index 0eca46e3aa0e..9acf46f05881 100644 --- a/toolchain/check/testdata/builtins/int/sdiv.carbon +++ b/toolchain/check/testdata/builtins/int/sdiv.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/builtins/int/smod.carbon b/toolchain/check/testdata/builtins/int/smod.carbon index 54814f462f02..541968d6faf3 100644 --- a/toolchain/check/testdata/builtins/int/smod.carbon +++ b/toolchain/check/testdata/builtins/int/smod.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/builtins/int/ssub.carbon b/toolchain/check/testdata/builtins/int/ssub.carbon index bb3de691ed9d..ab8707c3dd49 100644 --- a/toolchain/check/testdata/builtins/int/ssub.carbon +++ b/toolchain/check/testdata/builtins/int/ssub.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/builtins/int/udiv.carbon b/toolchain/check/testdata/builtins/int/udiv.carbon index d7eefcb0de72..6baeee69508e 100644 --- a/toolchain/check/testdata/builtins/int/udiv.carbon +++ b/toolchain/check/testdata/builtins/int/udiv.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/builtins/int/umod.carbon b/toolchain/check/testdata/builtins/int/umod.carbon index 8ac4b433c97c..7dc75bb61c56 100644 --- a/toolchain/check/testdata/builtins/int/umod.carbon +++ b/toolchain/check/testdata/builtins/int/umod.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/builtins/int/umul.carbon b/toolchain/check/testdata/builtins/int/umul.carbon index 284d8d87e1a3..f4b1f82a86cf 100644 --- a/toolchain/check/testdata/builtins/int/umul.carbon +++ b/toolchain/check/testdata/builtins/int/umul.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/builtins/int/usub.carbon b/toolchain/check/testdata/builtins/int/usub.carbon index 9da0f18bbb06..0c1a60f3855f 100644 --- a/toolchain/check/testdata/builtins/int/usub.carbon +++ b/toolchain/check/testdata/builtins/int/usub.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/builtins/int/xor.carbon b/toolchain/check/testdata/builtins/int/xor.carbon index 3917dac7e828..f965fdc5edfc 100644 --- a/toolchain/check/testdata/builtins/int/xor.carbon +++ b/toolchain/check/testdata/builtins/int/xor.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index bb686869c2aa..e82c705655d6 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -157,18 +157,20 @@ fn G() { // CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type.3ec: type = array_type %int_3, %T [symbolic] -// CHECK:STDOUT: %pattern_type.b3f: type = pattern_type %array_type.3ec [symbolic] -// CHECK:STDOUT: %a.param_patt.480: %pattern_type.b3f = value_param_pattern [symbolic] -// CHECK:STDOUT: %a.patt.bde: %pattern_type.b3f = wrapper_binding_pattern a, %a.param_patt.480 [symbolic] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.ade: type = class_type @Array, @Array(%T, %int_3) [symbolic] +// CHECK:STDOUT: %pattern_type.938: type = pattern_type %Array.ade [symbolic] +// CHECK:STDOUT: %a.param_patt.cd1: %pattern_type.938 = value_param_pattern [symbolic] +// CHECK:STDOUT: %a.patt.9a8: %pattern_type.938 = wrapper_binding_pattern a, %a.param_patt.cd1 [symbolic] // CHECK:STDOUT: %.184: Core.Form = init_form %T [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] // CHECK:STDOUT: %return.param_patt.41d: %pattern_type.51d = out_param_pattern [symbolic] // CHECK:STDOUT: %return.patt.b39: %pattern_type.51d = return_slot_pattern %return.param_patt.41d, %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.ff3: = require_complete_type %array_type.3ec [symbolic] +// CHECK:STDOUT: %require_complete.348: = require_complete_type %Array.ade [symbolic] // CHECK:STDOUT: %F.specific_fn.eab: = specific_function %F, @F(%T) [symbolic] // CHECK:STDOUT: %.a44: Core.Form = init_form %C [concrete] // CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete] @@ -176,10 +178,12 @@ fn G() { // CHECK:STDOUT: %return.patt.e4a: %pattern_type.98b = return_slot_pattern %return.param_patt.89a, %C [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.e6a: type = class_type @Array, @Array(%C, %int_3) [concrete] // CHECK:STDOUT: %array_type.9a3: type = array_type %int_3, %C [concrete] -// CHECK:STDOUT: %pattern_type.3f5: type = pattern_type %array_type.9a3 [concrete] -// CHECK:STDOUT: %a.patt.b51: %pattern_type.3f5 = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.3f5 = var_pattern %a.patt.b51 [concrete] +// CHECK:STDOUT: %complete_type.1a4: = complete_type_witness %array_type.9a3 [concrete] +// CHECK:STDOUT: %pattern_type.66c: type = pattern_type %Array.e6a [concrete] +// CHECK:STDOUT: %a.patt.e57: %pattern_type.66c = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.66c = var_pattern %a.patt.e57 [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %tuple.type.8d4: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type.8d4 = tuple_value (%empty_struct, %empty_struct, %empty_struct) [concrete] @@ -187,9 +191,9 @@ fn G() { // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %array: %array_type.9a3 = tuple_value (%C.val, %C.val, %C.val) [concrete] -// CHECK:STDOUT: %a.param_patt.79a: %pattern_type.3f5 = value_param_pattern [concrete] -// CHECK:STDOUT: %a.patt.40c: %pattern_type.3f5 = wrapper_binding_pattern a, %a.param_patt.79a [concrete] +// CHECK:STDOUT: %array: %Array.e6a = tuple_value (%C.val, %C.val, %C.val) [concrete] +// CHECK:STDOUT: %a.param_patt.254: %pattern_type.66c = value_param_pattern [concrete] +// CHECK:STDOUT: %a.patt.0bd: %pattern_type.66c = wrapper_binding_pattern a, %a.param_patt.254 [concrete] // CHECK:STDOUT: %F.specific_fn.e0d: = specific_function %F, @F(%C) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] @@ -207,23 +211,24 @@ fn G() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2ae: %pattern_type.3f5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.277: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt.2ae [concrete] +// CHECK:STDOUT: %self.param_patt.880: %pattern_type.66c = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.a20: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt.880 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %complete_type.1a4: = complete_type_witness %array_type.9a3 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -257,18 +262,18 @@ fn G() { // CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f5 = ref_param_pattern [concrete = constants.%self.param_patt.2ae] -// CHECK:STDOUT: %self.patt: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.277] +// CHECK:STDOUT: %self.param_patt: %pattern_type.66c = ref_param_pattern [concrete = constants.%self.param_patt.880] +// CHECK:STDOUT: %self.patt: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a20] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.9a3 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.9a3 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.e6a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.e6a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f5 = ref_param_pattern [concrete = constants.%self.param_patt.2ae] -// CHECK:STDOUT: %self.patt: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.277] +// CHECK:STDOUT: %self.param_patt: %pattern_type.66c = ref_param_pattern [concrete = constants.%self.param_patt.880] +// CHECK:STDOUT: %self.patt: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a20] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.9a3 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.9a3 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.e6a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.e6a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -283,8 +288,8 @@ fn G() { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %a.param_patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.b3f) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.480)] -// CHECK:STDOUT: %a.patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.b3f) = wrapper_binding_pattern a, %a.param_patt.loc6_16.1 [symbolic = %a.patt.loc6_16.2 (constants.%a.patt.bde)] +// CHECK:STDOUT: %a.param_patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.938) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.cd1)] +// CHECK:STDOUT: %a.patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.938) = wrapper_binding_pattern a, %a.param_patt.loc6_16.1 [symbolic = %a.patt.loc6_16.2 (constants.%a.patt.9a8)] // CHECK:STDOUT: %return.param_patt.loc6_34.1: @F.%pattern_type.loc6_34 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_34.2 (constants.%return.param_patt.41d)] // CHECK:STDOUT: %return.patt.loc6_31.1: @F.%pattern_type.loc6_34 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_34.1, %T.ref.loc6_34 [symbolic = %return.patt.loc6_31.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { @@ -295,13 +300,13 @@ fn G() { // CHECK:STDOUT: %.loc6_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %a.param: @F.%array_type.loc6_28.1 (%array_type.3ec) = value_param call_param0 -// CHECK:STDOUT: %.loc6_28: type = splice_block %array_type.loc6_28.2 [symbolic = %array_type.loc6_28.1 (constants.%array_type.3ec)] { +// CHECK:STDOUT: %a.param: @F.%Array.loc6_28.1 (%Array.ade) = value_param call_param0 +// CHECK:STDOUT: %.loc6_28: type = splice_block %Array.loc6_28.2 [symbolic = %Array.loc6_28.1 (constants.%Array.ade)] { // CHECK:STDOUT: %T.ref.loc6_24: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %array_type.loc6_28.2: type = array_type %int_3, %T.ref.loc6_24 [symbolic = %array_type.loc6_28.1 (constants.%array_type.3ec)] +// CHECK:STDOUT: %Array.loc6_28.2: type = class_type @Array, @Array(constants.%T, constants.%int_3) [symbolic = %Array.loc6_28.1 (constants.%Array.ade)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%array_type.loc6_28.1 (%array_type.3ec) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%Array.loc6_28.1 (%Array.ade) = wrapper_binding a, %a.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_7.1 (%T) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_7.1 (%T) = return_slot %return.param // CHECK:STDOUT: } @@ -327,23 +332,23 @@ fn G() { // CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type) { // CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %array_type.loc6_28.1: type = array_type constants.%int_3, %T.loc6_7.1 [symbolic = %array_type.loc6_28.1 (constants.%array_type.3ec)] -// CHECK:STDOUT: %pattern_type.loc6_16: type = pattern_type %array_type.loc6_28.1 [symbolic = %pattern_type.loc6_16 (constants.%pattern_type.b3f)] -// CHECK:STDOUT: %a.param_patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.b3f) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.480)] -// CHECK:STDOUT: %a.patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.b3f) = wrapper_binding_pattern a, %a.param_patt.loc6_16.2 [symbolic = %a.patt.loc6_16.2 (constants.%a.patt.bde)] +// CHECK:STDOUT: %Array.loc6_28.1: type = class_type @Array, @Array(%T.loc6_7.1, constants.%int_3) [symbolic = %Array.loc6_28.1 (constants.%Array.ade)] +// CHECK:STDOUT: %pattern_type.loc6_16: type = pattern_type %Array.loc6_28.1 [symbolic = %pattern_type.loc6_16 (constants.%pattern_type.938)] +// CHECK:STDOUT: %a.param_patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.938) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.cd1)] +// CHECK:STDOUT: %a.patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.938) = wrapper_binding_pattern a, %a.param_patt.loc6_16.2 [symbolic = %a.patt.loc6_16.2 (constants.%a.patt.9a8)] // CHECK:STDOUT: %.loc6_34.2: Core.Form = init_form %T.loc6_7.1 [symbolic = %.loc6_34.2 (constants.%.184)] // CHECK:STDOUT: %pattern_type.loc6_34: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc6_34 (constants.%pattern_type.51d)] // CHECK:STDOUT: %return.param_patt.loc6_34.2: @F.%pattern_type.loc6_34 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_34.2 (constants.%return.param_patt.41d)] // CHECK:STDOUT: %return.patt.loc6_31.2: @F.%pattern_type.loc6_34 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_34.2, %T.loc6_7.1 [symbolic = %return.patt.loc6_31.2 (constants.%return.patt.b39)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_28.1 [symbolic = %require_complete (constants.%require_complete.ff3)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Array.loc6_28.1 [symbolic = %require_complete (constants.%require_complete.348)] // CHECK:STDOUT: %F.specific_fn.loc6_45.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_45.2 (constants.%F.specific_fn.eab)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_28.1 (%array_type.3ec)) -> out %return.param: @F.%T.loc6_7.1 (%T) { +// CHECK:STDOUT: fn(%a.param: @F.%Array.loc6_28.1 (%Array.ade)) -> out %return.param: @F.%T.loc6_7.1 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %a.ref: @F.%array_type.loc6_28.1 (%array_type.3ec) = name_ref a, %a +// CHECK:STDOUT: %a.ref: @F.%Array.loc6_28.1 (%Array.ade) = name_ref a, %a // CHECK:STDOUT: %F.specific_fn.loc6_45.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_45.2 (constants.%F.specific_fn.eab)] // CHECK:STDOUT: %.loc6_34.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} // CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_34.1 = call %F.specific_fn.loc6_45.1(%a.ref) @@ -353,7 +358,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> out %return.param: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.var: ref %array_type.9a3 = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.e6a = var_storage %a.var_patt // CHECK:STDOUT: %.loc9_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc9_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc9_34.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] @@ -370,24 +375,24 @@ fn G() { // CHECK:STDOUT: %.loc9_35.6: ref %C = array_index %a.var, %int_2 // CHECK:STDOUT: %.loc9_34.2: init %C to %.loc9_35.6 = class_init () [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.7: init %C = converted %.loc9_34.1, %.loc9_34.2 [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc9_35.8: init %array_type.9a3 to %a.var = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_3: init %array_type.9a3 = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] +// CHECK:STDOUT: %.loc9_35.8: init %Array.e6a to %a.var = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) [concrete = constants.%array] +// CHECK:STDOUT: %.loc9_3: init %Array.e6a = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc9_3 -// CHECK:STDOUT: %.loc9_20: type = splice_block %array_type [concrete = constants.%array_type.9a3] { +// CHECK:STDOUT: %.loc9_20: type = splice_block %Array [concrete = constants.%Array.e6a] { // CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %C.ref.loc9 [concrete = constants.%array_type.9a3] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%C, constants.%int_3) [concrete = constants.%Array.e6a] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type.9a3 = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.e6a = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.3f5 = ref_binding_pattern a [concrete = constants.%a.patt.b51] -// CHECK:STDOUT: %a.var_patt: %pattern_type.3f5 = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.66c = ref_binding_pattern a [concrete = constants.%a.patt.e57] +// CHECK:STDOUT: %a.var_patt: %pattern_type.66c = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %a.ref: ref %array_type.9a3 = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %Array.e6a = name_ref a, %a // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C) [concrete = constants.%F.specific_fn.e0d] // CHECK:STDOUT: %.loc8_11.1: ref %C = splice_block %return.param {} -// CHECK:STDOUT: %.loc10: %array_type.9a3 = acquire_value %a.ref +// CHECK:STDOUT: %.loc10: %Array.e6a = acquire_value %a.ref // CHECK:STDOUT: %F.call: init %C to %.loc8_11.1 = call %F.specific_fn(%.loc10) // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) @@ -416,7 +421,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %array_type.9a3) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Array.e6a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc9_3.1: ref %C = array_index %self.param, %int_2 @@ -433,9 +438,9 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %array_type.9a3) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Array.e6a) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %array_type.9a3) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %Array.e6a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) @@ -445,27 +450,27 @@ fn G() { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%T -// CHECK:STDOUT: %array_type.loc6_28.1 => constants.%array_type.3ec -// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.b3f -// CHECK:STDOUT: %a.param_patt.loc6_16.2 => constants.%a.param_patt.480 -// CHECK:STDOUT: %a.patt.loc6_16.2 => constants.%a.patt.bde +// CHECK:STDOUT: %Array.loc6_28.1 => constants.%Array.ade +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.938 +// CHECK:STDOUT: %a.param_patt.loc6_16.2 => constants.%a.param_patt.cd1 +// CHECK:STDOUT: %a.patt.loc6_16.2 => constants.%a.patt.9a8 // CHECK:STDOUT: %.loc6_34.2 => constants.%.184 // CHECK:STDOUT: %pattern_type.loc6_34 => constants.%pattern_type.51d // CHECK:STDOUT: %return.param_patt.loc6_34.2 => constants.%return.param_patt.41d // CHECK:STDOUT: %return.patt.loc6_31.2 => constants.%return.patt.b39 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%require_complete.ff3 +// CHECK:STDOUT: %require_complete => constants.%require_complete.348 // CHECK:STDOUT: %F.specific_fn.loc6_45.2 => constants.%F.specific_fn.eab // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%C -// CHECK:STDOUT: %array_type.loc6_28.1 => constants.%array_type.9a3 -// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.3f5 -// CHECK:STDOUT: %a.param_patt.loc6_16.2 => constants.%a.param_patt.79a -// CHECK:STDOUT: %a.patt.loc6_16.2 => constants.%a.patt.40c +// CHECK:STDOUT: %Array.loc6_28.1 => constants.%Array.e6a +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.66c +// CHECK:STDOUT: %a.param_patt.loc6_16.2 => constants.%a.param_patt.254 +// CHECK:STDOUT: %a.patt.loc6_16.2 => constants.%a.patt.0bd // CHECK:STDOUT: %.loc6_34.2 => constants.%.a44 // CHECK:STDOUT: %pattern_type.loc6_34 => constants.%pattern_type.98b // CHECK:STDOUT: %return.param_patt.loc6_34.2 => constants.%return.param_patt.89a @@ -485,15 +490,17 @@ fn G() { // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete] -// CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] -// CHECK:STDOUT: %array_type.87f: type = array_type %N, %C [symbolic] -// CHECK:STDOUT: %pattern_type.5ed: type = pattern_type %array_type.87f [symbolic] -// CHECK:STDOUT: %a.param_patt.9e2: %pattern_type.5ed = value_param_pattern [symbolic] -// CHECK:STDOUT: %a.patt.8c4: %pattern_type.5ed = wrapper_binding_pattern a, %a.param_patt.9e2 [symbolic] +// CHECK:STDOUT: %N.patt.aa5: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.1b0: type = class_type @Array, @Array(%C, %N.fe9) [symbolic] +// CHECK:STDOUT: %pattern_type.b03: type = pattern_type %Array.1b0 [symbolic] +// CHECK:STDOUT: %a.param_patt.327: %pattern_type.b03 = value_param_pattern [symbolic] +// CHECK:STDOUT: %a.patt.001: %pattern_type.b03 = wrapper_binding_pattern a, %a.param_patt.327 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %.795f: Core.Form = init_form %i32 [concrete] @@ -502,7 +509,7 @@ fn G() { // CHECK:STDOUT: %return.patt.e1b: %pattern_type.6b6 = return_slot_pattern %return.param_patt.a9a, %i32 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.29f: = require_complete_type %array_type.87f [symbolic] +// CHECK:STDOUT: %require_complete.25c: = require_complete_type %Array.1b0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.914: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] @@ -515,17 +522,19 @@ fn G() { // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.914 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.a2a) [concrete] // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.8eb: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %.b7a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.8eb, %ImplicitAs.facet [concrete] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2b9: = bound_method %N, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [symbolic] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2b9: = bound_method %N.fe9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] -// CHECK:STDOUT: %bound_method.ee4: = bound_method %N, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.ee4(%N) [symbolic] +// CHECK:STDOUT: %bound_method.ee4: = bound_method %N.fe9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.ee4(%N.fe9) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] +// CHECK:STDOUT: %Array.e6a: type = class_type @Array, @Array(%C, %int_3.1ba) [concrete] // CHECK:STDOUT: %array_type.9a3: type = array_type %int_3.1ba, %C [concrete] -// CHECK:STDOUT: %pattern_type.3f5: type = pattern_type %array_type.9a3 [concrete] -// CHECK:STDOUT: %a.patt.b51: %pattern_type.3f5 = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.3f5 = var_pattern %a.patt.b51 [concrete] +// CHECK:STDOUT: %complete_type.1a4: = complete_type_witness %array_type.9a3 [concrete] +// CHECK:STDOUT: %pattern_type.66c: type = pattern_type %Array.e6a [concrete] +// CHECK:STDOUT: %a.patt.e57: %pattern_type.66c = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.66c = var_pattern %a.patt.e57 [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %tuple.type.8d4: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type.8d4 = tuple_value (%empty_struct, %empty_struct, %empty_struct) [concrete] @@ -533,9 +542,9 @@ fn G() { // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %array: %array_type.9a3 = tuple_value (%C.val, %C.val, %C.val) [concrete] -// CHECK:STDOUT: %a.param_patt.79a: %pattern_type.3f5 = value_param_pattern [concrete] -// CHECK:STDOUT: %a.patt.40c: %pattern_type.3f5 = wrapper_binding_pattern a, %a.param_patt.79a [concrete] +// CHECK:STDOUT: %array: %Array.e6a = tuple_value (%C.val, %C.val, %C.val) [concrete] +// CHECK:STDOUT: %a.param_patt.254: %pattern_type.66c = value_param_pattern [concrete] +// CHECK:STDOUT: %a.patt.0bd: %pattern_type.66c = wrapper_binding_pattern a, %a.param_patt.254 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_3.1ba) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] @@ -554,15 +563,14 @@ fn G() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2ae: %pattern_type.3f5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.277: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt.2ae [concrete] +// CHECK:STDOUT: %self.param_patt.880: %pattern_type.66c = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.a20: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt.880 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %complete_type.1a4: = complete_type_witness %array_type.9a3 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.485: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] // CHECK:STDOUT: %bound_method.763: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.410: %i32 = int_value 3 [concrete] @@ -571,6 +579,7 @@ fn G() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .IntLiteral = %Core.IntLiteral +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Destroy = %Core.Destroy @@ -578,6 +587,7 @@ fn G() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.IntLiteral: type = import_ref Core//prelude/parts/int_literal, IntLiteral, loaded [concrete = Core.IntLiteral] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] @@ -615,18 +625,18 @@ fn G() { // CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f5 = ref_param_pattern [concrete = constants.%self.param_patt.2ae] -// CHECK:STDOUT: %self.patt: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.277] +// CHECK:STDOUT: %self.param_patt: %pattern_type.66c = ref_param_pattern [concrete = constants.%self.param_patt.880] +// CHECK:STDOUT: %self.patt: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a20] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.9a3 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.9a3 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.e6a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.e6a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f5 = ref_param_pattern [concrete = constants.%self.param_patt.2ae] -// CHECK:STDOUT: %self.patt: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.277] +// CHECK:STDOUT: %self.param_patt: %pattern_type.66c = ref_param_pattern [concrete = constants.%self.param_patt.880] +// CHECK:STDOUT: %self.patt: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a20] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.9a3 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.9a3 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.e6a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.e6a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -640,9 +650,9 @@ fn G() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %N.patt.loc6_7.1: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_7.2 (constants.%N.patt)] -// CHECK:STDOUT: %a.param_patt.loc6_34.1: @F.%pattern_type (%pattern_type.5ed) = value_param_pattern [symbolic = %a.param_patt.loc6_34.2 (constants.%a.param_patt.9e2)] -// CHECK:STDOUT: %a.patt.loc6_34.1: @F.%pattern_type (%pattern_type.5ed) = wrapper_binding_pattern a, %a.param_patt.loc6_34.1 [symbolic = %a.patt.loc6_34.2 (constants.%a.patt.8c4)] +// CHECK:STDOUT: %N.patt.loc6_7.1: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_7.2 (constants.%N.patt.aa5)] +// CHECK:STDOUT: %a.param_patt.loc6_34.1: @F.%pattern_type (%pattern_type.b03) = value_param_pattern [symbolic = %a.param_patt.loc6_34.2 (constants.%a.param_patt.327)] +// CHECK:STDOUT: %a.patt.loc6_34.1: @F.%pattern_type (%pattern_type.b03) = wrapper_binding_pattern a, %a.param_patt.loc6_34.1 [symbolic = %a.patt.loc6_34.2 (constants.%a.patt.001)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] // CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { @@ -653,14 +663,14 @@ fn G() { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc6_7.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc6_7.1 (constants.%N)] -// CHECK:STDOUT: %a.param: @F.%array_type.loc6_46.1 (%array_type.87f) = value_param call_param0 -// CHECK:STDOUT: %.loc6_46: type = splice_block %array_type.loc6_46.2 [symbolic = %array_type.loc6_46.1 (constants.%array_type.87f)] { +// CHECK:STDOUT: %N.loc6_7.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc6_7.1 (constants.%N.fe9)] +// CHECK:STDOUT: %a.param: @F.%Array.loc6_46.1 (%Array.1b0) = value_param call_param0 +// CHECK:STDOUT: %.loc6_46: type = splice_block %Array.loc6_46.2 [symbolic = %Array.loc6_46.1 (constants.%Array.1b0)] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %N.ref.loc6_45: Core.IntLiteral = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N)] -// CHECK:STDOUT: %array_type.loc6_46.2: type = array_type %N.ref.loc6_45, %C.ref [symbolic = %array_type.loc6_46.1 (constants.%array_type.87f)] +// CHECK:STDOUT: %N.ref.loc6_45: Core.IntLiteral = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N.fe9)] +// CHECK:STDOUT: %Array.loc6_46.2: type = class_type @Array, @Array(constants.%C, constants.%N.fe9) [symbolic = %Array.loc6_46.1 (constants.%Array.1b0)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%array_type.loc6_46.1 (%array_type.87f) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%Array.loc6_46.1 (%Array.1b0) = wrapper_binding a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -684,22 +694,22 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%N.loc6_7.2: Core.IntLiteral) { -// CHECK:STDOUT: %N.patt.loc6_7.2: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_7.2 (constants.%N.patt)] -// CHECK:STDOUT: %N.loc6_7.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc6_7.1 (constants.%N)] -// CHECK:STDOUT: %array_type.loc6_46.1: type = array_type %N.loc6_7.1, constants.%C [symbolic = %array_type.loc6_46.1 (constants.%array_type.87f)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc6_46.1 [symbolic = %pattern_type (constants.%pattern_type.5ed)] -// CHECK:STDOUT: %a.param_patt.loc6_34.2: @F.%pattern_type (%pattern_type.5ed) = value_param_pattern [symbolic = %a.param_patt.loc6_34.2 (constants.%a.param_patt.9e2)] -// CHECK:STDOUT: %a.patt.loc6_34.2: @F.%pattern_type (%pattern_type.5ed) = wrapper_binding_pattern a, %a.param_patt.loc6_34.2 [symbolic = %a.patt.loc6_34.2 (constants.%a.patt.8c4)] +// CHECK:STDOUT: %N.patt.loc6_7.2: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_7.2 (constants.%N.patt.aa5)] +// CHECK:STDOUT: %N.loc6_7.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc6_7.1 (constants.%N.fe9)] +// CHECK:STDOUT: %Array.loc6_46.1: type = class_type @Array, @Array(constants.%C, %N.loc6_7.1) [symbolic = %Array.loc6_46.1 (constants.%Array.1b0)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Array.loc6_46.1 [symbolic = %pattern_type (constants.%pattern_type.b03)] +// CHECK:STDOUT: %a.param_patt.loc6_34.2: @F.%pattern_type (%pattern_type.b03) = value_param_pattern [symbolic = %a.param_patt.loc6_34.2 (constants.%a.param_patt.327)] +// CHECK:STDOUT: %a.patt.loc6_34.2: @F.%pattern_type (%pattern_type.b03) = wrapper_binding_pattern a, %a.param_patt.loc6_34.2 [symbolic = %a.patt.loc6_34.2 (constants.%a.patt.001)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_46.1 [symbolic = %require_complete (constants.%require_complete.29f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Array.loc6_46.1 [symbolic = %require_complete (constants.%require_complete.25c)] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %N.loc6_7.1, constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2b9)] // CHECK:STDOUT: %bound_method.loc6_66.3: = bound_method %N.loc6_7.1, constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc6_66.3 (constants.%bound_method.ee4)] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_66.2: init %i32 = call %bound_method.loc6_66.3(%N.loc6_7.1) [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_66.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_46.1 (%array_type.87f)) -> out %return.param: %i32 { +// CHECK:STDOUT: fn(%a.param: @F.%Array.loc6_46.1 (%Array.1b0)) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %N.ref.loc6_65: Core.IntLiteral = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N)] +// CHECK:STDOUT: %N.ref.loc6_65: Core.IntLiteral = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N.fe9)] // CHECK:STDOUT: %impl.elem0: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc6_66.1: = bound_method %N.ref.loc6_65, %impl.elem0 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2b9)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] @@ -712,7 +722,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.var: ref %array_type.9a3 = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.e6a = var_storage %a.var_patt // CHECK:STDOUT: %.loc9_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc9_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc9_34.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] @@ -729,23 +739,23 @@ fn G() { // CHECK:STDOUT: %.loc9_35.6: ref %C = array_index %a.var, %int_2 // CHECK:STDOUT: %.loc9_34.2: init %C to %.loc9_35.6 = class_init () [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.7: init %C = converted %.loc9_34.1, %.loc9_34.2 [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc9_35.8: init %array_type.9a3 to %a.var = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_3: init %array_type.9a3 = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] +// CHECK:STDOUT: %.loc9_35.8: init %Array.e6a to %a.var = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) [concrete = constants.%array] +// CHECK:STDOUT: %.loc9_3: init %Array.e6a = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc9_3 -// CHECK:STDOUT: %.loc9_20: type = splice_block %array_type [concrete = constants.%array_type.9a3] { +// CHECK:STDOUT: %.loc9_20: type = splice_block %Array [concrete = constants.%Array.e6a] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %C.ref [concrete = constants.%array_type.9a3] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%C, constants.%int_3.1ba) [concrete = constants.%Array.e6a] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type.9a3 = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.e6a = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.3f5 = ref_binding_pattern a [concrete = constants.%a.patt.b51] -// CHECK:STDOUT: %a.var_patt: %pattern_type.3f5 = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.66c = ref_binding_pattern a [concrete = constants.%a.patt.e57] +// CHECK:STDOUT: %a.var_patt: %pattern_type.66c = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %a.ref: ref %array_type.9a3 = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %Array.e6a = name_ref a, %a // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%int_3.1ba) [concrete = constants.%F.specific_fn] -// CHECK:STDOUT: %.loc10: %array_type.9a3 = acquire_value %a.ref +// CHECK:STDOUT: %.loc10: %Array.e6a = acquire_value %a.ref // CHECK:STDOUT: %F.call: init %i32 = call %F.specific_fn(%.loc10) // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) @@ -774,7 +784,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %array_type.9a3) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Array.e6a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc9_3.1: ref %C = array_index %self.param, %int_2 @@ -791,31 +801,31 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %array_type.9a3) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Array.e6a) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %array_type.9a3) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %Array.e6a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%N) { -// CHECK:STDOUT: %N.patt.loc6_7.2 => constants.%N.patt -// CHECK:STDOUT: %N.loc6_7.1 => constants.%N -// CHECK:STDOUT: %array_type.loc6_46.1 => constants.%array_type.87f -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.5ed -// CHECK:STDOUT: %a.param_patt.loc6_34.2 => constants.%a.param_patt.9e2 -// CHECK:STDOUT: %a.patt.loc6_34.2 => constants.%a.patt.8c4 +// CHECK:STDOUT: specific @F(constants.%N.fe9) { +// CHECK:STDOUT: %N.patt.loc6_7.2 => constants.%N.patt.aa5 +// CHECK:STDOUT: %N.loc6_7.1 => constants.%N.fe9 +// CHECK:STDOUT: %Array.loc6_46.1 => constants.%Array.1b0 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.b03 +// CHECK:STDOUT: %a.param_patt.loc6_34.2 => constants.%a.param_patt.327 +// CHECK:STDOUT: %a.patt.loc6_34.2 => constants.%a.patt.001 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%int_3.1ba) { -// CHECK:STDOUT: %N.patt.loc6_7.2 => constants.%N.patt +// CHECK:STDOUT: %N.patt.loc6_7.2 => constants.%N.patt.aa5 // CHECK:STDOUT: %N.loc6_7.1 => constants.%int_3.1ba -// CHECK:STDOUT: %array_type.loc6_46.1 => constants.%array_type.9a3 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.3f5 -// CHECK:STDOUT: %a.param_patt.loc6_34.2 => constants.%a.param_patt.79a -// CHECK:STDOUT: %a.patt.loc6_34.2 => constants.%a.patt.40c +// CHECK:STDOUT: %Array.loc6_46.1 => constants.%Array.e6a +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.66c +// CHECK:STDOUT: %a.param_patt.loc6_34.2 => constants.%a.param_patt.254 +// CHECK:STDOUT: %a.patt.loc6_34.2 => constants.%a.patt.0bd // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.1a4 @@ -838,21 +848,25 @@ fn G() { // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete] // CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 1 [symbolic] -// CHECK:STDOUT: %array_type.6d2: type = array_type %N, %T [symbolic] -// CHECK:STDOUT: %pattern_type.4d8: type = pattern_type %array_type.6d2 [symbolic] -// CHECK:STDOUT: %a.param_patt.0e1: %pattern_type.4d8 = value_param_pattern [symbolic] -// CHECK:STDOUT: %a.patt.f10: %pattern_type.4d8 = wrapper_binding_pattern a, %a.param_patt.0e1 [symbolic] -// CHECK:STDOUT: %F.type: type = fn_type @F [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.422: type = class_type @Array, @Array(%T, %N) [symbolic] +// CHECK:STDOUT: %pattern_type.462: type = pattern_type %Array.422 [symbolic] +// CHECK:STDOUT: %a.param_patt.d6d: %pattern_type.462 = value_param_pattern [symbolic] +// CHECK:STDOUT: %a.patt.6fd: %pattern_type.462 = wrapper_binding_pattern a, %a.param_patt.d6d [symbolic] +// CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.f53: = require_complete_type %array_type.6d2 [symbolic] +// CHECK:STDOUT: %require_complete.4a2: = require_complete_type %Array.422 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] +// CHECK:STDOUT: %Array.e6a: type = class_type @Array, @Array(%C, %int_3) [concrete] // CHECK:STDOUT: %array_type.9a3: type = array_type %int_3, %C [concrete] -// CHECK:STDOUT: %pattern_type.3f5: type = pattern_type %array_type.9a3 [concrete] -// CHECK:STDOUT: %a.patt.b51: %pattern_type.3f5 = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.3f5 = var_pattern %a.patt.b51 [concrete] +// CHECK:STDOUT: %complete_type.1a4: = complete_type_witness %array_type.9a3 [concrete] +// CHECK:STDOUT: %pattern_type.66c: type = pattern_type %Array.e6a [concrete] +// CHECK:STDOUT: %a.patt.e57: %pattern_type.66c = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.66c = var_pattern %a.patt.e57 [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %tuple.type.8d4: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type.8d4 = tuple_value (%empty_struct, %empty_struct, %empty_struct) [concrete] @@ -860,9 +874,9 @@ fn G() { // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %array: %array_type.9a3 = tuple_value (%C.val, %C.val, %C.val) [concrete] -// CHECK:STDOUT: %a.param_patt.79a: %pattern_type.3f5 = value_param_pattern [concrete] -// CHECK:STDOUT: %a.patt.40c: %pattern_type.3f5 = wrapper_binding_pattern a, %a.param_patt.79a [concrete] +// CHECK:STDOUT: %array: %Array.e6a = tuple_value (%C.val, %C.val, %C.val) [concrete] +// CHECK:STDOUT: %a.param_patt.254: %pattern_type.66c = value_param_pattern [concrete] +// CHECK:STDOUT: %a.patt.0bd: %pattern_type.66c = wrapper_binding_pattern a, %a.param_patt.254 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%C, %int_3) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] @@ -881,25 +895,26 @@ fn G() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2ae: %pattern_type.3f5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.277: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt.2ae [concrete] +// CHECK:STDOUT: %self.param_patt.880: %pattern_type.66c = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.a20: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt.880 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %complete_type.1a4: = complete_type_witness %array_type.9a3 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .IntLiteral = %Core.IntLiteral +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.IntLiteral: type = import_ref Core//prelude/parts/int_literal, IntLiteral, loaded [concrete = Core.IntLiteral] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -933,18 +948,18 @@ fn G() { // CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f5 = ref_param_pattern [concrete = constants.%self.param_patt.2ae] -// CHECK:STDOUT: %self.patt: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.277] +// CHECK:STDOUT: %self.param_patt: %pattern_type.66c = ref_param_pattern [concrete = constants.%self.param_patt.880] +// CHECK:STDOUT: %self.patt: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a20] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.9a3 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.9a3 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.e6a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.e6a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f5 = ref_param_pattern [concrete = constants.%self.param_patt.2ae] -// CHECK:STDOUT: %self.patt: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.277] +// CHECK:STDOUT: %self.param_patt: %pattern_type.66c = ref_param_pattern [concrete = constants.%self.param_patt.880] +// CHECK:STDOUT: %self.patt: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a20] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.9a3 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.9a3 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.e6a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.e6a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -960,8 +975,8 @@ fn G() { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] // CHECK:STDOUT: %N.patt.loc6_16.1: %pattern_type.dc0 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_16.2 (constants.%N.patt)] -// CHECK:STDOUT: %a.param_patt.loc6_43.1: @F.%pattern_type (%pattern_type.4d8) = value_param_pattern [symbolic = %a.param_patt.loc6_43.2 (constants.%a.param_patt.0e1)] -// CHECK:STDOUT: %a.patt.loc6_43.1: @F.%pattern_type (%pattern_type.4d8) = wrapper_binding_pattern a, %a.param_patt.loc6_43.1 [symbolic = %a.patt.loc6_43.2 (constants.%a.patt.f10)] +// CHECK:STDOUT: %a.param_patt.loc6_43.1: @F.%pattern_type (%pattern_type.462) = value_param_pattern [symbolic = %a.param_patt.loc6_43.2 (constants.%a.param_patt.d6d)] +// CHECK:STDOUT: %a.patt.loc6_43.1: @F.%pattern_type (%pattern_type.462) = wrapper_binding_pattern a, %a.param_patt.loc6_43.1 [symbolic = %a.patt.loc6_43.2 (constants.%a.patt.6fd)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc6_9.1: type = splice_block %.loc6_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc6_7: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -974,13 +989,13 @@ fn G() { // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: } // CHECK:STDOUT: %N.loc6_16.2: Core.IntLiteral = symbolic_binding N, 1 [symbolic = %N.loc6_16.1 (constants.%N)] -// CHECK:STDOUT: %a.param: @F.%array_type.loc6_55.1 (%array_type.6d2) = value_param call_param0 -// CHECK:STDOUT: %.loc6_55: type = splice_block %array_type.loc6_55.2 [symbolic = %array_type.loc6_55.1 (constants.%array_type.6d2)] { +// CHECK:STDOUT: %a.param: @F.%Array.loc6_55.1 (%Array.422) = value_param call_param0 +// CHECK:STDOUT: %.loc6_55: type = splice_block %Array.loc6_55.2 [symbolic = %Array.loc6_55.1 (constants.%Array.422)] { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] // CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N.loc6_16.2 [symbolic = %N.loc6_16.1 (constants.%N)] -// CHECK:STDOUT: %array_type.loc6_55.2: type = array_type %N.ref, %T.ref [symbolic = %array_type.loc6_55.1 (constants.%array_type.6d2)] +// CHECK:STDOUT: %Array.loc6_55.2: type = class_type @Array, @Array(constants.%T, constants.%N) [symbolic = %Array.loc6_55.1 (constants.%Array.422)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%array_type.loc6_55.1 (%array_type.6d2) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%Array.loc6_55.1 (%Array.422) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } @@ -998,15 +1013,15 @@ fn G() { // CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] // CHECK:STDOUT: %N.patt.loc6_16.2: %pattern_type.dc0 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_16.2 (constants.%N.patt)] // CHECK:STDOUT: %N.loc6_16.1: Core.IntLiteral = symbolic_binding N, 1 [symbolic = %N.loc6_16.1 (constants.%N)] -// CHECK:STDOUT: %array_type.loc6_55.1: type = array_type %N.loc6_16.1, %T.loc6_7.1 [symbolic = %array_type.loc6_55.1 (constants.%array_type.6d2)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc6_55.1 [symbolic = %pattern_type (constants.%pattern_type.4d8)] -// CHECK:STDOUT: %a.param_patt.loc6_43.2: @F.%pattern_type (%pattern_type.4d8) = value_param_pattern [symbolic = %a.param_patt.loc6_43.2 (constants.%a.param_patt.0e1)] -// CHECK:STDOUT: %a.patt.loc6_43.2: @F.%pattern_type (%pattern_type.4d8) = wrapper_binding_pattern a, %a.param_patt.loc6_43.2 [symbolic = %a.patt.loc6_43.2 (constants.%a.patt.f10)] +// CHECK:STDOUT: %Array.loc6_55.1: type = class_type @Array, @Array(%T.loc6_7.1, %N.loc6_16.1) [symbolic = %Array.loc6_55.1 (constants.%Array.422)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Array.loc6_55.1 [symbolic = %pattern_type (constants.%pattern_type.462)] +// CHECK:STDOUT: %a.param_patt.loc6_43.2: @F.%pattern_type (%pattern_type.462) = value_param_pattern [symbolic = %a.param_patt.loc6_43.2 (constants.%a.param_patt.d6d)] +// CHECK:STDOUT: %a.patt.loc6_43.2: @F.%pattern_type (%pattern_type.462) = wrapper_binding_pattern a, %a.param_patt.loc6_43.2 [symbolic = %a.patt.loc6_43.2 (constants.%a.patt.6fd)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_55.1 [symbolic = %require_complete (constants.%require_complete.f53)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Array.loc6_55.1 [symbolic = %require_complete (constants.%require_complete.4a2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_55.1 (%array_type.6d2)) { +// CHECK:STDOUT: fn(%a.param: @F.%Array.loc6_55.1 (%Array.422)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1014,7 +1029,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.var: ref %array_type.9a3 = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.e6a = var_storage %a.var_patt // CHECK:STDOUT: %.loc9_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc9_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc9_34.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] @@ -1031,23 +1046,23 @@ fn G() { // CHECK:STDOUT: %.loc9_35.6: ref %C = array_index %a.var, %int_2 // CHECK:STDOUT: %.loc9_34.2: init %C to %.loc9_35.6 = class_init () [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.7: init %C = converted %.loc9_34.1, %.loc9_34.2 [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc9_35.8: init %array_type.9a3 to %a.var = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_3: init %array_type.9a3 = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] +// CHECK:STDOUT: %.loc9_35.8: init %Array.e6a to %a.var = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) [concrete = constants.%array] +// CHECK:STDOUT: %.loc9_3: init %Array.e6a = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc9_3 -// CHECK:STDOUT: %.loc9_20: type = splice_block %array_type [concrete = constants.%array_type.9a3] { +// CHECK:STDOUT: %.loc9_20: type = splice_block %Array [concrete = constants.%Array.e6a] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %C.ref [concrete = constants.%array_type.9a3] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%C, constants.%int_3) [concrete = constants.%Array.e6a] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type.9a3 = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.e6a = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.3f5 = ref_binding_pattern a [concrete = constants.%a.patt.b51] -// CHECK:STDOUT: %a.var_patt: %pattern_type.3f5 = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.66c = ref_binding_pattern a [concrete = constants.%a.patt.e57] +// CHECK:STDOUT: %a.var_patt: %pattern_type.66c = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %a.ref: ref %array_type.9a3 = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %Array.e6a = name_ref a, %a // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C, constants.%int_3) [concrete = constants.%F.specific_fn] -// CHECK:STDOUT: %.loc10: %array_type.9a3 = acquire_value %a.ref +// CHECK:STDOUT: %.loc10: %Array.e6a = acquire_value %a.ref // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc10) // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) @@ -1076,7 +1091,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %array_type.9a3) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Array.e6a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc9_3.1: ref %C = array_index %self.param, %int_2 @@ -1093,9 +1108,9 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %array_type.9a3) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Array.e6a) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %array_type.9a3) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %Array.e6a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) @@ -1107,10 +1122,10 @@ fn G() { // CHECK:STDOUT: %T.loc6_7.1 => constants.%T // CHECK:STDOUT: %N.patt.loc6_16.2 => constants.%N.patt // CHECK:STDOUT: %N.loc6_16.1 => constants.%N -// CHECK:STDOUT: %array_type.loc6_55.1 => constants.%array_type.6d2 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.4d8 -// CHECK:STDOUT: %a.param_patt.loc6_43.2 => constants.%a.param_patt.0e1 -// CHECK:STDOUT: %a.patt.loc6_43.2 => constants.%a.patt.f10 +// CHECK:STDOUT: %Array.loc6_55.1 => constants.%Array.422 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.462 +// CHECK:STDOUT: %a.param_patt.loc6_43.2 => constants.%a.param_patt.d6d +// CHECK:STDOUT: %a.patt.loc6_43.2 => constants.%a.patt.6fd // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C, constants.%int_3) { @@ -1118,10 +1133,10 @@ fn G() { // CHECK:STDOUT: %T.loc6_7.1 => constants.%C // CHECK:STDOUT: %N.patt.loc6_16.2 => constants.%N.patt // CHECK:STDOUT: %N.loc6_16.1 => constants.%int_3 -// CHECK:STDOUT: %array_type.loc6_55.1 => constants.%array_type.9a3 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.3f5 -// CHECK:STDOUT: %a.param_patt.loc6_43.2 => constants.%a.param_patt.79a -// CHECK:STDOUT: %a.patt.loc6_43.2 => constants.%a.patt.40c +// CHECK:STDOUT: %Array.loc6_55.1 => constants.%Array.e6a +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.66c +// CHECK:STDOUT: %a.param_patt.loc6_43.2 => constants.%a.param_patt.254 +// CHECK:STDOUT: %a.patt.loc6_43.2 => constants.%a.patt.0bd // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.1a4 @@ -1139,18 +1154,20 @@ fn G() { // CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %array_type.a0b: type = array_type %int_2, %T [symbolic] -// CHECK:STDOUT: %pattern_type.b42: type = pattern_type %array_type.a0b [symbolic] -// CHECK:STDOUT: %a.param_patt.9b5: %pattern_type.b42 = value_param_pattern [symbolic] -// CHECK:STDOUT: %a.patt.c20: %pattern_type.b42 = wrapper_binding_pattern a, %a.param_patt.9b5 [symbolic] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.3dd: type = class_type @Array, @Array(%T, %int_2) [symbolic] +// CHECK:STDOUT: %pattern_type.539: type = pattern_type %Array.3dd [symbolic] +// CHECK:STDOUT: %a.param_patt.a28: %pattern_type.539 = value_param_pattern [symbolic] +// CHECK:STDOUT: %a.patt.130: %pattern_type.539 = wrapper_binding_pattern a, %a.param_patt.a28 [symbolic] // CHECK:STDOUT: %.184347.1: Core.Form = init_form %T [symbolic] // CHECK:STDOUT: %pattern_type.51d1c4.1: type = pattern_type %T [symbolic] // CHECK:STDOUT: %return.param_patt.41d2d9.1: %pattern_type.51d1c4.1 = out_param_pattern [symbolic] // CHECK:STDOUT: %return.patt.b39: %pattern_type.51d1c4.1 = return_slot_pattern %return.param_patt.41d2d9.1, %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.fc9: = require_complete_type %array_type.a0b [symbolic] +// CHECK:STDOUT: %require_complete.f85: = require_complete_type %Array.3dd [symbolic] // CHECK:STDOUT: %F.specific_fn.eab: = specific_function %F, @F(%T) [symbolic] // CHECK:STDOUT: %.a44: Core.Form = init_form %C [concrete] // CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete] @@ -1159,22 +1176,24 @@ fn G() { // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type.9a3: type = array_type %int_3, %C [concrete] -// CHECK:STDOUT: %pattern_type.3f5: type = pattern_type %array_type.9a3 [concrete] -// CHECK:STDOUT: %a.patt.b51: %pattern_type.3f5 = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.3f5 = var_pattern %a.patt.b51 [concrete] +// CHECK:STDOUT: %Array.e6a: type = class_type @Array, @Array(%C, %int_3) [concrete] +// CHECK:STDOUT: %pattern_type.66c: type = pattern_type %Array.e6a [concrete] +// CHECK:STDOUT: %a.patt.e57: %pattern_type.66c = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.66c = var_pattern %a.patt.e57 [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %tuple.type.8d4: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type.8d4 = tuple_value (%empty_struct, %empty_struct, %empty_struct) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type.9a3 = tuple_value (%C.val, %C.val, %C.val) [concrete] -// CHECK:STDOUT: %array_type.cc9: type = array_type %int_2, %C [concrete] -// CHECK:STDOUT: %pattern_type.08b: type = pattern_type %array_type.cc9 [concrete] -// CHECK:STDOUT: %a.param_patt.143: %pattern_type.08b = value_param_pattern [concrete] -// CHECK:STDOUT: %a.patt.841: %pattern_type.08b = wrapper_binding_pattern a, %a.param_patt.143 [concrete] +// CHECK:STDOUT: %array: %Array.e6a = tuple_value (%C.val, %C.val, %C.val) [concrete] +// CHECK:STDOUT: %Array.587: type = class_type @Array, @Array(%C, %int_2) [concrete] +// CHECK:STDOUT: %pattern_type.e3c: type = pattern_type %Array.587 [concrete] +// CHECK:STDOUT: %a.param_patt.3e5: %pattern_type.e3c = value_param_pattern [concrete] +// CHECK:STDOUT: %a.patt.122: %pattern_type.e3c = wrapper_binding_pattern a, %a.param_patt.3e5 [concrete] // CHECK:STDOUT: %F.specific_fn.e0d: = specific_function %F, @F(%C) [concrete] +// CHECK:STDOUT: %array_type.cc9: type = array_type %int_2, %C [concrete] +// CHECK:STDOUT: %complete_type.d6a: = complete_type_witness %array_type.cc9 [concrete] // CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] @@ -1193,24 +1212,25 @@ fn G() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2ae: %pattern_type.3f5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.277: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt.2ae [concrete] +// CHECK:STDOUT: %self.param_patt.880: %pattern_type.66c = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.a20: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt.880 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc10_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %complete_type.d6a: = complete_type_witness %array_type.cc9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } @@ -1245,18 +1265,18 @@ fn G() { // CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f5 = ref_param_pattern [concrete = constants.%self.param_patt.2ae] -// CHECK:STDOUT: %self.patt: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.277] +// CHECK:STDOUT: %self.param_patt: %pattern_type.66c = ref_param_pattern [concrete = constants.%self.param_patt.880] +// CHECK:STDOUT: %self.patt: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a20] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.9a3 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.9a3 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.e6a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.e6a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc10_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f5 = ref_param_pattern [concrete = constants.%self.param_patt.2ae] -// CHECK:STDOUT: %self.patt: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.277] +// CHECK:STDOUT: %self.param_patt: %pattern_type.66c = ref_param_pattern [concrete = constants.%self.param_patt.880] +// CHECK:STDOUT: %self.patt: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a20] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.9a3 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.9a3 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.e6a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.e6a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1271,8 +1291,8 @@ fn G() { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %a.param_patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.b42) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.9b5)] -// CHECK:STDOUT: %a.patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.b42) = wrapper_binding_pattern a, %a.param_patt.loc6_16.1 [symbolic = %a.patt.loc6_16.2 (constants.%a.patt.c20)] +// CHECK:STDOUT: %a.param_patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.539) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.a28)] +// CHECK:STDOUT: %a.patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.539) = wrapper_binding_pattern a, %a.param_patt.loc6_16.1 [symbolic = %a.patt.loc6_16.2 (constants.%a.patt.130)] // CHECK:STDOUT: %return.param_patt.loc6_34.1: @F.%pattern_type.loc6_34 (%pattern_type.51d1c4.1) = out_param_pattern [symbolic = %return.param_patt.loc6_34.2 (constants.%return.param_patt.41d2d9.1)] // CHECK:STDOUT: %return.patt.loc6_31.1: @F.%pattern_type.loc6_34 (%pattern_type.51d1c4.1) = return_slot_pattern %return.param_patt.loc6_34.1, %T.ref.loc6_34 [symbolic = %return.patt.loc6_31.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { @@ -1283,13 +1303,13 @@ fn G() { // CHECK:STDOUT: %.loc6_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %a.param: @F.%array_type.loc6_28.1 (%array_type.a0b) = value_param call_param0 -// CHECK:STDOUT: %.loc6_28: type = splice_block %array_type.loc6_28.2 [symbolic = %array_type.loc6_28.1 (constants.%array_type.a0b)] { +// CHECK:STDOUT: %a.param: @F.%Array.loc6_28.1 (%Array.3dd) = value_param call_param0 +// CHECK:STDOUT: %.loc6_28: type = splice_block %Array.loc6_28.2 [symbolic = %Array.loc6_28.1 (constants.%Array.3dd)] { // CHECK:STDOUT: %T.ref.loc6_24: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] -// CHECK:STDOUT: %array_type.loc6_28.2: type = array_type %int_2, %T.ref.loc6_24 [symbolic = %array_type.loc6_28.1 (constants.%array_type.a0b)] +// CHECK:STDOUT: %Array.loc6_28.2: type = class_type @Array, @Array(constants.%T, constants.%int_2) [symbolic = %Array.loc6_28.1 (constants.%Array.3dd)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%array_type.loc6_28.1 (%array_type.a0b) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%Array.loc6_28.1 (%Array.3dd) = wrapper_binding a, %a.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_7.1 (%T) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_7.1 (%T) = return_slot %return.param // CHECK:STDOUT: } @@ -1315,23 +1335,23 @@ fn G() { // CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type) { // CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %array_type.loc6_28.1: type = array_type constants.%int_2, %T.loc6_7.1 [symbolic = %array_type.loc6_28.1 (constants.%array_type.a0b)] -// CHECK:STDOUT: %pattern_type.loc6_16: type = pattern_type %array_type.loc6_28.1 [symbolic = %pattern_type.loc6_16 (constants.%pattern_type.b42)] -// CHECK:STDOUT: %a.param_patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.b42) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.9b5)] -// CHECK:STDOUT: %a.patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.b42) = wrapper_binding_pattern a, %a.param_patt.loc6_16.2 [symbolic = %a.patt.loc6_16.2 (constants.%a.patt.c20)] +// CHECK:STDOUT: %Array.loc6_28.1: type = class_type @Array, @Array(%T.loc6_7.1, constants.%int_2) [symbolic = %Array.loc6_28.1 (constants.%Array.3dd)] +// CHECK:STDOUT: %pattern_type.loc6_16: type = pattern_type %Array.loc6_28.1 [symbolic = %pattern_type.loc6_16 (constants.%pattern_type.539)] +// CHECK:STDOUT: %a.param_patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.539) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.a28)] +// CHECK:STDOUT: %a.patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.539) = wrapper_binding_pattern a, %a.param_patt.loc6_16.2 [symbolic = %a.patt.loc6_16.2 (constants.%a.patt.130)] // CHECK:STDOUT: %.loc6_34.2: Core.Form = init_form %T.loc6_7.1 [symbolic = %.loc6_34.2 (constants.%.184347.1)] // CHECK:STDOUT: %pattern_type.loc6_34: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc6_34 (constants.%pattern_type.51d1c4.1)] // CHECK:STDOUT: %return.param_patt.loc6_34.2: @F.%pattern_type.loc6_34 (%pattern_type.51d1c4.1) = out_param_pattern [symbolic = %return.param_patt.loc6_34.2 (constants.%return.param_patt.41d2d9.1)] // CHECK:STDOUT: %return.patt.loc6_31.2: @F.%pattern_type.loc6_34 (%pattern_type.51d1c4.1) = return_slot_pattern %return.param_patt.loc6_34.2, %T.loc6_7.1 [symbolic = %return.patt.loc6_31.2 (constants.%return.patt.b39)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_28.1 [symbolic = %require_complete (constants.%require_complete.fc9)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Array.loc6_28.1 [symbolic = %require_complete (constants.%require_complete.f85)] // CHECK:STDOUT: %F.specific_fn.loc6_45.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_45.2 (constants.%F.specific_fn.eab)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_28.1 (%array_type.a0b)) -> out %return.param: @F.%T.loc6_7.1 (%T) { +// CHECK:STDOUT: fn(%a.param: @F.%Array.loc6_28.1 (%Array.3dd)) -> out %return.param: @F.%T.loc6_7.1 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %a.ref: @F.%array_type.loc6_28.1 (%array_type.a0b) = name_ref a, %a +// CHECK:STDOUT: %a.ref: @F.%Array.loc6_28.1 (%Array.3dd) = name_ref a, %a // CHECK:STDOUT: %F.specific_fn.loc6_45.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_45.2 (constants.%F.specific_fn.eab)] // CHECK:STDOUT: %.loc6_34.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} // CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_34.1 = call %F.specific_fn.loc6_45.1(%a.ref) @@ -1341,7 +1361,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> out %return.param: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.var: ref %array_type.9a3 = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.e6a = var_storage %a.var_patt // CHECK:STDOUT: %.loc10_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_34.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] @@ -1358,24 +1378,24 @@ fn G() { // CHECK:STDOUT: %.loc10_35.6: ref %C = array_index %a.var, %int_2 // CHECK:STDOUT: %.loc10_34.2: init %C to %.loc10_35.6 = class_init () [concrete = constants.%C.val] // CHECK:STDOUT: %.loc10_35.7: init %C = converted %.loc10_34.1, %.loc10_34.2 [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc10_35.8: init %array_type.9a3 to %a.var = array_init (%.loc10_35.3, %.loc10_35.5, %.loc10_35.7) [concrete = constants.%array] -// CHECK:STDOUT: %.loc10_3: init %array_type.9a3 = converted %.loc10_35.1, %.loc10_35.8 [concrete = constants.%array] +// CHECK:STDOUT: %.loc10_35.8: init %Array.e6a to %a.var = array_init (%.loc10_35.3, %.loc10_35.5, %.loc10_35.7) [concrete = constants.%array] +// CHECK:STDOUT: %.loc10_3: init %Array.e6a = converted %.loc10_35.1, %.loc10_35.8 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc10_3 -// CHECK:STDOUT: %.loc10_20: type = splice_block %array_type [concrete = constants.%array_type.9a3] { +// CHECK:STDOUT: %.loc10_20: type = splice_block %Array [concrete = constants.%Array.e6a] { // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %C.ref.loc10 [concrete = constants.%array_type.9a3] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%C, constants.%int_3) [concrete = constants.%Array.e6a] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type.9a3 = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.e6a = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.3f5 = ref_binding_pattern a [concrete = constants.%a.patt.b51] -// CHECK:STDOUT: %a.var_patt: %pattern_type.3f5 = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.66c = ref_binding_pattern a [concrete = constants.%a.patt.e57] +// CHECK:STDOUT: %a.var_patt: %pattern_type.66c = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %a.ref: ref %array_type.9a3 = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %Array.e6a = name_ref a, %a // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C) [concrete = constants.%F.specific_fn.e0d] // CHECK:STDOUT: %.loc8_11.1: ref %C = splice_block %return.param {} -// CHECK:STDOUT: %.loc21: %array_type.cc9 = converted %a.ref, [concrete = ] +// CHECK:STDOUT: %.loc21: %Array.587 = converted %a.ref, [concrete = ] // CHECK:STDOUT: %F.call: init %C to %.loc8_11.1 = call %F.specific_fn() // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) @@ -1404,7 +1424,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.3(%self.param: ref %array_type.9a3) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.3(%self.param: ref %Array.e6a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc10_3.1: ref %C = array_index %self.param, %int_2 @@ -1421,9 +1441,9 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.3(%self.param: ref %array_type.9a3) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.3(%self.param: ref %Array.e6a) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.3(%self.param: ref %array_type.9a3) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.3(%self.param: ref %Array.e6a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) @@ -1433,27 +1453,27 @@ fn G() { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%T -// CHECK:STDOUT: %array_type.loc6_28.1 => constants.%array_type.a0b -// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.b42 -// CHECK:STDOUT: %a.param_patt.loc6_16.2 => constants.%a.param_patt.9b5 -// CHECK:STDOUT: %a.patt.loc6_16.2 => constants.%a.patt.c20 +// CHECK:STDOUT: %Array.loc6_28.1 => constants.%Array.3dd +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.539 +// CHECK:STDOUT: %a.param_patt.loc6_16.2 => constants.%a.param_patt.a28 +// CHECK:STDOUT: %a.patt.loc6_16.2 => constants.%a.patt.130 // CHECK:STDOUT: %.loc6_34.2 => constants.%.184347.1 // CHECK:STDOUT: %pattern_type.loc6_34 => constants.%pattern_type.51d1c4.1 // CHECK:STDOUT: %return.param_patt.loc6_34.2 => constants.%return.param_patt.41d2d9.1 // CHECK:STDOUT: %return.patt.loc6_31.2 => constants.%return.patt.b39 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%require_complete.fc9 +// CHECK:STDOUT: %require_complete => constants.%require_complete.f85 // CHECK:STDOUT: %F.specific_fn.loc6_45.2 => constants.%F.specific_fn.eab // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%C -// CHECK:STDOUT: %array_type.loc6_28.1 => constants.%array_type.cc9 -// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.08b -// CHECK:STDOUT: %a.param_patt.loc6_16.2 => constants.%a.param_patt.143 -// CHECK:STDOUT: %a.patt.loc6_16.2 => constants.%a.patt.841 +// CHECK:STDOUT: %Array.loc6_28.1 => constants.%Array.587 +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.e3c +// CHECK:STDOUT: %a.param_patt.loc6_16.2 => constants.%a.param_patt.3e5 +// CHECK:STDOUT: %a.patt.loc6_16.2 => constants.%a.patt.122 // CHECK:STDOUT: %.loc6_34.2 => constants.%.a44 // CHECK:STDOUT: %pattern_type.loc6_34 => constants.%pattern_type.98b // CHECK:STDOUT: %return.param_patt.loc6_34.2 => constants.%return.param_patt.89a @@ -1474,15 +1494,17 @@ fn G() { // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete] -// CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] -// CHECK:STDOUT: %array_type.87f: type = array_type %N, %C [symbolic] -// CHECK:STDOUT: %pattern_type.5ed: type = pattern_type %array_type.87f [symbolic] -// CHECK:STDOUT: %a.param_patt.9e2: %pattern_type.5ed = value_param_pattern [symbolic] -// CHECK:STDOUT: %a.patt.8c4: %pattern_type.5ed = wrapper_binding_pattern a, %a.param_patt.9e2 [symbolic] +// CHECK:STDOUT: %N.patt.aa5: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.1b0: type = class_type @Array, @Array(%C, %N.fe9) [symbolic] +// CHECK:STDOUT: %pattern_type.b03: type = pattern_type %Array.1b0 [symbolic] +// CHECK:STDOUT: %a.param_patt.327: %pattern_type.b03 = value_param_pattern [symbolic] +// CHECK:STDOUT: %a.patt.001: %pattern_type.b03 = wrapper_binding_pattern a, %a.param_patt.327 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %.795f: Core.Form = init_form %i32 [concrete] @@ -1491,7 +1513,7 @@ fn G() { // CHECK:STDOUT: %return.patt.e1b: %pattern_type.6b6 = return_slot_pattern %return.param_patt.a9a, %i32 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.29f: = require_complete_type %array_type.87f [symbolic] +// CHECK:STDOUT: %require_complete.25c: = require_complete_type %Array.1b0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.914: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] @@ -1504,17 +1526,17 @@ fn G() { // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.914 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.a2a) [concrete] // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.8eb: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %.b7a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.8eb, %ImplicitAs.facet [concrete] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2b9: = bound_method %N, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [symbolic] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2b9: = bound_method %N.fe9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] -// CHECK:STDOUT: %bound_method.ee4: = bound_method %N, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.ee4(%N) [symbolic] +// CHECK:STDOUT: %bound_method.ee4: = bound_method %N.fe9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.ee4(%N.fe9) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type.cec: type = array_type %int_3.1ba, %D [concrete] -// CHECK:STDOUT: %pattern_type.0ed: type = pattern_type %array_type.cec [concrete] -// CHECK:STDOUT: %a.patt.7d5: %pattern_type.0ed = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.0ed = var_pattern %a.patt.7d5 [concrete] +// CHECK:STDOUT: %Array.40b: type = class_type @Array, @Array(%D, %int_3.1ba) [concrete] +// CHECK:STDOUT: %pattern_type.11f: type = pattern_type %Array.40b [concrete] +// CHECK:STDOUT: %a.patt.bdb: %pattern_type.11f = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.11f = var_pattern %a.patt.bdb [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %tuple.type.8d4: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type.8d4 = tuple_value (%empty_struct, %empty_struct, %empty_struct) [concrete] @@ -1522,12 +1544,14 @@ fn G() { // CHECK:STDOUT: %D.val: %D = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %array: %array_type.cec = tuple_value (%D.val, %D.val, %D.val) [concrete] -// CHECK:STDOUT: %array_type.9a3: type = array_type %int_3.1ba, %C [concrete] -// CHECK:STDOUT: %pattern_type.3f5: type = pattern_type %array_type.9a3 [concrete] -// CHECK:STDOUT: %a.param_patt.79a: %pattern_type.3f5 = value_param_pattern [concrete] -// CHECK:STDOUT: %a.patt.40c: %pattern_type.3f5 = wrapper_binding_pattern a, %a.param_patt.79a [concrete] +// CHECK:STDOUT: %array: %Array.40b = tuple_value (%D.val, %D.val, %D.val) [concrete] +// CHECK:STDOUT: %Array.e6a: type = class_type @Array, @Array(%C, %int_3.1ba) [concrete] +// CHECK:STDOUT: %pattern_type.66c: type = pattern_type %Array.e6a [concrete] +// CHECK:STDOUT: %a.param_patt.254: %pattern_type.66c = value_param_pattern [concrete] +// CHECK:STDOUT: %a.patt.0bd: %pattern_type.66c = wrapper_binding_pattern a, %a.param_patt.254 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_3.1ba) [concrete] +// CHECK:STDOUT: %array_type.9a3: type = array_type %int_3.1ba, %C [concrete] +// CHECK:STDOUT: %complete_type.1a4: = complete_type_witness %array_type.9a3 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] // CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] @@ -1545,15 +1569,14 @@ fn G() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.7ca: %pattern_type.0ed = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.5cc: %pattern_type.0ed = wrapper_binding_pattern self, %self.param_patt.7ca [concrete] +// CHECK:STDOUT: %self.param_patt.22c: %pattern_type.11f = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.280: %pattern_type.11f = wrapper_binding_pattern self, %self.param_patt.22c [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %complete_type.1a4: = complete_type_witness %array_type.9a3 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.485: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] // CHECK:STDOUT: %bound_method.763: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.410: %i32 = int_value 3 [concrete] @@ -1562,6 +1585,7 @@ fn G() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .IntLiteral = %Core.IntLiteral +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Destroy = %Core.Destroy @@ -1569,6 +1593,7 @@ fn G() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.IntLiteral: type = import_ref Core//prelude/parts/int_literal, IntLiteral, loaded [concrete = Core.IntLiteral] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] @@ -1606,18 +1631,18 @@ fn G() { // CHECK:STDOUT: %self: ref %D = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0ed = ref_param_pattern [concrete = constants.%self.param_patt.7ca] -// CHECK:STDOUT: %self.patt: %pattern_type.0ed = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5cc] +// CHECK:STDOUT: %self.param_patt: %pattern_type.11f = ref_param_pattern [concrete = constants.%self.param_patt.22c] +// CHECK:STDOUT: %self.patt: %pattern_type.11f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.280] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.cec = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.cec = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.40b = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.40b = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0ed = ref_param_pattern [concrete = constants.%self.param_patt.7ca] -// CHECK:STDOUT: %self.patt: %pattern_type.0ed = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5cc] +// CHECK:STDOUT: %self.param_patt: %pattern_type.11f = ref_param_pattern [concrete = constants.%self.param_patt.22c] +// CHECK:STDOUT: %self.patt: %pattern_type.11f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.280] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.cec = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.cec = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.40b = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.40b = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1633,9 +1658,9 @@ fn G() { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %N.patt.loc7_7.1: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc7_7.2 (constants.%N.patt)] -// CHECK:STDOUT: %a.param_patt.loc7_34.1: @F.%pattern_type (%pattern_type.5ed) = value_param_pattern [symbolic = %a.param_patt.loc7_34.2 (constants.%a.param_patt.9e2)] -// CHECK:STDOUT: %a.patt.loc7_34.1: @F.%pattern_type (%pattern_type.5ed) = wrapper_binding_pattern a, %a.param_patt.loc7_34.1 [symbolic = %a.patt.loc7_34.2 (constants.%a.patt.8c4)] +// CHECK:STDOUT: %N.patt.loc7_7.1: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc7_7.2 (constants.%N.patt.aa5)] +// CHECK:STDOUT: %a.param_patt.loc7_34.1: @F.%pattern_type (%pattern_type.b03) = value_param_pattern [symbolic = %a.param_patt.loc7_34.2 (constants.%a.param_patt.327)] +// CHECK:STDOUT: %a.patt.loc7_34.1: @F.%pattern_type (%pattern_type.b03) = wrapper_binding_pattern a, %a.param_patt.loc7_34.1 [symbolic = %a.patt.loc7_34.2 (constants.%a.patt.001)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] // CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { @@ -1646,14 +1671,14 @@ fn G() { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc7_7.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc7_7.1 (constants.%N)] -// CHECK:STDOUT: %a.param: @F.%array_type.loc7_46.1 (%array_type.87f) = value_param call_param0 -// CHECK:STDOUT: %.loc7_46: type = splice_block %array_type.loc7_46.2 [symbolic = %array_type.loc7_46.1 (constants.%array_type.87f)] { +// CHECK:STDOUT: %N.loc7_7.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc7_7.1 (constants.%N.fe9)] +// CHECK:STDOUT: %a.param: @F.%Array.loc7_46.1 (%Array.1b0) = value_param call_param0 +// CHECK:STDOUT: %.loc7_46: type = splice_block %Array.loc7_46.2 [symbolic = %Array.loc7_46.1 (constants.%Array.1b0)] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %N.ref.loc7_45: Core.IntLiteral = name_ref N, %N.loc7_7.2 [symbolic = %N.loc7_7.1 (constants.%N)] -// CHECK:STDOUT: %array_type.loc7_46.2: type = array_type %N.ref.loc7_45, %C.ref [symbolic = %array_type.loc7_46.1 (constants.%array_type.87f)] +// CHECK:STDOUT: %N.ref.loc7_45: Core.IntLiteral = name_ref N, %N.loc7_7.2 [symbolic = %N.loc7_7.1 (constants.%N.fe9)] +// CHECK:STDOUT: %Array.loc7_46.2: type = class_type @Array, @Array(constants.%C, constants.%N.fe9) [symbolic = %Array.loc7_46.1 (constants.%Array.1b0)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%array_type.loc7_46.1 (%array_type.87f) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%Array.loc7_46.1 (%Array.1b0) = wrapper_binding a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -1685,22 +1710,22 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%N.loc7_7.2: Core.IntLiteral) { -// CHECK:STDOUT: %N.patt.loc7_7.2: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc7_7.2 (constants.%N.patt)] -// CHECK:STDOUT: %N.loc7_7.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc7_7.1 (constants.%N)] -// CHECK:STDOUT: %array_type.loc7_46.1: type = array_type %N.loc7_7.1, constants.%C [symbolic = %array_type.loc7_46.1 (constants.%array_type.87f)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc7_46.1 [symbolic = %pattern_type (constants.%pattern_type.5ed)] -// CHECK:STDOUT: %a.param_patt.loc7_34.2: @F.%pattern_type (%pattern_type.5ed) = value_param_pattern [symbolic = %a.param_patt.loc7_34.2 (constants.%a.param_patt.9e2)] -// CHECK:STDOUT: %a.patt.loc7_34.2: @F.%pattern_type (%pattern_type.5ed) = wrapper_binding_pattern a, %a.param_patt.loc7_34.2 [symbolic = %a.patt.loc7_34.2 (constants.%a.patt.8c4)] +// CHECK:STDOUT: %N.patt.loc7_7.2: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc7_7.2 (constants.%N.patt.aa5)] +// CHECK:STDOUT: %N.loc7_7.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc7_7.1 (constants.%N.fe9)] +// CHECK:STDOUT: %Array.loc7_46.1: type = class_type @Array, @Array(constants.%C, %N.loc7_7.1) [symbolic = %Array.loc7_46.1 (constants.%Array.1b0)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Array.loc7_46.1 [symbolic = %pattern_type (constants.%pattern_type.b03)] +// CHECK:STDOUT: %a.param_patt.loc7_34.2: @F.%pattern_type (%pattern_type.b03) = value_param_pattern [symbolic = %a.param_patt.loc7_34.2 (constants.%a.param_patt.327)] +// CHECK:STDOUT: %a.patt.loc7_34.2: @F.%pattern_type (%pattern_type.b03) = wrapper_binding_pattern a, %a.param_patt.loc7_34.2 [symbolic = %a.patt.loc7_34.2 (constants.%a.patt.001)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc7_46.1 [symbolic = %require_complete (constants.%require_complete.29f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Array.loc7_46.1 [symbolic = %require_complete (constants.%require_complete.25c)] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %N.loc7_7.1, constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2b9)] // CHECK:STDOUT: %bound_method.loc7_66.3: = bound_method %N.loc7_7.1, constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc7_66.3 (constants.%bound_method.ee4)] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_66.2: init %i32 = call %bound_method.loc7_66.3(%N.loc7_7.1) [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_66.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc7_46.1 (%array_type.87f)) -> out %return.param: %i32 { +// CHECK:STDOUT: fn(%a.param: @F.%Array.loc7_46.1 (%Array.1b0)) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %N.ref.loc7_65: Core.IntLiteral = name_ref N, %N.loc7_7.2 [symbolic = %N.loc7_7.1 (constants.%N)] +// CHECK:STDOUT: %N.ref.loc7_65: Core.IntLiteral = name_ref N, %N.loc7_7.2 [symbolic = %N.loc7_7.1 (constants.%N.fe9)] // CHECK:STDOUT: %impl.elem0: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc7_66.1: = bound_method %N.ref.loc7_65, %impl.elem0 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2b9)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] @@ -1713,7 +1738,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.var: ref %array_type.cec = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.40b = var_storage %a.var_patt // CHECK:STDOUT: %.loc11_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc11_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc11_34.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] @@ -1730,23 +1755,23 @@ fn G() { // CHECK:STDOUT: %.loc11_35.6: ref %D = array_index %a.var, %int_2 // CHECK:STDOUT: %.loc11_34.2: init %D to %.loc11_35.6 = class_init () [concrete = constants.%D.val] // CHECK:STDOUT: %.loc11_35.7: init %D = converted %.loc11_34.1, %.loc11_34.2 [concrete = constants.%D.val] -// CHECK:STDOUT: %.loc11_35.8: init %array_type.cec to %a.var = array_init (%.loc11_35.3, %.loc11_35.5, %.loc11_35.7) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %array_type.cec = converted %.loc11_35.1, %.loc11_35.8 [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_35.8: init %Array.40b to %a.var = array_init (%.loc11_35.3, %.loc11_35.5, %.loc11_35.7) [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_3: init %Array.40b = converted %.loc11_35.1, %.loc11_35.8 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc11_3 -// CHECK:STDOUT: %.loc11_20: type = splice_block %array_type [concrete = constants.%array_type.cec] { +// CHECK:STDOUT: %.loc11_20: type = splice_block %Array [concrete = constants.%Array.40b] { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %D.ref [concrete = constants.%array_type.cec] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%D, constants.%int_3.1ba) [concrete = constants.%Array.40b] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type.cec = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.40b = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.0ed = ref_binding_pattern a [concrete = constants.%a.patt.7d5] -// CHECK:STDOUT: %a.var_patt: %pattern_type.0ed = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.11f = ref_binding_pattern a [concrete = constants.%a.patt.bdb] +// CHECK:STDOUT: %a.var_patt: %pattern_type.11f = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %a.ref: ref %array_type.cec = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %Array.40b = name_ref a, %a // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%int_3.1ba) [concrete = constants.%F.specific_fn] -// CHECK:STDOUT: %.loc22: %array_type.9a3 = converted %a.ref, [concrete = ] +// CHECK:STDOUT: %.loc22: %Array.e6a = converted %a.ref, [concrete = ] // CHECK:STDOUT: %F.call: init %i32 = call %F.specific_fn() // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) @@ -1775,7 +1800,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.3(%self.param: ref %array_type.cec) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.3(%self.param: ref %Array.40b) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc11_3.1: ref %D = array_index %self.param, %int_2 @@ -1792,31 +1817,31 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.3(%self.param: ref %array_type.cec) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.3(%self.param: ref %Array.40b) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.3(%self.param: ref %array_type.cec) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.3(%self.param: ref %Array.40b) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%N) { -// CHECK:STDOUT: %N.patt.loc7_7.2 => constants.%N.patt -// CHECK:STDOUT: %N.loc7_7.1 => constants.%N -// CHECK:STDOUT: %array_type.loc7_46.1 => constants.%array_type.87f -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.5ed -// CHECK:STDOUT: %a.param_patt.loc7_34.2 => constants.%a.param_patt.9e2 -// CHECK:STDOUT: %a.patt.loc7_34.2 => constants.%a.patt.8c4 +// CHECK:STDOUT: specific @F(constants.%N.fe9) { +// CHECK:STDOUT: %N.patt.loc7_7.2 => constants.%N.patt.aa5 +// CHECK:STDOUT: %N.loc7_7.1 => constants.%N.fe9 +// CHECK:STDOUT: %Array.loc7_46.1 => constants.%Array.1b0 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.b03 +// CHECK:STDOUT: %a.param_patt.loc7_34.2 => constants.%a.param_patt.327 +// CHECK:STDOUT: %a.patt.loc7_34.2 => constants.%a.patt.001 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%int_3.1ba) { -// CHECK:STDOUT: %N.patt.loc7_7.2 => constants.%N.patt +// CHECK:STDOUT: %N.patt.loc7_7.2 => constants.%N.patt.aa5 // CHECK:STDOUT: %N.loc7_7.1 => constants.%int_3.1ba -// CHECK:STDOUT: %array_type.loc7_46.1 => constants.%array_type.9a3 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.3f5 -// CHECK:STDOUT: %a.param_patt.loc7_34.2 => constants.%a.param_patt.79a -// CHECK:STDOUT: %a.patt.loc7_34.2 => constants.%a.patt.40c +// CHECK:STDOUT: %Array.loc7_46.1 => constants.%Array.e6a +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.66c +// CHECK:STDOUT: %a.param_patt.loc7_34.2 => constants.%a.param_patt.254 +// CHECK:STDOUT: %a.patt.loc7_34.2 => constants.%a.patt.0bd // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.1a4 @@ -1858,16 +1883,18 @@ fn G() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.69e, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.7c3: = bound_method %N.37f, %Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.7c3(%N.37f) [symbolic] -// CHECK:STDOUT: %array_type.47c: type = array_type %Int.as.ImplicitAs.impl.Convert.call, %C [symbolic] -// CHECK:STDOUT: %pattern_type.f28: type = pattern_type %array_type.47c [symbolic] -// CHECK:STDOUT: %a.param_patt: %pattern_type.f28 = value_param_pattern [symbolic] -// CHECK:STDOUT: %a.patt.9dd: %pattern_type.f28 = wrapper_binding_pattern a, %a.param_patt [symbolic] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.02a: type = class_type @Array, @Array(%C, %Int.as.ImplicitAs.impl.Convert.call) [symbolic] +// CHECK:STDOUT: %pattern_type.44b: type = pattern_type %Array.02a [symbolic] +// CHECK:STDOUT: %a.param_patt: %pattern_type.44b = value_param_pattern [symbolic] +// CHECK:STDOUT: %a.patt.c90: %pattern_type.44b = wrapper_binding_pattern a, %a.param_patt [symbolic] // CHECK:STDOUT: %.795f: Core.Form = init_form %i32 [concrete] // CHECK:STDOUT: %return.param_patt.a9a: %pattern_type.6b6 = out_param_pattern [concrete] // CHECK:STDOUT: %return.patt.e1b: %pattern_type.6b6 = return_slot_pattern %return.param_patt.a9a, %i32 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.540: = require_complete_type %array_type.47c [symbolic] +// CHECK:STDOUT: %require_complete.698: = require_complete_type %Array.02a [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic] @@ -1883,10 +1910,10 @@ fn G() { // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type.9a3: type = array_type %int_3, %C [concrete] -// CHECK:STDOUT: %pattern_type.3f5: type = pattern_type %array_type.9a3 [concrete] -// CHECK:STDOUT: %a.patt.b51: %pattern_type.3f5 = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.3f5 = var_pattern %a.patt.b51 [concrete] +// CHECK:STDOUT: %Array.e6a: type = class_type @Array, @Array(%C, %int_3) [concrete] +// CHECK:STDOUT: %pattern_type.66c: type = pattern_type %Array.e6a [concrete] +// CHECK:STDOUT: %a.patt.e57: %pattern_type.66c = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.66c = var_pattern %a.patt.e57 [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %tuple.type.8d4: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [concrete] // CHECK:STDOUT: %tuple.5c1: %tuple.type.8d4 = tuple_value (%empty_struct, %empty_struct, %empty_struct) [concrete] @@ -1894,7 +1921,7 @@ fn G() { // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %array: %array_type.9a3 = tuple_value (%C.val, %C.val, %C.val) [concrete] +// CHECK:STDOUT: %array: %Array.e6a = tuple_value (%C.val, %C.val, %C.val) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] // CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] @@ -1912,8 +1939,8 @@ fn G() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2ae: %pattern_type.3f5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.277: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt.2ae [concrete] +// CHECK:STDOUT: %self.param_patt.880: %pattern_type.66c = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.a20: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt.880 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_3.3 [concrete] @@ -1926,6 +1953,7 @@ fn G() { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: import Core//prelude @@ -1935,6 +1963,7 @@ fn G() { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.32e: @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert.type (%Int.as.ImplicitAs.impl.Convert.type.48d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert (constants.%Int.as.ImplicitAs.impl.Convert.0f9)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.204 = impl_witness_table (%Core.import_ref.32e), @Int.as.ImplicitAs.impl [concrete] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.cd6: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.ac8) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.5e0)] // CHECK:STDOUT: %Copy.impl_witness_table.8d2 = impl_witness_table (%Core.import_ref.cd6), @Int.as.Copy.impl [concrete] @@ -1971,18 +2000,18 @@ fn G() { // CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f5 = ref_param_pattern [concrete = constants.%self.param_patt.2ae] -// CHECK:STDOUT: %self.patt: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.277] +// CHECK:STDOUT: %self.param_patt: %pattern_type.66c = ref_param_pattern [concrete = constants.%self.param_patt.880] +// CHECK:STDOUT: %self.patt: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a20] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.9a3 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.9a3 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.e6a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.e6a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f5 = ref_param_pattern [concrete = constants.%self.param_patt.2ae] -// CHECK:STDOUT: %self.patt: %pattern_type.3f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.277] +// CHECK:STDOUT: %self.param_patt: %pattern_type.66c = ref_param_pattern [concrete = constants.%self.param_patt.880] +// CHECK:STDOUT: %self.patt: %pattern_type.66c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a20] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.9a3 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.9a3 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.e6a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.e6a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1997,8 +2026,8 @@ fn G() { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %N.patt.loc6_7.1: %pattern_type.6b6 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_7.2 (constants.%N.patt.38a)] -// CHECK:STDOUT: %a.param_patt.loc6_22.1: @F.%pattern_type (%pattern_type.f28) = value_param_pattern [symbolic = %a.param_patt.loc6_22.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc6_22.1: @F.%pattern_type (%pattern_type.f28) = wrapper_binding_pattern a, %a.param_patt.loc6_22.1 [symbolic = %a.patt.loc6_22.2 (constants.%a.patt.9dd)] +// CHECK:STDOUT: %a.param_patt.loc6_22.1: @F.%pattern_type (%pattern_type.44b) = value_param_pattern [symbolic = %a.param_patt.loc6_22.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc6_22.1: @F.%pattern_type (%pattern_type.44b) = wrapper_binding_pattern a, %a.param_patt.loc6_22.1 [symbolic = %a.patt.loc6_22.2 (constants.%a.patt.c90)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] // CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc6_40 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { @@ -2009,8 +2038,8 @@ fn G() { // CHECK:STDOUT: %i32.loc6_9: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %N.loc6_7.2: %i32 = symbolic_binding N, 0 [symbolic = %N.loc6_7.1 (constants.%N.37f)] -// CHECK:STDOUT: %a.param: @F.%array_type.loc6_34.1 (%array_type.47c) = value_param call_param0 -// CHECK:STDOUT: %.loc6_34: type = splice_block %array_type.loc6_34.2 [symbolic = %array_type.loc6_34.1 (constants.%array_type.47c)] { +// CHECK:STDOUT: %a.param: @F.%Array.loc6_34.1 (%Array.02a) = value_param call_param0 +// CHECK:STDOUT: %.loc6_34: type = splice_block %Array.loc6_34.2 [symbolic = %Array.loc6_34.1 (constants.%Array.02a)] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %N.ref.loc6_33: %i32 = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N.37f)] // CHECK:STDOUT: %impl.elem0.loc6_33: %.e3f = impl_witness_access constants.%ImplicitAs.impl_witness.590, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.69e] @@ -2020,9 +2049,9 @@ fn G() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc6_33.2: init Core.IntLiteral = call %bound_method.loc6_33.3(%N.ref.loc6_33) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: %.loc6_33.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc6_33.2 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: %.loc6_33.2: Core.IntLiteral = converted %N.ref.loc6_33, %.loc6_33.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc6_34.2: type = array_type %.loc6_33.2, %C.ref [symbolic = %array_type.loc6_34.1 (constants.%array_type.47c)] +// CHECK:STDOUT: %Array.loc6_34.2: type = class_type @Array, @Array(constants.%C, constants.%Int.as.ImplicitAs.impl.Convert.call) [symbolic = %Array.loc6_34.1 (constants.%Array.02a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%array_type.loc6_34.1 (%array_type.47c) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%Array.loc6_34.1 (%Array.02a) = wrapper_binding a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -2051,17 +2080,17 @@ fn G() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %N.loc6_7.1, constants.%Int.as.ImplicitAs.impl.Convert.69e [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] // CHECK:STDOUT: %bound_method.loc6_33.1: = bound_method %N.loc6_7.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc6_33.1 (constants.%bound_method.7c3)] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1: init Core.IntLiteral = call %bound_method.loc6_33.1(%N.loc6_7.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc6_34.1: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1, constants.%C [symbolic = %array_type.loc6_34.1 (constants.%array_type.47c)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc6_34.1 [symbolic = %pattern_type (constants.%pattern_type.f28)] -// CHECK:STDOUT: %a.param_patt.loc6_22.2: @F.%pattern_type (%pattern_type.f28) = value_param_pattern [symbolic = %a.param_patt.loc6_22.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc6_22.2: @F.%pattern_type (%pattern_type.f28) = wrapper_binding_pattern a, %a.param_patt.loc6_22.2 [symbolic = %a.patt.loc6_22.2 (constants.%a.patt.9dd)] +// CHECK:STDOUT: %Array.loc6_34.1: type = class_type @Array, @Array(constants.%C, %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1) [symbolic = %Array.loc6_34.1 (constants.%Array.02a)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Array.loc6_34.1 [symbolic = %pattern_type (constants.%pattern_type.44b)] +// CHECK:STDOUT: %a.param_patt.loc6_22.2: @F.%pattern_type (%pattern_type.44b) = value_param_pattern [symbolic = %a.param_patt.loc6_22.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc6_22.2: @F.%pattern_type (%pattern_type.44b) = wrapper_binding_pattern a, %a.param_patt.loc6_22.2 [symbolic = %a.patt.loc6_22.2 (constants.%a.patt.c90)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_34.1 [symbolic = %require_complete (constants.%require_complete.540)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Array.loc6_34.1 [symbolic = %require_complete (constants.%require_complete.698)] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %N.loc6_7.1, constants.%Int.as.Copy.impl.Op.4f6 [symbolic = %Int.as.Copy.impl.Op.bound (constants.%Int.as.Copy.impl.Op.bound)] // CHECK:STDOUT: %bound_method.loc6_53.3: = bound_method %N.loc6_7.1, constants.%Int.as.Copy.impl.Op.specific_fn [symbolic = %bound_method.loc6_53.3 (constants.%bound_method.d86)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_34.1 (%array_type.47c)) -> out %return.param: %i32 { +// CHECK:STDOUT: fn(%a.param: @F.%Array.loc6_34.1 (%Array.02a)) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc6_53: %i32 = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N.37f)] // CHECK:STDOUT: %impl.elem0.loc6_53: %.737 = impl_witness_access constants.%Copy.impl_witness.b51, element0 [concrete = constants.%Int.as.Copy.impl.Op.4f6] @@ -2075,7 +2104,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.var: ref %array_type.9a3 = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.e6a = var_storage %a.var_patt // CHECK:STDOUT: %.loc9_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc9_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc9_34.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] @@ -2092,21 +2121,21 @@ fn G() { // CHECK:STDOUT: %.loc9_35.6: ref %C = array_index %a.var, %int_2 // CHECK:STDOUT: %.loc9_34.2: init %C to %.loc9_35.6 = class_init () [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.7: init %C = converted %.loc9_34.1, %.loc9_34.2 [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc9_35.8: init %array_type.9a3 to %a.var = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_3: init %array_type.9a3 = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] +// CHECK:STDOUT: %.loc9_35.8: init %Array.e6a to %a.var = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) [concrete = constants.%array] +// CHECK:STDOUT: %.loc9_3: init %Array.e6a = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc9_3 -// CHECK:STDOUT: %.loc9_20: type = splice_block %array_type [concrete = constants.%array_type.9a3] { +// CHECK:STDOUT: %.loc9_20: type = splice_block %Array [concrete = constants.%Array.e6a] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %C.ref [concrete = constants.%array_type.9a3] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%C, constants.%int_3) [concrete = constants.%Array.e6a] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type.9a3 = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.e6a = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.3f5 = ref_binding_pattern a [concrete = constants.%a.patt.b51] -// CHECK:STDOUT: %a.var_patt: %pattern_type.3f5 = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.66c = ref_binding_pattern a [concrete = constants.%a.patt.e57] +// CHECK:STDOUT: %a.var_patt: %pattern_type.66c = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %a.ref: ref %array_type.9a3 = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %Array.e6a = name_ref a, %a // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) // CHECK:STDOUT: return @@ -2134,7 +2163,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %array_type.9a3) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Array.e6a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc9_3.1: ref %C = array_index %self.param, %int_2 @@ -2151,9 +2180,9 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %array_type.9a3) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Array.e6a) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %array_type.9a3) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %Array.e6a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) @@ -2166,10 +2195,10 @@ fn G() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound => constants.%Int.as.ImplicitAs.impl.Convert.bound // CHECK:STDOUT: %bound_method.loc6_33.1 => constants.%bound_method.7c3 // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1 => constants.%Int.as.ImplicitAs.impl.Convert.call -// CHECK:STDOUT: %array_type.loc6_34.1 => constants.%array_type.47c -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.f28 +// CHECK:STDOUT: %Array.loc6_34.1 => constants.%Array.02a +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.44b // CHECK:STDOUT: %a.param_patt.loc6_22.2 => constants.%a.param_patt -// CHECK:STDOUT: %a.patt.loc6_22.2 => constants.%a.patt.9dd +// CHECK:STDOUT: %a.patt.loc6_22.2 => constants.%a.patt.c90 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_array_length_from_tuple.carbon @@ -2203,13 +2232,15 @@ fn G() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.69e, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %N.37f, %Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method(%N.37f) [symbolic] -// CHECK:STDOUT: %array_type: type = array_type %Int.as.ImplicitAs.impl.Convert.call, %C [symbolic] -// CHECK:STDOUT: %pattern_type.f28: type = pattern_type %array_type [symbolic] -// CHECK:STDOUT: %a.param_patt: %pattern_type.f28 = value_param_pattern [symbolic] -// CHECK:STDOUT: %a.patt: %pattern_type.f28 = wrapper_binding_pattern a, %a.param_patt [symbolic] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.02a: type = class_type @Array, @Array(%C, %Int.as.ImplicitAs.impl.Convert.call) [symbolic] +// CHECK:STDOUT: %pattern_type.44b: type = pattern_type %Array.02a [symbolic] +// CHECK:STDOUT: %a.param_patt: %pattern_type.44b = value_param_pattern [symbolic] +// CHECK:STDOUT: %a.patt: %pattern_type.44b = wrapper_binding_pattern a, %a.param_patt [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.540: = require_complete_type %array_type [symbolic] +// CHECK:STDOUT: %require_complete.698: = require_complete_type %Array.02a [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] @@ -2221,6 +2252,7 @@ fn G() { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2228,6 +2260,7 @@ fn G() { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.32e: @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert.type (%Int.as.ImplicitAs.impl.Convert.type.48d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert (constants.%Int.as.ImplicitAs.impl.Convert.0f9)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.204 = impl_witness_table (%Core.import_ref.32e), @Int.as.ImplicitAs.impl [concrete] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -2241,16 +2274,16 @@ fn G() { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %N.patt.loc5_7.1: %pattern_type.6b6 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc5_7.2 (constants.%N.patt.38a)] -// CHECK:STDOUT: %a.param_patt.loc5_22.1: @F.%pattern_type (%pattern_type.f28) = value_param_pattern [symbolic = %a.param_patt.loc5_22.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc5_22.1: @F.%pattern_type (%pattern_type.f28) = wrapper_binding_pattern a, %a.param_patt.loc5_22.1 [symbolic = %a.patt.loc5_22.2 (constants.%a.patt)] +// CHECK:STDOUT: %a.param_patt.loc5_22.1: @F.%pattern_type (%pattern_type.44b) = value_param_pattern [symbolic = %a.param_patt.loc5_22.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc5_22.1: @F.%pattern_type (%pattern_type.44b) = wrapper_binding_pattern a, %a.param_patt.loc5_22.1 [symbolic = %a.patt.loc5_22.2 (constants.%a.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc5_9: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %N.loc5_7.2: %i32 = symbolic_binding N, 0 [symbolic = %N.loc5_7.1 (constants.%N.37f)] -// CHECK:STDOUT: %a.param: @F.%array_type.loc5_34.1 (%array_type) = value_param call_param0 -// CHECK:STDOUT: %.loc5_34: type = splice_block %array_type.loc5_34.2 [symbolic = %array_type.loc5_34.1 (constants.%array_type)] { +// CHECK:STDOUT: %a.param: @F.%Array.loc5_34.1 (%Array.02a) = value_param call_param0 +// CHECK:STDOUT: %.loc5_34: type = splice_block %Array.loc5_34.2 [symbolic = %Array.loc5_34.1 (constants.%Array.02a)] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc5_7.2 [symbolic = %N.loc5_7.1 (constants.%N.37f)] // CHECK:STDOUT: %impl.elem0: %.e3f = impl_witness_access constants.%ImplicitAs.impl_witness.590, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.69e] @@ -2260,9 +2293,9 @@ fn G() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_33.2: init Core.IntLiteral = call %bound_method.loc5_33.3(%N.ref) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: %.loc5_33.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc5_33.2 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: %.loc5_33.2: Core.IntLiteral = converted %N.ref, %.loc5_33.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc5_34.2: type = array_type %.loc5_33.2, %C.ref [symbolic = %array_type.loc5_34.1 (constants.%array_type)] +// CHECK:STDOUT: %Array.loc5_34.2: type = class_type @Array, @Array(constants.%C, constants.%Int.as.ImplicitAs.impl.Convert.call) [symbolic = %Array.loc5_34.1 (constants.%Array.02a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%array_type.loc5_34.1 (%array_type) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%Array.loc5_34.1 (%Array.02a) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } @@ -2281,15 +2314,15 @@ fn G() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %N.loc5_7.1, constants.%Int.as.ImplicitAs.impl.Convert.69e [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] // CHECK:STDOUT: %bound_method.loc5_33.1: = bound_method %N.loc5_7.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc5_33.1 (constants.%bound_method)] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1: init Core.IntLiteral = call %bound_method.loc5_33.1(%N.loc5_7.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc5_34.1: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1, constants.%C [symbolic = %array_type.loc5_34.1 (constants.%array_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc5_34.1 [symbolic = %pattern_type (constants.%pattern_type.f28)] -// CHECK:STDOUT: %a.param_patt.loc5_22.2: @F.%pattern_type (%pattern_type.f28) = value_param_pattern [symbolic = %a.param_patt.loc5_22.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc5_22.2: @F.%pattern_type (%pattern_type.f28) = wrapper_binding_pattern a, %a.param_patt.loc5_22.2 [symbolic = %a.patt.loc5_22.2 (constants.%a.patt)] +// CHECK:STDOUT: %Array.loc5_34.1: type = class_type @Array, @Array(constants.%C, %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1) [symbolic = %Array.loc5_34.1 (constants.%Array.02a)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Array.loc5_34.1 [symbolic = %pattern_type (constants.%pattern_type.44b)] +// CHECK:STDOUT: %a.param_patt.loc5_22.2: @F.%pattern_type (%pattern_type.44b) = value_param_pattern [symbolic = %a.param_patt.loc5_22.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc5_22.2: @F.%pattern_type (%pattern_type.44b) = wrapper_binding_pattern a, %a.param_patt.loc5_22.2 [symbolic = %a.patt.loc5_22.2 (constants.%a.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc5_34.1 [symbolic = %require_complete (constants.%require_complete.540)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Array.loc5_34.1 [symbolic = %require_complete (constants.%require_complete.698)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc5_34.1 (%array_type)) { +// CHECK:STDOUT: fn(%a.param: @F.%Array.loc5_34.1 (%Array.02a)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2311,8 +2344,8 @@ fn G() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound => constants.%Int.as.ImplicitAs.impl.Convert.bound // CHECK:STDOUT: %bound_method.loc5_33.1 => constants.%bound_method // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1 => constants.%Int.as.ImplicitAs.impl.Convert.call -// CHECK:STDOUT: %array_type.loc5_34.1 => constants.%array_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.f28 +// CHECK:STDOUT: %Array.loc5_34.1 => constants.%Array.02a +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.44b // CHECK:STDOUT: %a.param_patt.loc5_22.2 => constants.%a.param_patt // CHECK:STDOUT: %a.patt.loc5_22.2 => constants.%a.patt // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon index e6fbec47467c..1061637099e0 100644 --- a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon +++ b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -1148,19 +1148,21 @@ fn G() { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1, type [concrete] -// CHECK:STDOUT: %pattern_type.4fd: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %T.patt.c49: %pattern_type.4fd = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T.225: %array_type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %HoldsType.type: type = generic_class_type @HoldsType [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.ac7: type = class_type @Array, @Array(type, %int_1) [concrete] +// CHECK:STDOUT: %pattern_type.9db: type = pattern_type %Array.ac7 [concrete] +// CHECK:STDOUT: %T.patt.16f: %pattern_type.9db = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.9b2: %Array.ac7 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %HoldsType.type: type = generic_class_type @HoldsType [concrete] // CHECK:STDOUT: %HoldsType.generic: %HoldsType.type = struct_value () [concrete] -// CHECK:STDOUT: %HoldsType.b96: type = class_type @HoldsType, @HoldsType(%T.225) [symbolic] +// CHECK:STDOUT: %HoldsType.f02: type = class_type @HoldsType, @HoldsType(%T.9b2) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %pattern_type.a68: type = pattern_type %HoldsType.b96 [symbolic] -// CHECK:STDOUT: %x.param_patt: %pattern_type.a68 = value_param_pattern [symbolic] -// CHECK:STDOUT: %x.patt: %pattern_type.a68 = wrapper_binding_pattern x, %x.param_patt [symbolic] +// CHECK:STDOUT: %pattern_type.31b: type = pattern_type %HoldsType.f02 [symbolic] +// CHECK:STDOUT: %x.param_patt: %pattern_type.31b = value_param_pattern [symbolic] +// CHECK:STDOUT: %x.patt: %pattern_type.31b = wrapper_binding_pattern x, %x.param_patt [symbolic] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -1184,7 +1186,7 @@ fn G() { // CHECK:STDOUT: %int_0.3c0: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.00e: = require_complete_type %HoldsType.b96 [symbolic] +// CHECK:STDOUT: %require_complete.1fc: = require_complete_type %HoldsType.f02 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] @@ -1199,24 +1201,25 @@ fn G() { // CHECK:STDOUT: %type.as.Copy.impl.Op.type: type = fn_type @type.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %type.as.Copy.impl.Op: %type.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.Copy.impl.Op.bound: = bound_method %C, %type.as.Copy.impl.Op [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%C) [concrete] -// CHECK:STDOUT: %.f9a: ref %array_type = temporary invalid, %array [concrete] -// CHECK:STDOUT: %HoldsType.d9e: type = class_type @HoldsType, @HoldsType(%array) [concrete] -// CHECK:STDOUT: %HoldsType.val: %HoldsType.d9e = struct_value () [concrete] +// CHECK:STDOUT: %array: %Array.ac7 = tuple_value (%C) [concrete] +// CHECK:STDOUT: %.dc4: ref %Array.ac7 = temporary invalid, %array [concrete] +// CHECK:STDOUT: %HoldsType.ae8: type = class_type @HoldsType, @HoldsType(%array) [concrete] +// CHECK:STDOUT: %HoldsType.val: %HoldsType.ae8 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.308: %pattern_type.4fd = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a71: %pattern_type.4fd = wrapper_binding_pattern self, %self.param_patt.308 [concrete] +// CHECK:STDOUT: %self.param_patt.da1: %pattern_type.9db = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.23f: %pattern_type.9db = wrapper_binding_pattern self, %self.param_patt.da1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc17 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc17 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.f9a, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.dc4, %Destroy.WithSelf.SelfDestruct.db3 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy @@ -1224,6 +1227,7 @@ fn G() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] @@ -1236,18 +1240,18 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: generated { // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4fd = ref_param_pattern [concrete = constants.%self.param_patt.308] -// CHECK:STDOUT: %self.patt: %pattern_type.4fd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a71] +// CHECK:STDOUT: %self.param_patt: %pattern_type.9db = ref_param_pattern [concrete = constants.%self.param_patt.da1] +// CHECK:STDOUT: %self.patt: %pattern_type.9db = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.23f] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.ac7 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.ac7 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc17 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4fd = ref_param_pattern [concrete = constants.%self.param_patt.308] -// CHECK:STDOUT: %self.patt: %pattern_type.4fd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a71] +// CHECK:STDOUT: %self.param_patt: %pattern_type.9db = ref_param_pattern [concrete = constants.%self.param_patt.da1] +// CHECK:STDOUT: %self.patt: %pattern_type.9db = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.23f] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.ac7 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.ac7 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1261,40 +1265,40 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HoldsType.decl: %HoldsType.type = class_decl @HoldsType [concrete = constants.%HoldsType.generic] { -// CHECK:STDOUT: %T.patt.loc4_18.1: %pattern_type.4fd = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt.c49)] +// CHECK:STDOUT: %T.patt.loc4_18.1: %pattern_type.9db = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt.16f)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_33: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc4_33: type = splice_block %Array [concrete = constants.%Array.ac7] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc4_26: type = type_literal type [concrete = type] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %.loc4_26 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(type, constants.%int_1) [concrete = constants.%Array.ac7] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_18.2: %array_type = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T.225)] +// CHECK:STDOUT: %T.loc4_18.2: %Array.ac7 = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T.9b2)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc12_7.1: %pattern_type.4fd = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_7.2 (constants.%T.patt.c49)] -// CHECK:STDOUT: %x.param_patt.loc12_33.1: @F.%pattern_type (%pattern_type.a68) = value_param_pattern [symbolic = %x.param_patt.loc12_33.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc12_33.1: @F.%pattern_type (%pattern_type.a68) = wrapper_binding_pattern x, %x.param_patt.loc12_33.1 [symbolic = %x.patt.loc12_33.2 (constants.%x.patt)] +// CHECK:STDOUT: %T.patt.loc12_7.1: %pattern_type.9db = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_7.2 (constants.%T.patt.16f)] +// CHECK:STDOUT: %x.param_patt.loc12_33.1: @F.%pattern_type (%pattern_type.31b) = value_param_pattern [symbolic = %x.param_patt.loc12_33.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc12_33.1: @F.%pattern_type (%pattern_type.31b) = wrapper_binding_pattern x, %x.param_patt.loc12_33.1 [symbolic = %x.patt.loc12_33.2 (constants.%x.patt)] // CHECK:STDOUT: %a.param_patt: = value_param_pattern [concrete = ] // CHECK:STDOUT: %a.patt: = wrapper_binding_pattern a, %a.param_patt [concrete = ] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_22: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc12_22: type = splice_block %Array [concrete = constants.%Array.ac7] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc12_15: type = type_literal type [concrete = type] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %.loc12_15 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(type, constants.%int_1) [concrete = constants.%Array.ac7] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc12_7.2: %array_type = symbolic_binding T, 0 [symbolic = %T.loc12_7.1 (constants.%T.225)] -// CHECK:STDOUT: %x.param: @F.%HoldsType.loc12_46.1 (%HoldsType.b96) = value_param call_param0 -// CHECK:STDOUT: %.loc12_46: type = splice_block %HoldsType.loc12_46.2 [symbolic = %HoldsType.loc12_46.1 (constants.%HoldsType.b96)] { +// CHECK:STDOUT: %T.loc12_7.2: %Array.ac7 = symbolic_binding T, 0 [symbolic = %T.loc12_7.1 (constants.%T.9b2)] +// CHECK:STDOUT: %x.param: @F.%HoldsType.loc12_46.1 (%HoldsType.f02) = value_param call_param0 +// CHECK:STDOUT: %.loc12_46: type = splice_block %HoldsType.loc12_46.2 [symbolic = %HoldsType.loc12_46.1 (constants.%HoldsType.f02)] { // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %T.ref.loc12_45: %array_type = name_ref T, %T.loc12_7.2 [symbolic = %T.loc12_7.1 (constants.%T.225)] -// CHECK:STDOUT: %HoldsType.loc12_46.2: type = class_type @HoldsType, @HoldsType(constants.%T.225) [symbolic = %HoldsType.loc12_46.1 (constants.%HoldsType.b96)] +// CHECK:STDOUT: %T.ref.loc12_45: %Array.ac7 = name_ref T, %T.loc12_7.2 [symbolic = %T.loc12_7.1 (constants.%T.9b2)] +// CHECK:STDOUT: %HoldsType.loc12_46.2: type = class_type @HoldsType, @HoldsType(constants.%T.9b2) [symbolic = %HoldsType.loc12_46.1 (constants.%HoldsType.f02)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @F.%HoldsType.loc12_46.1 (%HoldsType.b96) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @F.%HoldsType.loc12_46.1 (%HoldsType.f02) = wrapper_binding x, %x.param // CHECK:STDOUT: %a.param: = value_param call_param1 // CHECK:STDOUT: %.1: = splice_block [concrete = ] { -// CHECK:STDOUT: %T.ref.loc12_59: %array_type = name_ref T, %T.loc12_7.2 [symbolic = %T.loc12_7.1 (constants.%T.225)] +// CHECK:STDOUT: %T.ref.loc12_59: %Array.ac7 = name_ref T, %T.loc12_7.2 [symbolic = %T.loc12_7.1 (constants.%T.9b2)] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc12_61.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] @@ -1303,7 +1307,7 @@ fn G() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc12_61.2(%int_0) [concrete = constants.%int_0.3c0] // CHECK:STDOUT: %.loc12_61.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.3c0] // CHECK:STDOUT: %.loc12_61.2: %i32 = converted %int_0, %.loc12_61.1 [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc12_62.1: ref %array_type = value_as_ref %T.ref.loc12_59 +// CHECK:STDOUT: %.loc12_62.1: ref %Array.ac7 = value_as_ref %T.ref.loc12_59 // CHECK:STDOUT: %.loc12_62.2: ref type = array_index %.loc12_62.1, %.loc12_61.2 // CHECK:STDOUT: %.loc12_62.3: type = acquire_value %.loc12_62.2 // CHECK:STDOUT: } @@ -1313,9 +1317,9 @@ fn G() { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @HoldsType(%T.loc4_18.2: %array_type) { -// CHECK:STDOUT: %T.patt.loc4_18.2: %pattern_type.4fd = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt.c49)] -// CHECK:STDOUT: %T.loc4_18.1: %array_type = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T.225)] +// CHECK:STDOUT: generic class @HoldsType(%T.loc4_18.2: %Array.ac7) { +// CHECK:STDOUT: %T.patt.loc4_18.2: %pattern_type.9db = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt.16f)] +// CHECK:STDOUT: %T.loc4_18.1: %Array.ac7 = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T.9b2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1324,7 +1328,7 @@ fn G() { // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%HoldsType.b96 +// CHECK:STDOUT: .Self = constants.%HoldsType.f02 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1336,18 +1340,18 @@ fn G() { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc12_7.2: %array_type) { -// CHECK:STDOUT: %T.patt.loc12_7.2: %pattern_type.4fd = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_7.2 (constants.%T.patt.c49)] -// CHECK:STDOUT: %T.loc12_7.1: %array_type = symbolic_binding T, 0 [symbolic = %T.loc12_7.1 (constants.%T.225)] -// CHECK:STDOUT: %HoldsType.loc12_46.1: type = class_type @HoldsType, @HoldsType(%T.loc12_7.1) [symbolic = %HoldsType.loc12_46.1 (constants.%HoldsType.b96)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %HoldsType.loc12_46.1 [symbolic = %pattern_type (constants.%pattern_type.a68)] -// CHECK:STDOUT: %x.param_patt.loc12_33.2: @F.%pattern_type (%pattern_type.a68) = value_param_pattern [symbolic = %x.param_patt.loc12_33.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc12_33.2: @F.%pattern_type (%pattern_type.a68) = wrapper_binding_pattern x, %x.param_patt.loc12_33.2 [symbolic = %x.patt.loc12_33.2 (constants.%x.patt)] +// CHECK:STDOUT: generic fn @F(%T.loc12_7.2: %Array.ac7) { +// CHECK:STDOUT: %T.patt.loc12_7.2: %pattern_type.9db = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_7.2 (constants.%T.patt.16f)] +// CHECK:STDOUT: %T.loc12_7.1: %Array.ac7 = symbolic_binding T, 0 [symbolic = %T.loc12_7.1 (constants.%T.9b2)] +// CHECK:STDOUT: %HoldsType.loc12_46.1: type = class_type @HoldsType, @HoldsType(%T.loc12_7.1) [symbolic = %HoldsType.loc12_46.1 (constants.%HoldsType.f02)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %HoldsType.loc12_46.1 [symbolic = %pattern_type (constants.%pattern_type.31b)] +// CHECK:STDOUT: %x.param_patt.loc12_33.2: @F.%pattern_type (%pattern_type.31b) = value_param_pattern [symbolic = %x.param_patt.loc12_33.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc12_33.2: @F.%pattern_type (%pattern_type.31b) = wrapper_binding_pattern x, %x.param_patt.loc12_33.2 [symbolic = %x.patt.loc12_33.2 (constants.%x.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %HoldsType.loc12_46.1 [symbolic = %require_complete (constants.%require_complete.00e)] +// CHECK:STDOUT: %require_complete: = require_complete_type %HoldsType.loc12_46.1 [symbolic = %require_complete (constants.%require_complete.1fc)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%HoldsType.loc12_46.1 (%HoldsType.b96), %a.param: ) { +// CHECK:STDOUT: fn(%x.param: @F.%HoldsType.loc12_46.1 (%HoldsType.f02), %a.param: ) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1362,56 +1366,56 @@ fn G() { // CHECK:STDOUT: %.loc17_25.1: %tuple.type.135 = tuple_literal (%C.ref) [concrete = constants.%tuple.9e1] // CHECK:STDOUT: %.loc17_36: type = type_literal type [concrete = type] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %.loc17_36 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(type, constants.%int_1) [concrete = constants.%Array.ac7] // CHECK:STDOUT: %impl.elem0: %.39e = impl_witness_access constants.%Copy.impl_witness.f3e, element0 [concrete = constants.%type.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %C.ref, %impl.elem0 [concrete = constants.%type.as.Copy.impl.Op.bound] // CHECK:STDOUT: %type.as.Copy.impl.Op.call: init type = call %bound_method(%C.ref) [concrete = constants.%C] -// CHECK:STDOUT: %.loc17_25.2: ref %array_type = temporary_storage +// CHECK:STDOUT: %.loc17_25.2: ref %Array.ac7 = temporary_storage // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc17_25.3: ref type = array_index %.loc17_25.2, %int_0 // CHECK:STDOUT: %.loc17_25.4: init type to %.loc17_25.3 = in_place_init %type.as.Copy.impl.Op.call [concrete = constants.%C] -// CHECK:STDOUT: %.loc17_25.5: init %array_type to %.loc17_25.2 = array_init (%.loc17_25.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc17_27.1: init %array_type = converted %.loc17_25.1, %.loc17_25.5 [concrete = constants.%array] -// CHECK:STDOUT: %.loc17_27.2: ref %array_type = temporary %.loc17_25.2, %.loc17_27.1 [concrete = constants.%.f9a] -// CHECK:STDOUT: %.loc17_27.3: %array_type = acquire_value %.loc17_27.2 [concrete = constants.%array] -// CHECK:STDOUT: %HoldsType: type = class_type @HoldsType, @HoldsType(constants.%array) [concrete = constants.%HoldsType.d9e] -// CHECK:STDOUT: %.loc17_6.2: ref %HoldsType.d9e = temporary_storage -// CHECK:STDOUT: %.loc17_6.3: init %HoldsType.d9e to %.loc17_6.2 = class_init () [concrete = constants.%HoldsType.val] -// CHECK:STDOUT: %.loc17_8: init %HoldsType.d9e = converted %.loc17_6.1, %.loc17_6.3 [concrete = constants.%HoldsType.val] +// CHECK:STDOUT: %.loc17_25.5: init %Array.ac7 to %.loc17_25.2 = array_init (%.loc17_25.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc17_27.1: init %Array.ac7 = converted %.loc17_25.1, %.loc17_25.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc17_27.2: ref %Array.ac7 = temporary %.loc17_25.2, %.loc17_27.1 [concrete = constants.%.dc4] +// CHECK:STDOUT: %.loc17_27.3: %Array.ac7 = acquire_value %.loc17_27.2 [concrete = constants.%array] +// CHECK:STDOUT: %HoldsType: type = class_type @HoldsType, @HoldsType(constants.%array) [concrete = constants.%HoldsType.ae8] +// CHECK:STDOUT: %.loc17_6.2: ref %HoldsType.ae8 = temporary_storage +// CHECK:STDOUT: %.loc17_6.3: init %HoldsType.ae8 to %.loc17_6.2 = class_init () [concrete = constants.%HoldsType.val] +// CHECK:STDOUT: %.loc17_8: init %HoldsType.ae8 = converted %.loc17_6.1, %.loc17_6.3 [concrete = constants.%HoldsType.val] // CHECK:STDOUT: %.loc17_48: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.f9a) +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.dc4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17(%self.param: ref %Array.ac7) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17(%self.param: ref %Array.ac7) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17(%self.param: ref %Array.ac7) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType(constants.%T.225) { -// CHECK:STDOUT: %T.patt.loc4_18.2 => constants.%T.patt.c49 -// CHECK:STDOUT: %T.loc4_18.1 => constants.%T.225 +// CHECK:STDOUT: specific @HoldsType(constants.%T.9b2) { +// CHECK:STDOUT: %T.patt.loc4_18.2 => constants.%T.patt.16f +// CHECK:STDOUT: %T.loc4_18.1 => constants.%T.9b2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T.225) { -// CHECK:STDOUT: %T.patt.loc12_7.2 => constants.%T.patt.c49 -// CHECK:STDOUT: %T.loc12_7.1 => constants.%T.225 -// CHECK:STDOUT: %HoldsType.loc12_46.1 => constants.%HoldsType.b96 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.a68 +// CHECK:STDOUT: specific @F(constants.%T.9b2) { +// CHECK:STDOUT: %T.patt.loc12_7.2 => constants.%T.patt.16f +// CHECK:STDOUT: %T.loc12_7.1 => constants.%T.9b2 +// CHECK:STDOUT: %HoldsType.loc12_46.1 => constants.%HoldsType.f02 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.31b // CHECK:STDOUT: %x.param_patt.loc12_33.2 => constants.%x.param_patt // CHECK:STDOUT: %x.patt.loc12_33.2 => constants.%x.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HoldsType(constants.%array) { -// CHECK:STDOUT: %T.patt.loc4_18.2 => constants.%T.patt.c49 +// CHECK:STDOUT: %T.patt.loc4_18.2 => constants.%T.patt.16f // CHECK:STDOUT: %T.loc4_18.1 => constants.%array // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/eval/aggregates.carbon b/toolchain/check/testdata/eval/aggregates.carbon index e9a181ba2a09..dc87ab4e2b85 100644 --- a/toolchain/check/testdata/eval/aggregates.carbon +++ b/toolchain/check/testdata/eval/aggregates.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -59,7 +59,7 @@ fn G(generic N: i32) { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %tuple.type.693: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple.94e: %tuple.type.693 = tuple_value (%i32, %i32) [concrete] @@ -91,7 +91,7 @@ fn G(generic N: i32) { // CHECK:STDOUT: %tuple.102: %tuple.type.e55 = tuple_value (%int_1.0c6, %int_2.295) [concrete] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%tuple_copy.var, element0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.b51: = impl_witness imports.%Copy.impl_witness_table.8d2, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3f6: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] @@ -123,10 +123,10 @@ fn G(generic N: i32) { // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound.4ec: = bound_method %int_3.410, %Int.as.Copy.impl.Op.4f6 [concrete] // CHECK:STDOUT: %bound_method.1b6: = bound_method %int_3.410, %Int.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %struct.11a: %struct_type.a.b.c = struct_value (%int_1.0c6, %int_2.295, %int_3.410) [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.97e: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %tuple_index.patt: %pattern_type.97e = ref_binding_pattern tuple_index [concrete] -// CHECK:STDOUT: %tuple_index.var_patt: %pattern_type.97e = var_pattern %tuple_index.patt [concrete] +// CHECK:STDOUT: %Array.096: type = class_type @Array, @Array(%i32, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.297: type = pattern_type %Array.096 [concrete] +// CHECK:STDOUT: %tuple_index.patt: %pattern_type.297 = ref_binding_pattern tuple_index [concrete] +// CHECK:STDOUT: %tuple_index.var_patt: %pattern_type.297 = var_pattern %tuple_index.patt [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] // CHECK:STDOUT: %tuple.4f2: %tuple.type.985 = tuple_value (%int_0.5c6) [concrete] @@ -138,9 +138,9 @@ fn G(generic N: i32) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] // CHECK:STDOUT: %bound_method.6e0: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.3c0: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.3c0) [concrete] -// CHECK:STDOUT: %struct_access.patt: %pattern_type.97e = ref_binding_pattern struct_access [concrete] -// CHECK:STDOUT: %struct_access.var_patt: %pattern_type.97e = var_pattern %struct_access.patt [concrete] +// CHECK:STDOUT: %array: %Array.096 = tuple_value (%int_0.3c0) [concrete] +// CHECK:STDOUT: %struct_access.patt: %pattern_type.297 = ref_binding_pattern struct_access [concrete] +// CHECK:STDOUT: %struct_access.var_patt: %pattern_type.297 = var_pattern %struct_access.patt [concrete] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %struct.a81: %struct_type.a.b = struct_value (%int_3.1ba, %int_1.5b8) [concrete] // CHECK:STDOUT: } @@ -177,27 +177,27 @@ fn G(generic N: i32) { // CHECK:STDOUT: %struct_copy.patt: %pattern_type.9c3 = ref_binding_pattern struct_copy [concrete = constants.%struct_copy.patt] // CHECK:STDOUT: %struct_copy.var_patt: %pattern_type.9c3 = var_pattern %struct_copy.patt [concrete = constants.%struct_copy.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %tuple_index.var: ref %array_type = var_storage %tuple_index.var_patt [concrete] -// CHECK:STDOUT: %.loc8: type = splice_block %array_type.loc8 [concrete = constants.%array_type] { +// CHECK:STDOUT: %tuple_index.var: ref %Array.096 = var_storage %tuple_index.var_patt [concrete] +// CHECK:STDOUT: %.loc8: type = splice_block %Array.loc8 [concrete = constants.%Array.096] { // CHECK:STDOUT: %i32.loc8: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type.loc8: type = array_type %int_1.loc8, %i32.loc8 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.loc8: type = class_type @Array, @Array(constants.%i32, constants.%int_1.5b8) [concrete = constants.%Array.096] // CHECK:STDOUT: } -// CHECK:STDOUT: %tuple_index: ref %array_type = wrapper_binding tuple_index, %tuple_index.var [concrete = %tuple_index.var] +// CHECK:STDOUT: %tuple_index: ref %Array.096 = wrapper_binding tuple_index, %tuple_index.var [concrete = %tuple_index.var] // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %tuple_index.patt: %pattern_type.97e = ref_binding_pattern tuple_index [concrete = constants.%tuple_index.patt] -// CHECK:STDOUT: %tuple_index.var_patt: %pattern_type.97e = var_pattern %tuple_index.patt [concrete = constants.%tuple_index.var_patt] +// CHECK:STDOUT: %tuple_index.patt: %pattern_type.297 = ref_binding_pattern tuple_index [concrete = constants.%tuple_index.patt] +// CHECK:STDOUT: %tuple_index.var_patt: %pattern_type.297 = var_pattern %tuple_index.patt [concrete = constants.%tuple_index.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %struct_access.var: ref %array_type = var_storage %struct_access.var_patt [concrete] -// CHECK:STDOUT: %.loc10: type = splice_block %array_type.loc10 [concrete = constants.%array_type] { +// CHECK:STDOUT: %struct_access.var: ref %Array.096 = var_storage %struct_access.var_patt [concrete] +// CHECK:STDOUT: %.loc10: type = splice_block %Array.loc10 [concrete = constants.%Array.096] { // CHECK:STDOUT: %i32.loc10: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type.loc10: type = array_type %int_1.loc10, %i32.loc10 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.loc10: type = class_type @Array, @Array(constants.%i32, constants.%int_1.5b8) [concrete = constants.%Array.096] // CHECK:STDOUT: } -// CHECK:STDOUT: %struct_access: ref %array_type = wrapper_binding struct_access, %struct_access.var [concrete = %struct_access.var] +// CHECK:STDOUT: %struct_access: ref %Array.096 = wrapper_binding struct_access, %struct_access.var [concrete = %struct_access.var] // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %struct_access.patt: %pattern_type.97e = ref_binding_pattern struct_access [concrete = constants.%struct_access.patt] -// CHECK:STDOUT: %struct_access.var_patt: %pattern_type.97e = var_pattern %struct_access.patt [concrete = constants.%struct_access.var_patt] +// CHECK:STDOUT: %struct_access.patt: %pattern_type.297 = ref_binding_pattern struct_access [concrete = constants.%struct_access.patt] +// CHECK:STDOUT: %struct_access.var_patt: %pattern_type.297 = var_pattern %struct_access.patt [concrete = constants.%struct_access.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -315,19 +315,19 @@ fn G(generic N: i32) { // CHECK:STDOUT: %tuple.loc8: %tuple.type.d46 = tuple_value (%int_5, %int_7, %int_1.loc8, %int_9) [concrete = constants.%tuple.869] // CHECK:STDOUT: %.loc8_64.2: %tuple.type.d46 = converted %.loc8_64.1, %tuple.loc8 [concrete = constants.%tuple.869] // CHECK:STDOUT: %tuple.elem2: Core.IntLiteral = tuple_access %.loc8_64.2, element2 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type.loc8: type = array_type %tuple.elem2, %i32.loc8 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.loc8: type = class_type @Array, @Array(constants.%i32, constants.%int_1.5b8) [concrete = constants.%Array.096] // CHECK:STDOUT: %impl.elem0.loc8: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc8_37.1: = bound_method %int_0.loc8_35, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_37.2: = bound_method %int_0.loc8_35, %specific_fn.loc8 [concrete = constants.%bound_method.6e0] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %i32 = call %bound_method.loc8_37.2(%int_0.loc8_35) [concrete = constants.%int_0.3c0] // CHECK:STDOUT: %.loc8_37.2: init %i32 = converted %int_0.loc8_35, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc8_1: ref %array_type = splice_block file.%tuple_index.var [concrete = file.%tuple_index.var] {} +// CHECK:STDOUT: %.loc8_1: ref %Array.096 = splice_block file.%tuple_index.var [concrete = file.%tuple_index.var] {} // CHECK:STDOUT: %int_0.loc8_37: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc8_37.3: ref %i32 = array_index %.loc8_1, %int_0.loc8_37 // CHECK:STDOUT: %.loc8_37.4: init %i32 to %.loc8_37.3 = in_place_init %.loc8_37.2 [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc8_37.5: init %array_type to %.loc8_1 = array_init (%.loc8_37.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc8_39: init %array_type = converted %.loc8_37.1, %.loc8_37.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc8_37.5: init %Array.096 to %.loc8_1 = array_init (%.loc8_37.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc8_39: init %Array.096 = converted %.loc8_37.1, %.loc8_37.5 [concrete = constants.%array] // CHECK:STDOUT: assign file.%tuple_index.var, %.loc8_39 // CHECK:STDOUT: %int_0.loc10_37: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc10_39.1: %tuple.type.985 = tuple_literal (%int_0.loc10_37) [concrete = constants.%tuple.4f2] @@ -338,19 +338,19 @@ fn G(generic N: i32) { // CHECK:STDOUT: %struct.loc10: %struct_type.a.b = struct_value (%int_3.loc10, %int_1.loc10) [concrete = constants.%struct.a81] // CHECK:STDOUT: %.loc10_70.2: %struct_type.a.b = converted %.loc10_70.1, %struct.loc10 [concrete = constants.%struct.a81] // CHECK:STDOUT: %.loc10_71: Core.IntLiteral = struct_access %.loc10_70.2, element1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type.loc10: type = array_type %.loc10_71, %i32.loc10 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.loc10: type = class_type @Array, @Array(constants.%i32, constants.%int_1.5b8) [concrete = constants.%Array.096] // CHECK:STDOUT: %impl.elem0.loc10: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc10_39.1: = bound_method %int_0.loc10_37, %impl.elem0.loc10 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4] // CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_39.2: = bound_method %int_0.loc10_37, %specific_fn.loc10 [concrete = constants.%bound_method.6e0] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10: init %i32 = call %bound_method.loc10_39.2(%int_0.loc10_37) [concrete = constants.%int_0.3c0] // CHECK:STDOUT: %.loc10_39.2: init %i32 = converted %int_0.loc10_37, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10 [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc10_1: ref %array_type = splice_block file.%struct_access.var [concrete = file.%struct_access.var] {} +// CHECK:STDOUT: %.loc10_1: ref %Array.096 = splice_block file.%struct_access.var [concrete = file.%struct_access.var] {} // CHECK:STDOUT: %int_0.loc10_39: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc10_39.3: ref %i32 = array_index %.loc10_1, %int_0.loc10_39 // CHECK:STDOUT: %.loc10_39.4: init %i32 to %.loc10_39.3 = in_place_init %.loc10_39.2 [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc10_39.5: init %array_type to %.loc10_1 = array_init (%.loc10_39.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc10_41: init %array_type = converted %.loc10_39.1, %.loc10_39.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc10_39.5: init %Array.096 to %.loc10_1 = array_init (%.loc10_39.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc10_41: init %Array.096 = converted %.loc10_39.1, %.loc10_39.5 [concrete = constants.%array] // CHECK:STDOUT: assign file.%struct_access.var, %.loc10_41 // CHECK:STDOUT: // CHECK:STDOUT: } @@ -362,10 +362,10 @@ fn G(generic N: i32) { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %array_type.d27: type = array_type %int_1.5b8, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.97e: type = pattern_type %array_type.d27 [concrete] -// CHECK:STDOUT: %array_index.patt: %pattern_type.97e = ref_binding_pattern array_index [concrete] -// CHECK:STDOUT: %array_index.var_patt: %pattern_type.97e = var_pattern %array_index.patt [concrete] +// CHECK:STDOUT: %Array.096: type = class_type @Array, @Array(%i32, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.297: type = pattern_type %Array.096 [concrete] +// CHECK:STDOUT: %array_index.patt: %pattern_type.297 = ref_binding_pattern array_index [concrete] +// CHECK:STDOUT: %array_index.var_patt: %pattern_type.297 = var_pattern %array_index.patt [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] // CHECK:STDOUT: %tuple.4f2: %tuple.type.985 = tuple_value (%int_0) [concrete] @@ -375,7 +375,7 @@ fn G(generic N: i32) { // CHECK:STDOUT: %tuple.type.d46: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %tuple.869: %tuple.type.d46 = tuple_value (%int_5.64b, %int_7.29f, %int_1.5b8, %int_9.988) [concrete] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete] -// CHECK:STDOUT: %array_type.88c: type = array_type %int_4, %i32 [concrete] +// CHECK:STDOUT: %Array.d15: type = class_type @Array, @Array(%i32, %int_4) [concrete] // CHECK:STDOUT: %ImplicitAs.type.914: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] @@ -401,8 +401,8 @@ fn G(generic N: i32) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f46: = bound_method %int_9.988, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] // CHECK:STDOUT: %bound_method.9bf: = bound_method %int_9.988, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_9.056: %i32 = int_value 9 [concrete] -// CHECK:STDOUT: %array: %array_type.88c = tuple_value (%int_5.eef, %int_7.690, %int_1.0c6, %int_9.056) [concrete] -// CHECK:STDOUT: %.653: ref %array_type.88c = temporary invalid, %array [concrete] +// CHECK:STDOUT: %array: %Array.d15 = tuple_value (%int_5.eef, %int_7.690, %int_1.0c6, %int_9.056) [concrete] +// CHECK:STDOUT: %.26d: ref %Array.d15 = temporary invalid, %array [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.9f3: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] // CHECK:STDOUT: %bound_method.3cb: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.295: %i32 = int_value 2 [concrete] @@ -414,16 +414,16 @@ fn G(generic N: i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { -// CHECK:STDOUT: %array_index.var: ref %array_type.d27 = var_storage %array_index.var_patt [concrete] -// CHECK:STDOUT: %.loc9: type = splice_block %array_type [concrete = constants.%array_type.d27] { +// CHECK:STDOUT: %array_index.var: ref %Array.096 = var_storage %array_index.var_patt [concrete] +// CHECK:STDOUT: %.loc9: type = splice_block %Array [concrete = constants.%Array.096] { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [concrete = constants.%array_type.d27] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_1.5b8) [concrete = constants.%Array.096] // CHECK:STDOUT: } -// CHECK:STDOUT: %array_index: ref %array_type.d27 = wrapper_binding array_index, %array_index.var [concrete = %array_index.var] +// CHECK:STDOUT: %array_index: ref %Array.096 = wrapper_binding array_index, %array_index.var [concrete = %array_index.var] // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %array_index.patt: %pattern_type.97e = ref_binding_pattern array_index [concrete = constants.%array_index.patt] -// CHECK:STDOUT: %array_index.var_patt: %pattern_type.97e = var_pattern %array_index.patt [concrete = constants.%array_index.var_patt] +// CHECK:STDOUT: %array_index.patt: %pattern_type.297 = ref_binding_pattern array_index [concrete = constants.%array_index.patt] +// CHECK:STDOUT: %array_index.var_patt: %pattern_type.297 = var_pattern %array_index.patt [concrete = constants.%array_index.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -439,14 +439,14 @@ fn G(generic N: i32) { // CHECK:STDOUT: %.loc9_65.1: %tuple.type.d46 = tuple_literal (%int_5, %int_7, %int_1.loc9_61, %int_9) [concrete = constants.%tuple.869] // CHECK:STDOUT: %i32.loc9_76: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] -// CHECK:STDOUT: %array_type: type = array_type %int_4, %i32.loc9_76 [concrete = constants.%array_type.88c] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_4) [concrete = constants.%Array.d15] // CHECK:STDOUT: %impl.elem0.loc9_65.1: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc9_65.1: = bound_method %int_5, %impl.elem0.loc9_65.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f6c] // CHECK:STDOUT: %specific_fn.loc9_65.1: = specific_function %impl.elem0.loc9_65.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_65.2: = bound_method %int_5, %specific_fn.loc9_65.1 [concrete = constants.%bound_method.c9d] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_65.1: init %i32 = call %bound_method.loc9_65.2(%int_5) [concrete = constants.%int_5.eef] // CHECK:STDOUT: %.loc9_65.2: init %i32 = converted %int_5, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_65.1 [concrete = constants.%int_5.eef] -// CHECK:STDOUT: %.loc9_65.3: ref %array_type.88c = temporary_storage +// CHECK:STDOUT: %.loc9_65.3: ref %Array.d15 = temporary_storage // CHECK:STDOUT: %int_0.loc9_65: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc9_65.4: ref %i32 = array_index %.loc9_65.3, %int_0.loc9_65 // CHECK:STDOUT: %.loc9_65.5: init %i32 to %.loc9_65.4 = in_place_init %.loc9_65.2 [concrete = constants.%int_5.eef] @@ -477,10 +477,10 @@ fn G(generic N: i32) { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] // CHECK:STDOUT: %.loc9_65.13: ref %i32 = array_index %.loc9_65.3, %int_3 // CHECK:STDOUT: %.loc9_65.14: init %i32 to %.loc9_65.13 = in_place_init %.loc9_65.12 [concrete = constants.%int_9.056] -// CHECK:STDOUT: %.loc9_65.15: init %array_type.88c to %.loc9_65.3 = array_init (%.loc9_65.5, %.loc9_65.8, %.loc9_65.11, %.loc9_65.14) [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_67.1: init %array_type.88c = converted %.loc9_65.1, %.loc9_65.15 [concrete = constants.%array] +// CHECK:STDOUT: %.loc9_65.15: init %Array.d15 to %.loc9_65.3 = array_init (%.loc9_65.5, %.loc9_65.8, %.loc9_65.11, %.loc9_65.14) [concrete = constants.%array] +// CHECK:STDOUT: %.loc9_67.1: init %Array.d15 = converted %.loc9_65.1, %.loc9_65.15 [concrete = constants.%array] // CHECK:STDOUT: %int_2.loc9_85: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %.loc9_67.2: ref %array_type.88c = temporary %.loc9_65.3, %.loc9_67.1 [concrete = constants.%.653] +// CHECK:STDOUT: %.loc9_67.2: ref %Array.d15 = temporary %.loc9_65.3, %.loc9_67.1 [concrete = constants.%.26d] // CHECK:STDOUT: %impl.elem0.loc9_85: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc9_85.1: = bound_method %int_2.loc9_85, %impl.elem0.loc9_85 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.9f3] // CHECK:STDOUT: %specific_fn.loc9_85: = specific_function %impl.elem0.loc9_85, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] @@ -534,24 +534,24 @@ fn G(generic N: i32) { // CHECK:STDOUT: %impl.elem0.178: %.883 = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.53f, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn.b12: = specific_impl_function %impl.elem0.178, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.103) [symbolic] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete] -// CHECK:STDOUT: %array_type.50f: type = array_type %int_5, %T.as_type.700 [symbolic] -// CHECK:STDOUT: %require_complete.f3e: = require_complete_type %array_type.50f [symbolic] -// CHECK:STDOUT: %pattern_type.78a: type = pattern_type %array_type.50f [symbolic] -// CHECK:STDOUT: %w.patt: %pattern_type.78a = ref_binding_pattern w [symbolic] -// CHECK:STDOUT: %w.var_patt: %pattern_type.78a = var_pattern %w.patt [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.1fb: = lookup_impl_witness %array_type.50f, @DefaultOrUnformed [symbolic] -// CHECK:STDOUT: %.376: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%array_type.50f) [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.facet.d60: %DefaultOrUnformed.type = facet_value %array_type.50f, (%DefaultOrUnformed.lookup_impl_witness.1fb) [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.e22: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.d60) [symbolic] -// CHECK:STDOUT: %.478: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.e22, %DefaultOrUnformed.facet.d60 [symbolic] -// CHECK:STDOUT: %impl.elem0.276: %.478 = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.1fb, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.6bf: = specific_impl_function %impl.elem0.276, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.d60) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.1f5: = lookup_impl_witness %array_type.50f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.664: %Destroy.type = facet_value %array_type.50f, (%Destroy.lookup_impl_witness.1f5) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.2db: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.664) [symbolic] -// CHECK:STDOUT: %.fc5: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.2db, %Destroy.facet.664 [symbolic] -// CHECK:STDOUT: %impl.elem2.3eb: %.fc5 = impl_witness_access %Destroy.lookup_impl_witness.1f5, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.c96: = specific_impl_function %impl.elem2.3eb, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.664) [symbolic] +// CHECK:STDOUT: %Array.d87: type = class_type @Array, @Array(%T.as_type.700, %int_5) [symbolic] +// CHECK:STDOUT: %require_complete.915: = require_complete_type %Array.d87 [symbolic] +// CHECK:STDOUT: %pattern_type.1a6: type = pattern_type %Array.d87 [symbolic] +// CHECK:STDOUT: %w.patt: %pattern_type.1a6 = ref_binding_pattern w [symbolic] +// CHECK:STDOUT: %w.var_patt: %pattern_type.1a6 = var_pattern %w.patt [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.b34: = lookup_impl_witness %Array.d87, @DefaultOrUnformed [symbolic] +// CHECK:STDOUT: %.d29: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%Array.d87) [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.facet.55a: %DefaultOrUnformed.type = facet_value %Array.d87, (%DefaultOrUnformed.lookup_impl_witness.b34) [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.4e2: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.55a) [symbolic] +// CHECK:STDOUT: %.926: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.4e2, %DefaultOrUnformed.facet.55a [symbolic] +// CHECK:STDOUT: %impl.elem0.3c7: %.926 = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.b34, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.312: = specific_impl_function %impl.elem0.3c7, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.55a) [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.3a9: = lookup_impl_witness %Array.d87, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.538: %Destroy.type = facet_value %Array.d87, (%Destroy.lookup_impl_witness.3a9) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.628: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.538) [symbolic] +// CHECK:STDOUT: %.3b4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.628, %Destroy.facet.538 [symbolic] +// CHECK:STDOUT: %impl.elem2.d82: %.3b4 = impl_witness_access %Destroy.lookup_impl_witness.3a9, element2 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.fe6: = specific_impl_function %impl.elem2.d82, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.538) [symbolic] // CHECK:STDOUT: %Destroy.lookup_impl_witness.7f9: = lookup_impl_witness %struct_type.a, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.aa3: %Destroy.type = facet_value %struct_type.a, (%Destroy.lookup_impl_witness.7f9) [symbolic] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.3c2: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.aa3) [symbolic] @@ -583,24 +583,24 @@ fn G(generic N: i32) { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.69e, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %N.37f, %Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method(%N.37f) [symbolic] -// CHECK:STDOUT: %array_type.359: type = array_type %Int.as.ImplicitAs.impl.Convert.call, %i32 [symbolic] -// CHECK:STDOUT: %require_complete.f47: = require_complete_type %array_type.359 [symbolic] -// CHECK:STDOUT: %pattern_type.486: type = pattern_type %array_type.359 [symbolic] -// CHECK:STDOUT: %k.patt: %pattern_type.486 = ref_binding_pattern k [symbolic] -// CHECK:STDOUT: %k.var_patt: %pattern_type.486 = var_pattern %k.patt [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.5c0: = lookup_impl_witness %array_type.359, @DefaultOrUnformed [symbolic] -// CHECK:STDOUT: %.63b: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%array_type.359) [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.facet.b1c: %DefaultOrUnformed.type = facet_value %array_type.359, (%DefaultOrUnformed.lookup_impl_witness.5c0) [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.d4c: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.b1c) [symbolic] -// CHECK:STDOUT: %.608: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.d4c, %DefaultOrUnformed.facet.b1c [symbolic] -// CHECK:STDOUT: %impl.elem0.37d: %.608 = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.5c0, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b63: = specific_impl_function %impl.elem0.37d, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.b1c) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.822: = lookup_impl_witness %array_type.359, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.a58: %Destroy.type = facet_value %array_type.359, (%Destroy.lookup_impl_witness.822) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.d3f: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.a58) [symbolic] -// CHECK:STDOUT: %.f42: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.d3f, %Destroy.facet.a58 [symbolic] -// CHECK:STDOUT: %impl.elem2.f96: %.f42 = impl_witness_access %Destroy.lookup_impl_witness.822, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.262: = specific_impl_function %impl.elem2.f96, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.a58) [symbolic] +// CHECK:STDOUT: %Array.867: type = class_type @Array, @Array(%i32, %Int.as.ImplicitAs.impl.Convert.call) [symbolic] +// CHECK:STDOUT: %require_complete.c2c: = require_complete_type %Array.867 [symbolic] +// CHECK:STDOUT: %pattern_type.161: type = pattern_type %Array.867 [symbolic] +// CHECK:STDOUT: %k.patt: %pattern_type.161 = ref_binding_pattern k [symbolic] +// CHECK:STDOUT: %k.var_patt: %pattern_type.161 = var_pattern %k.patt [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.a45: = lookup_impl_witness %Array.867, @DefaultOrUnformed [symbolic] +// CHECK:STDOUT: %.018: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%Array.867) [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.facet.454: %DefaultOrUnformed.type = facet_value %Array.867, (%DefaultOrUnformed.lookup_impl_witness.a45) [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.29f: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.454) [symbolic] +// CHECK:STDOUT: %.d9d: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.29f, %DefaultOrUnformed.facet.454 [symbolic] +// CHECK:STDOUT: %impl.elem0.e63: %.d9d = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.a45, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.6ef: = specific_impl_function %impl.elem0.e63, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.454) [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.aea: = lookup_impl_witness %Array.867, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.1f8: %Destroy.type = facet_value %Array.867, (%Destroy.lookup_impl_witness.aea) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fa9: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.1f8) [symbolic] +// CHECK:STDOUT: %.e22: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.fa9, %Destroy.facet.1f8 [symbolic] +// CHECK:STDOUT: %impl.elem2.a71: %.e22 = impl_witness_access %Destroy.lookup_impl_witness.aea, element2 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.047: = specific_impl_function %impl.elem2.a71, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.1f8) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -640,24 +640,24 @@ fn G(generic N: i32) { // CHECK:STDOUT: %.loc7_24.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.loc7, %DefaultOrUnformed.facet.loc7_24.2 [symbolic = %.loc7_24.4 (constants.%.883)] // CHECK:STDOUT: %impl.elem0.loc7_24.2: @F.%.loc7_24.4 (%.883) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.loc7, element0 [symbolic = %impl.elem0.loc7_24.2 (constants.%impl.elem0.178)] // CHECK:STDOUT: %specific_impl_fn.loc7_24.2: = specific_impl_function %impl.elem0.loc7_24.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc7_24.2) [symbolic = %specific_impl_fn.loc7_24.2 (constants.%specific_impl_fn.b12)] -// CHECK:STDOUT: %array_type.loc8_27.2: type = array_type constants.%int_5, %T.as_type.loc6_19.2 [symbolic = %array_type.loc8_27.2 (constants.%array_type.50f)] -// CHECK:STDOUT: %require_complete.loc8: = require_complete_type %array_type.loc8_27.2 [symbolic = %require_complete.loc8 (constants.%require_complete.f3e)] -// CHECK:STDOUT: %pattern_type.loc8: type = pattern_type %array_type.loc8_27.2 [symbolic = %pattern_type.loc8 (constants.%pattern_type.78a)] -// CHECK:STDOUT: %w.patt.loc8_15.2: @F.%pattern_type.loc8 (%pattern_type.78a) = ref_binding_pattern w [symbolic = %w.patt.loc8_15.2 (constants.%w.patt)] -// CHECK:STDOUT: %w.var_patt.loc8_3.2: @F.%pattern_type.loc8 (%pattern_type.78a) = var_pattern %w.patt.loc8_15.2 [symbolic = %w.var_patt.loc8_3.2 (constants.%w.var_patt)] -// CHECK:STDOUT: %.loc8_28.3: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%array_type.loc8_27.2) [symbolic = %.loc8_28.3 (constants.%.376)] -// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.loc8: = lookup_impl_witness %array_type.loc8_27.2, @DefaultOrUnformed [symbolic = %DefaultOrUnformed.lookup_impl_witness.loc8 (constants.%DefaultOrUnformed.lookup_impl_witness.1fb)] -// CHECK:STDOUT: %DefaultOrUnformed.facet.loc8_28.2: %DefaultOrUnformed.type = facet_value %array_type.loc8_27.2, (%DefaultOrUnformed.lookup_impl_witness.loc8) [symbolic = %DefaultOrUnformed.facet.loc8_28.2 (constants.%DefaultOrUnformed.facet.d60)] -// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.loc8: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.loc8_28.2) [symbolic = %DefaultOrUnformed.WithSelf.Op.type.loc8 (constants.%DefaultOrUnformed.WithSelf.Op.type.e22)] -// CHECK:STDOUT: %.loc8_28.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.loc8, %DefaultOrUnformed.facet.loc8_28.2 [symbolic = %.loc8_28.4 (constants.%.478)] -// CHECK:STDOUT: %impl.elem0.loc8_28.2: @F.%.loc8_28.4 (%.478) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.loc8, element0 [symbolic = %impl.elem0.loc8_28.2 (constants.%impl.elem0.276)] -// CHECK:STDOUT: %specific_impl_fn.loc8_28.2: = specific_impl_function %impl.elem0.loc8_28.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc8_28.2) [symbolic = %specific_impl_fn.loc8_28.2 (constants.%specific_impl_fn.6bf)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.loc8: = lookup_impl_witness %array_type.loc8_27.2, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc8 (constants.%Destroy.lookup_impl_witness.1f5)] -// CHECK:STDOUT: %Destroy.facet.loc8_3.3: %Destroy.type = facet_value %array_type.loc8_27.2, (%Destroy.lookup_impl_witness.loc8) [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.664)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.loc8: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.loc8_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type.loc8 (constants.%Destroy.WithSelf.SelfDestruct.type.2db)] -// CHECK:STDOUT: %.loc8_3.4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.loc8, %Destroy.facet.loc8_3.3 [symbolic = %.loc8_3.4 (constants.%.fc5)] -// CHECK:STDOUT: %impl.elem2.loc8_3.2: @F.%.loc8_3.4 (%.fc5) = impl_witness_access %Destroy.lookup_impl_witness.loc8, element2 [symbolic = %impl.elem2.loc8_3.2 (constants.%impl.elem2.3eb)] -// CHECK:STDOUT: %specific_impl_fn.loc8_3.2: = specific_impl_function %impl.elem2.loc8_3.2, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.loc8_3.3) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.c96)] +// CHECK:STDOUT: %Array.loc8_27.2: type = class_type @Array, @Array(%T.as_type.loc6_19.2, constants.%int_5) [symbolic = %Array.loc8_27.2 (constants.%Array.d87)] +// CHECK:STDOUT: %require_complete.loc8: = require_complete_type %Array.loc8_27.2 [symbolic = %require_complete.loc8 (constants.%require_complete.915)] +// CHECK:STDOUT: %pattern_type.loc8: type = pattern_type %Array.loc8_27.2 [symbolic = %pattern_type.loc8 (constants.%pattern_type.1a6)] +// CHECK:STDOUT: %w.patt.loc8_15.2: @F.%pattern_type.loc8 (%pattern_type.1a6) = ref_binding_pattern w [symbolic = %w.patt.loc8_15.2 (constants.%w.patt)] +// CHECK:STDOUT: %w.var_patt.loc8_3.2: @F.%pattern_type.loc8 (%pattern_type.1a6) = var_pattern %w.patt.loc8_15.2 [symbolic = %w.var_patt.loc8_3.2 (constants.%w.var_patt)] +// CHECK:STDOUT: %.loc8_28.3: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%Array.loc8_27.2) [symbolic = %.loc8_28.3 (constants.%.d29)] +// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.loc8: = lookup_impl_witness %Array.loc8_27.2, @DefaultOrUnformed [symbolic = %DefaultOrUnformed.lookup_impl_witness.loc8 (constants.%DefaultOrUnformed.lookup_impl_witness.b34)] +// CHECK:STDOUT: %DefaultOrUnformed.facet.loc8_28.2: %DefaultOrUnformed.type = facet_value %Array.loc8_27.2, (%DefaultOrUnformed.lookup_impl_witness.loc8) [symbolic = %DefaultOrUnformed.facet.loc8_28.2 (constants.%DefaultOrUnformed.facet.55a)] +// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.loc8: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.loc8_28.2) [symbolic = %DefaultOrUnformed.WithSelf.Op.type.loc8 (constants.%DefaultOrUnformed.WithSelf.Op.type.4e2)] +// CHECK:STDOUT: %.loc8_28.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.loc8, %DefaultOrUnformed.facet.loc8_28.2 [symbolic = %.loc8_28.4 (constants.%.926)] +// CHECK:STDOUT: %impl.elem0.loc8_28.2: @F.%.loc8_28.4 (%.926) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.loc8, element0 [symbolic = %impl.elem0.loc8_28.2 (constants.%impl.elem0.3c7)] +// CHECK:STDOUT: %specific_impl_fn.loc8_28.2: = specific_impl_function %impl.elem0.loc8_28.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc8_28.2) [symbolic = %specific_impl_fn.loc8_28.2 (constants.%specific_impl_fn.312)] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.loc8: = lookup_impl_witness %Array.loc8_27.2, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc8 (constants.%Destroy.lookup_impl_witness.3a9)] +// CHECK:STDOUT: %Destroy.facet.loc8_3.3: %Destroy.type = facet_value %Array.loc8_27.2, (%Destroy.lookup_impl_witness.loc8) [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.538)] +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.loc8: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.loc8_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type.loc8 (constants.%Destroy.WithSelf.SelfDestruct.type.628)] +// CHECK:STDOUT: %.loc8_3.4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.loc8, %Destroy.facet.loc8_3.3 [symbolic = %.loc8_3.4 (constants.%.3b4)] +// CHECK:STDOUT: %impl.elem2.loc8_3.2: @F.%.loc8_3.4 (%.3b4) = impl_witness_access %Destroy.lookup_impl_witness.loc8, element2 [symbolic = %impl.elem2.loc8_3.2 (constants.%impl.elem2.d82)] +// CHECK:STDOUT: %specific_impl_fn.loc8_3.2: = specific_impl_function %impl.elem2.loc8_3.2, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.loc8_3.3) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.fe6)] // CHECK:STDOUT: %Destroy.lookup_impl_witness.loc7: = lookup_impl_witness %struct_type.a.loc7_23.2, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc7 (constants.%Destroy.lookup_impl_witness.7f9)] // CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value %struct_type.a.loc7_23.2, (%Destroy.lookup_impl_witness.loc7) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.aa3)] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.loc7: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.loc7_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type.loc7 (constants.%Destroy.WithSelf.SelfDestruct.type.3c2)] @@ -720,35 +720,35 @@ fn G(generic N: i32) { // CHECK:STDOUT: %v.patt.loc7_15.1: @F.%pattern_type.loc7 (%pattern_type.915) = ref_binding_pattern v [symbolic = %v.patt.loc7_15.2 (constants.%v.patt)] // CHECK:STDOUT: %v.var_patt.loc7_3.1: @F.%pattern_type.loc7 (%pattern_type.915) = var_pattern %v.patt.loc7_15.1 [symbolic = %v.var_patt.loc7_3.2 (constants.%v.var_patt)] // CHECK:STDOUT: } -// CHECK:STDOUT: %w.var: ref @F.%array_type.loc8_27.2 (%array_type.50f) = var_storage %w.var_patt.loc8_3.1 -// CHECK:STDOUT: %DefaultOrUnformed.facet.loc8_28.1: %DefaultOrUnformed.type = facet_value constants.%array_type.50f, (constants.%DefaultOrUnformed.lookup_impl_witness.1fb) [symbolic = %DefaultOrUnformed.facet.loc8_28.2 (constants.%DefaultOrUnformed.facet.d60)] -// CHECK:STDOUT: %.loc8_28.1: %DefaultOrUnformed.type = converted constants.%array_type.50f, %DefaultOrUnformed.facet.loc8_28.1 [symbolic = %DefaultOrUnformed.facet.loc8_28.2 (constants.%DefaultOrUnformed.facet.d60)] -// CHECK:STDOUT: %as_type.loc8: type = facet_access_type %.loc8_28.1 [symbolic = %array_type.loc8_27.2 (constants.%array_type.50f)] -// CHECK:STDOUT: %.loc8_28.2: type = converted %.loc8_28.1, %as_type.loc8 [symbolic = %array_type.loc8_27.2 (constants.%array_type.50f)] -// CHECK:STDOUT: %impl.elem0.loc8_28.1: @F.%.loc8_28.4 (%.478) = impl_witness_access constants.%DefaultOrUnformed.lookup_impl_witness.1fb, element0 [symbolic = %impl.elem0.loc8_28.2 (constants.%impl.elem0.276)] -// CHECK:STDOUT: %specific_impl_fn.loc8_28.1: = specific_impl_function %impl.elem0.loc8_28.1, @DefaultOrUnformed.WithSelf.Op(constants.%DefaultOrUnformed.facet.d60) [symbolic = %specific_impl_fn.loc8_28.2 (constants.%specific_impl_fn.6bf)] -// CHECK:STDOUT: %.loc8_3.1: ref @F.%array_type.loc8_27.2 (%array_type.50f) = splice_block %w.var {} -// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call.loc8: init @F.%array_type.loc8_27.2 (%array_type.50f) to %.loc8_3.1 = call %specific_impl_fn.loc8_28.1() +// CHECK:STDOUT: %w.var: ref @F.%Array.loc8_27.2 (%Array.d87) = var_storage %w.var_patt.loc8_3.1 +// CHECK:STDOUT: %DefaultOrUnformed.facet.loc8_28.1: %DefaultOrUnformed.type = facet_value constants.%Array.d87, (constants.%DefaultOrUnformed.lookup_impl_witness.b34) [symbolic = %DefaultOrUnformed.facet.loc8_28.2 (constants.%DefaultOrUnformed.facet.55a)] +// CHECK:STDOUT: %.loc8_28.1: %DefaultOrUnformed.type = converted constants.%Array.d87, %DefaultOrUnformed.facet.loc8_28.1 [symbolic = %DefaultOrUnformed.facet.loc8_28.2 (constants.%DefaultOrUnformed.facet.55a)] +// CHECK:STDOUT: %as_type.loc8: type = facet_access_type %.loc8_28.1 [symbolic = %Array.loc8_27.2 (constants.%Array.d87)] +// CHECK:STDOUT: %.loc8_28.2: type = converted %.loc8_28.1, %as_type.loc8 [symbolic = %Array.loc8_27.2 (constants.%Array.d87)] +// CHECK:STDOUT: %impl.elem0.loc8_28.1: @F.%.loc8_28.4 (%.926) = impl_witness_access constants.%DefaultOrUnformed.lookup_impl_witness.b34, element0 [symbolic = %impl.elem0.loc8_28.2 (constants.%impl.elem0.3c7)] +// CHECK:STDOUT: %specific_impl_fn.loc8_28.1: = specific_impl_function %impl.elem0.loc8_28.1, @DefaultOrUnformed.WithSelf.Op(constants.%DefaultOrUnformed.facet.55a) [symbolic = %specific_impl_fn.loc8_28.2 (constants.%specific_impl_fn.312)] +// CHECK:STDOUT: %.loc8_3.1: ref @F.%Array.loc8_27.2 (%Array.d87) = splice_block %w.var {} +// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call.loc8: init @F.%Array.loc8_27.2 (%Array.d87) to %.loc8_3.1 = call %specific_impl_fn.loc8_28.1() // CHECK:STDOUT: assign %w.var, %DefaultOrUnformed.WithSelf.Op.call.loc8 -// CHECK:STDOUT: %.loc8_27: type = splice_block %array_type.loc8_27.1 [symbolic = %array_type.loc8_27.2 (constants.%array_type.50f)] { +// CHECK:STDOUT: %.loc8_27: type = splice_block %Array.loc8_27.1 [symbolic = %Array.loc8_27.2 (constants.%Array.d87)] { // CHECK:STDOUT: %T.ref.loc8: %Destroy.type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.0e7)] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5] // CHECK:STDOUT: %T.as_type.loc8: type = facet_access_type %T.ref.loc8 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] // CHECK:STDOUT: %.loc8_23: type = converted %T.ref.loc8, %T.as_type.loc8 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] -// CHECK:STDOUT: %array_type.loc8_27.1: type = array_type %int_5, %.loc8_23 [symbolic = %array_type.loc8_27.2 (constants.%array_type.50f)] +// CHECK:STDOUT: %Array.loc8_27.1: type = class_type @Array, @Array(constants.%T.as_type.700, constants.%int_5) [symbolic = %Array.loc8_27.2 (constants.%Array.d87)] // CHECK:STDOUT: } -// CHECK:STDOUT: %w: ref @F.%array_type.loc8_27.2 (%array_type.50f) = wrapper_binding w, %w.var +// CHECK:STDOUT: %w: ref @F.%Array.loc8_27.2 (%Array.d87) = wrapper_binding w, %w.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %w.patt.loc8_15.1: @F.%pattern_type.loc8 (%pattern_type.78a) = ref_binding_pattern w [symbolic = %w.patt.loc8_15.2 (constants.%w.patt)] -// CHECK:STDOUT: %w.var_patt.loc8_3.1: @F.%pattern_type.loc8 (%pattern_type.78a) = var_pattern %w.patt.loc8_15.1 [symbolic = %w.var_patt.loc8_3.2 (constants.%w.var_patt)] +// CHECK:STDOUT: %w.patt.loc8_15.1: @F.%pattern_type.loc8 (%pattern_type.1a6) = ref_binding_pattern w [symbolic = %w.patt.loc8_15.2 (constants.%w.patt)] +// CHECK:STDOUT: %w.var_patt.loc8_3.1: @F.%pattern_type.loc8 (%pattern_type.1a6) = var_pattern %w.patt.loc8_15.1 [symbolic = %w.var_patt.loc8_3.2 (constants.%w.var_patt)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem2.loc8_3.1: @F.%.loc8_3.4 (%.fc5) = impl_witness_access constants.%Destroy.lookup_impl_witness.1f5, element2 [symbolic = %impl.elem2.loc8_3.2 (constants.%impl.elem2.3eb)] +// CHECK:STDOUT: %impl.elem2.loc8_3.1: @F.%.loc8_3.4 (%.3b4) = impl_witness_access constants.%Destroy.lookup_impl_witness.3a9, element2 [symbolic = %impl.elem2.loc8_3.2 (constants.%impl.elem2.d82)] // CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %w.var, %impl.elem2.loc8_3.1 -// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%array_type.50f, (constants.%Destroy.lookup_impl_witness.1f5) [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.664)] -// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%array_type.50f, %Destroy.facet.loc8_3.1 [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.664)] -// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%array_type.50f, (constants.%Destroy.lookup_impl_witness.1f5) [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.664)] -// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%array_type.50f, %Destroy.facet.loc8_3.2 [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.664)] -// CHECK:STDOUT: %specific_impl_fn.loc8_3.1: = specific_impl_function %impl.elem2.loc8_3.1, @Destroy.WithSelf.SelfDestruct(constants.%Destroy.facet.664) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.c96)] +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Array.d87, (constants.%Destroy.lookup_impl_witness.3a9) [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.538)] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Array.d87, %Destroy.facet.loc8_3.1 [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.538)] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Array.d87, (constants.%Destroy.lookup_impl_witness.3a9) [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.538)] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Array.d87, %Destroy.facet.loc8_3.2 [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.538)] +// CHECK:STDOUT: %specific_impl_fn.loc8_3.1: = specific_impl_function %impl.elem2.loc8_3.1, @Destroy.WithSelf.SelfDestruct(constants.%Destroy.facet.538) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.fe6)] // CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %w.var, %specific_impl_fn.loc8_3.1 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %bound_method.loc8_3.2(%w.var) // CHECK:STDOUT: %impl.elem2.loc7_3.1: @F.%.loc7_3.3 (%.88b) = impl_witness_access constants.%Destroy.lookup_impl_witness.7f9, element2 [symbolic = %impl.elem2.loc7_3.2 (constants.%impl.elem2.7c6)] @@ -780,38 +780,38 @@ fn G(generic N: i32) { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %N.loc12_15.1, constants.%Int.as.ImplicitAs.impl.Convert.69e [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] // CHECK:STDOUT: %bound_method.loc14_28.3: = bound_method %N.loc12_15.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc14_28.3 (constants.%bound_method)] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc14_28.2: init Core.IntLiteral = call %bound_method.loc14_28.3(%N.loc12_15.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc14_28.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc14_29.2: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc14_28.2, constants.%i32 [symbolic = %array_type.loc14_29.2 (constants.%array_type.359)] -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc14_29.2 [symbolic = %require_complete (constants.%require_complete.f47)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc14_29.2 [symbolic = %pattern_type (constants.%pattern_type.486)] -// CHECK:STDOUT: %k.patt.loc14_15.2: @G.%pattern_type (%pattern_type.486) = ref_binding_pattern k [symbolic = %k.patt.loc14_15.2 (constants.%k.patt)] -// CHECK:STDOUT: %k.var_patt.loc14_3.2: @G.%pattern_type (%pattern_type.486) = var_pattern %k.patt.loc14_15.2 [symbolic = %k.var_patt.loc14_3.2 (constants.%k.var_patt)] -// CHECK:STDOUT: %.loc14_30.3: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%array_type.loc14_29.2) [symbolic = %.loc14_30.3 (constants.%.63b)] -// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness: = lookup_impl_witness %array_type.loc14_29.2, @DefaultOrUnformed [symbolic = %DefaultOrUnformed.lookup_impl_witness (constants.%DefaultOrUnformed.lookup_impl_witness.5c0)] -// CHECK:STDOUT: %DefaultOrUnformed.facet.loc14_30.2: %DefaultOrUnformed.type = facet_value %array_type.loc14_29.2, (%DefaultOrUnformed.lookup_impl_witness) [symbolic = %DefaultOrUnformed.facet.loc14_30.2 (constants.%DefaultOrUnformed.facet.b1c)] -// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.loc14_30.2) [symbolic = %DefaultOrUnformed.WithSelf.Op.type (constants.%DefaultOrUnformed.WithSelf.Op.type.d4c)] -// CHECK:STDOUT: %.loc14_30.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type, %DefaultOrUnformed.facet.loc14_30.2 [symbolic = %.loc14_30.4 (constants.%.608)] -// CHECK:STDOUT: %impl.elem0.loc14_30.2: @G.%.loc14_30.4 (%.608) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_30.2 (constants.%impl.elem0.37d)] -// CHECK:STDOUT: %specific_impl_fn.loc14_30.2: = specific_impl_function %impl.elem0.loc14_30.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc14_30.2) [symbolic = %specific_impl_fn.loc14_30.2 (constants.%specific_impl_fn.b63)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %array_type.loc14_29.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.822)] -// CHECK:STDOUT: %Destroy.facet.loc14_3.3: %Destroy.type = facet_value %array_type.loc14_29.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.a58)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.loc14_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.d3f)] -// CHECK:STDOUT: %.loc14_3.4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc14_3.3 [symbolic = %.loc14_3.4 (constants.%.f42)] -// CHECK:STDOUT: %impl.elem2.loc14_3.2: @G.%.loc14_3.4 (%.f42) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc14_3.2 (constants.%impl.elem2.f96)] -// CHECK:STDOUT: %specific_impl_fn.loc14_3.2: = specific_impl_function %impl.elem2.loc14_3.2, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.loc14_3.3) [symbolic = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.262)] +// CHECK:STDOUT: %Array.loc14_29.2: type = class_type @Array, @Array(constants.%i32, %Int.as.ImplicitAs.impl.Convert.call.loc14_28.2) [symbolic = %Array.loc14_29.2 (constants.%Array.867)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Array.loc14_29.2 [symbolic = %require_complete (constants.%require_complete.c2c)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Array.loc14_29.2 [symbolic = %pattern_type (constants.%pattern_type.161)] +// CHECK:STDOUT: %k.patt.loc14_15.2: @G.%pattern_type (%pattern_type.161) = ref_binding_pattern k [symbolic = %k.patt.loc14_15.2 (constants.%k.patt)] +// CHECK:STDOUT: %k.var_patt.loc14_3.2: @G.%pattern_type (%pattern_type.161) = var_pattern %k.patt.loc14_15.2 [symbolic = %k.var_patt.loc14_3.2 (constants.%k.var_patt)] +// CHECK:STDOUT: %.loc14_30.3: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%Array.loc14_29.2) [symbolic = %.loc14_30.3 (constants.%.018)] +// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness: = lookup_impl_witness %Array.loc14_29.2, @DefaultOrUnformed [symbolic = %DefaultOrUnformed.lookup_impl_witness (constants.%DefaultOrUnformed.lookup_impl_witness.a45)] +// CHECK:STDOUT: %DefaultOrUnformed.facet.loc14_30.2: %DefaultOrUnformed.type = facet_value %Array.loc14_29.2, (%DefaultOrUnformed.lookup_impl_witness) [symbolic = %DefaultOrUnformed.facet.loc14_30.2 (constants.%DefaultOrUnformed.facet.454)] +// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.loc14_30.2) [symbolic = %DefaultOrUnformed.WithSelf.Op.type (constants.%DefaultOrUnformed.WithSelf.Op.type.29f)] +// CHECK:STDOUT: %.loc14_30.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type, %DefaultOrUnformed.facet.loc14_30.2 [symbolic = %.loc14_30.4 (constants.%.d9d)] +// CHECK:STDOUT: %impl.elem0.loc14_30.2: @G.%.loc14_30.4 (%.d9d) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_30.2 (constants.%impl.elem0.e63)] +// CHECK:STDOUT: %specific_impl_fn.loc14_30.2: = specific_impl_function %impl.elem0.loc14_30.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc14_30.2) [symbolic = %specific_impl_fn.loc14_30.2 (constants.%specific_impl_fn.6ef)] +// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Array.loc14_29.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.aea)] +// CHECK:STDOUT: %Destroy.facet.loc14_3.3: %Destroy.type = facet_value %Array.loc14_29.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.1f8)] +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.loc14_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.fa9)] +// CHECK:STDOUT: %.loc14_3.4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc14_3.3 [symbolic = %.loc14_3.4 (constants.%.e22)] +// CHECK:STDOUT: %impl.elem2.loc14_3.2: @G.%.loc14_3.4 (%.e22) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc14_3.2 (constants.%impl.elem2.a71)] +// CHECK:STDOUT: %specific_impl_fn.loc14_3.2: = specific_impl_function %impl.elem2.loc14_3.2, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.loc14_3.3) [symbolic = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.047)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %k.var: ref @G.%array_type.loc14_29.2 (%array_type.359) = var_storage %k.var_patt.loc14_3.1 -// CHECK:STDOUT: %DefaultOrUnformed.facet.loc14_30.1: %DefaultOrUnformed.type = facet_value constants.%array_type.359, (constants.%DefaultOrUnformed.lookup_impl_witness.5c0) [symbolic = %DefaultOrUnformed.facet.loc14_30.2 (constants.%DefaultOrUnformed.facet.b1c)] -// CHECK:STDOUT: %.loc14_30.1: %DefaultOrUnformed.type = converted constants.%array_type.359, %DefaultOrUnformed.facet.loc14_30.1 [symbolic = %DefaultOrUnformed.facet.loc14_30.2 (constants.%DefaultOrUnformed.facet.b1c)] -// CHECK:STDOUT: %as_type: type = facet_access_type %.loc14_30.1 [symbolic = %array_type.loc14_29.2 (constants.%array_type.359)] -// CHECK:STDOUT: %.loc14_30.2: type = converted %.loc14_30.1, %as_type [symbolic = %array_type.loc14_29.2 (constants.%array_type.359)] -// CHECK:STDOUT: %impl.elem0.loc14_30.1: @G.%.loc14_30.4 (%.608) = impl_witness_access constants.%DefaultOrUnformed.lookup_impl_witness.5c0, element0 [symbolic = %impl.elem0.loc14_30.2 (constants.%impl.elem0.37d)] -// CHECK:STDOUT: %specific_impl_fn.loc14_30.1: = specific_impl_function %impl.elem0.loc14_30.1, @DefaultOrUnformed.WithSelf.Op(constants.%DefaultOrUnformed.facet.b1c) [symbolic = %specific_impl_fn.loc14_30.2 (constants.%specific_impl_fn.b63)] -// CHECK:STDOUT: %.loc14_3.1: ref @G.%array_type.loc14_29.2 (%array_type.359) = splice_block %k.var {} -// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call: init @G.%array_type.loc14_29.2 (%array_type.359) to %.loc14_3.1 = call %specific_impl_fn.loc14_30.1() +// CHECK:STDOUT: %k.var: ref @G.%Array.loc14_29.2 (%Array.867) = var_storage %k.var_patt.loc14_3.1 +// CHECK:STDOUT: %DefaultOrUnformed.facet.loc14_30.1: %DefaultOrUnformed.type = facet_value constants.%Array.867, (constants.%DefaultOrUnformed.lookup_impl_witness.a45) [symbolic = %DefaultOrUnformed.facet.loc14_30.2 (constants.%DefaultOrUnformed.facet.454)] +// CHECK:STDOUT: %.loc14_30.1: %DefaultOrUnformed.type = converted constants.%Array.867, %DefaultOrUnformed.facet.loc14_30.1 [symbolic = %DefaultOrUnformed.facet.loc14_30.2 (constants.%DefaultOrUnformed.facet.454)] +// CHECK:STDOUT: %as_type: type = facet_access_type %.loc14_30.1 [symbolic = %Array.loc14_29.2 (constants.%Array.867)] +// CHECK:STDOUT: %.loc14_30.2: type = converted %.loc14_30.1, %as_type [symbolic = %Array.loc14_29.2 (constants.%Array.867)] +// CHECK:STDOUT: %impl.elem0.loc14_30.1: @G.%.loc14_30.4 (%.d9d) = impl_witness_access constants.%DefaultOrUnformed.lookup_impl_witness.a45, element0 [symbolic = %impl.elem0.loc14_30.2 (constants.%impl.elem0.e63)] +// CHECK:STDOUT: %specific_impl_fn.loc14_30.1: = specific_impl_function %impl.elem0.loc14_30.1, @DefaultOrUnformed.WithSelf.Op(constants.%DefaultOrUnformed.facet.454) [symbolic = %specific_impl_fn.loc14_30.2 (constants.%specific_impl_fn.6ef)] +// CHECK:STDOUT: %.loc14_3.1: ref @G.%Array.loc14_29.2 (%Array.867) = splice_block %k.var {} +// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call: init @G.%Array.loc14_29.2 (%Array.867) to %.loc14_3.1 = call %specific_impl_fn.loc14_30.1() // CHECK:STDOUT: assign %k.var, %DefaultOrUnformed.WithSelf.Op.call -// CHECK:STDOUT: %.loc14_29: type = splice_block %array_type.loc14_29.1 [symbolic = %array_type.loc14_29.2 (constants.%array_type.359)] { +// CHECK:STDOUT: %.loc14_29: type = splice_block %Array.loc14_29.1 [symbolic = %Array.loc14_29.2 (constants.%Array.867)] { // CHECK:STDOUT: %i32.loc14: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc12_15.2 [symbolic = %N.loc12_15.1 (constants.%N.37f)] // CHECK:STDOUT: %impl.elem0.loc14_28: %.e3f = impl_witness_access constants.%ImplicitAs.impl_witness.590, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.69e] @@ -821,20 +821,20 @@ fn G(generic N: i32) { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc14_28.1: init Core.IntLiteral = call %bound_method.loc14_28.2(%N.ref) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc14_28.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: %.loc14_28.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc14_28.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc14_28.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: %.loc14_28.2: Core.IntLiteral = converted %N.ref, %.loc14_28.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc14_28.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc14_29.1: type = array_type %.loc14_28.2, %i32.loc14 [symbolic = %array_type.loc14_29.2 (constants.%array_type.359)] +// CHECK:STDOUT: %Array.loc14_29.1: type = class_type @Array, @Array(constants.%i32, constants.%Int.as.ImplicitAs.impl.Convert.call) [symbolic = %Array.loc14_29.2 (constants.%Array.867)] // CHECK:STDOUT: } -// CHECK:STDOUT: %k: ref @G.%array_type.loc14_29.2 (%array_type.359) = wrapper_binding k, %k.var +// CHECK:STDOUT: %k: ref @G.%Array.loc14_29.2 (%Array.867) = wrapper_binding k, %k.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %k.patt.loc14_15.1: @G.%pattern_type (%pattern_type.486) = ref_binding_pattern k [symbolic = %k.patt.loc14_15.2 (constants.%k.patt)] -// CHECK:STDOUT: %k.var_patt.loc14_3.1: @G.%pattern_type (%pattern_type.486) = var_pattern %k.patt.loc14_15.1 [symbolic = %k.var_patt.loc14_3.2 (constants.%k.var_patt)] +// CHECK:STDOUT: %k.patt.loc14_15.1: @G.%pattern_type (%pattern_type.161) = ref_binding_pattern k [symbolic = %k.patt.loc14_15.2 (constants.%k.patt)] +// CHECK:STDOUT: %k.var_patt.loc14_3.1: @G.%pattern_type (%pattern_type.161) = var_pattern %k.patt.loc14_15.1 [symbolic = %k.var_patt.loc14_3.2 (constants.%k.var_patt)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem2.loc14_3.1: @G.%.loc14_3.4 (%.f42) = impl_witness_access constants.%Destroy.lookup_impl_witness.822, element2 [symbolic = %impl.elem2.loc14_3.2 (constants.%impl.elem2.f96)] +// CHECK:STDOUT: %impl.elem2.loc14_3.1: @G.%.loc14_3.4 (%.e22) = impl_witness_access constants.%Destroy.lookup_impl_witness.aea, element2 [symbolic = %impl.elem2.loc14_3.2 (constants.%impl.elem2.a71)] // CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %k.var, %impl.elem2.loc14_3.1 -// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%array_type.359, (constants.%Destroy.lookup_impl_witness.822) [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.a58)] -// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%array_type.359, %Destroy.facet.loc14_3.1 [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.a58)] -// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%array_type.359, (constants.%Destroy.lookup_impl_witness.822) [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.a58)] -// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%array_type.359, %Destroy.facet.loc14_3.2 [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.a58)] -// CHECK:STDOUT: %specific_impl_fn.loc14_3.1: = specific_impl_function %impl.elem2.loc14_3.1, @Destroy.WithSelf.SelfDestruct(constants.%Destroy.facet.a58) [symbolic = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.262)] +// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%Array.867, (constants.%Destroy.lookup_impl_witness.aea) [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.1f8)] +// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%Array.867, %Destroy.facet.loc14_3.1 [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.1f8)] +// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%Array.867, (constants.%Destroy.lookup_impl_witness.aea) [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.1f8)] +// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%Array.867, %Destroy.facet.loc14_3.2 [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.1f8)] +// CHECK:STDOUT: %specific_impl_fn.loc14_3.1: = specific_impl_function %impl.elem2.loc14_3.1, @Destroy.WithSelf.SelfDestruct(constants.%Destroy.facet.1f8) [symbolic = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.047)] // CHECK:STDOUT: %bound_method.loc14_3.2: = bound_method %k.var, %specific_impl_fn.loc14_3.1 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc14_3.2(%k.var) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/eval/binding.carbon b/toolchain/check/testdata/eval/binding.carbon index fea7ab8ff21b..900d29a9344e 100644 --- a/toolchain/check/testdata/eval/binding.carbon +++ b/toolchain/check/testdata/eval/binding.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -102,9 +102,9 @@ let n: array(i32, G()) = (1, 2, 3); // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %int_3.410, %Int.as.ImplicitAs.impl.Convert.69e [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.69e, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.545: = bound_method %int_3.410, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.771: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %n.patt: %pattern_type.771 = value_binding_pattern n [concrete] +// CHECK:STDOUT: %Array.b3a: type = class_type @Array, @Array(%i32, %int_3.1ba) [concrete] +// CHECK:STDOUT: %pattern_type.7a1: type = pattern_type %Array.b3a [concrete] +// CHECK:STDOUT: %n.patt: %pattern_type.7a1 = value_binding_pattern n [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %tuple.type.37f: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] @@ -116,8 +116,8 @@ let n: array(i32, G()) = (1, 2, 3); // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.9f3: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] // CHECK:STDOUT: %bound_method.3cb: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.295: %i32 = int_value 2 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.0c6, %int_2.295, %int_3.410) [concrete] -// CHECK:STDOUT: %.981: ref %array_type = temporary invalid, %array [concrete] +// CHECK:STDOUT: %array: %Array.b3a = tuple_value (%int_1.0c6, %int_2.295, %int_3.410) [concrete] +// CHECK:STDOUT: %.293: ref %Array.b3a = temporary invalid, %array [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -134,7 +134,7 @@ let n: array(i32, G()) = (1, 2, 3); // CHECK:STDOUT: %bound_method.loc11_35.2: = bound_method @__global_init.%int_1, %specific_fn.loc11_35.1 [concrete = constants.%bound_method.953] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_35.1: init %i32 = call %bound_method.loc11_35.2(@__global_init.%int_1) [concrete = constants.%int_1.0c6] // CHECK:STDOUT: %.loc11_35.1: init %i32 = converted @__global_init.%int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_35.1 [concrete = constants.%int_1.0c6] -// CHECK:STDOUT: %.loc11_35.2: ref %array_type = temporary_storage +// CHECK:STDOUT: %.loc11_35.2: ref %Array.b3a = temporary_storage // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11_35.3: ref %i32 = array_index %.loc11_35.2, %int_0 // CHECK:STDOUT: %.loc11_35.4: init %i32 to %.loc11_35.3 = in_place_init %.loc11_35.1 [concrete = constants.%int_1.0c6] @@ -156,11 +156,11 @@ let n: array(i32, G()) = (1, 2, 3); // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc11_35.9: ref %i32 = array_index %.loc11_35.2, %int_2 // CHECK:STDOUT: %.loc11_35.10: init %i32 to %.loc11_35.9 = in_place_init %.loc11_35.8 [concrete = constants.%int_3.410] -// CHECK:STDOUT: %.loc11_35.11: init %array_type to %.loc11_35.2 = array_init (%.loc11_35.4, %.loc11_35.7, %.loc11_35.10) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_35.12: init %array_type = converted @__global_init.%.loc11, %.loc11_35.11 [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_35.13: ref %array_type = temporary %.loc11_35.2, %.loc11_35.12 [concrete = constants.%.981] -// CHECK:STDOUT: %.loc11_35.14: %array_type = acquire_value %.loc11_35.13 [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_23: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc11_35.11: init %Array.b3a to %.loc11_35.2 = array_init (%.loc11_35.4, %.loc11_35.7, %.loc11_35.10) [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_35.12: init %Array.b3a = converted @__global_init.%.loc11, %.loc11_35.11 [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_35.13: ref %Array.b3a = temporary %.loc11_35.2, %.loc11_35.12 [concrete = constants.%.293] +// CHECK:STDOUT: %.loc11_35.14: %Array.b3a = acquire_value %.loc11_35.13 [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_23: type = splice_block %Array [concrete = constants.%Array.b3a] { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, %F.decl [concrete = constants.%F] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] @@ -181,11 +181,11 @@ let n: array(i32, G()) = (1, 2, 3); // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_22.2(%.loc11_22.2) [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc11_22.3: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc11_22.4: Core.IntLiteral = converted %F.call, %.loc11_22.3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type: type = array_type %.loc11_22.4, %i32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_3.1ba) [concrete = constants.%Array.b3a] // CHECK:STDOUT: } -// CHECK:STDOUT: %n: %array_type = wrapper_binding n, %.loc11_35.14 +// CHECK:STDOUT: %n: %Array.b3a = wrapper_binding n, %.loc11_35.14 // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %n.patt: %pattern_type.771 = value_binding_pattern n [concrete = constants.%n.patt] +// CHECK:STDOUT: %n.patt: %pattern_type.7a1 = value_binding_pattern n [concrete = constants.%n.patt] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/eval/call.carbon b/toolchain/check/testdata/eval/call.carbon index 503e0b60e368..a1d68275b264 100644 --- a/toolchain/check/testdata/eval/call.carbon +++ b/toolchain/check/testdata/eval/call.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -65,17 +65,13 @@ eval fn F(x: i32) -> i32 { return x; } var a: array(i32, F(3)) = (1, 2, 3); -// --- fail_todo_dependent_call.carbon +// --- dependent_call.carbon library "[[@TEST_NAME]]"; eval fn F(x: i32) -> i32 { return x; } fn G(generic N: i32) { - // CHECK:STDERR: fail_todo_dependent_call.carbon:[[@LINE+4]]:36: error: cannot initialize array with dependent bound from a list of initializers [ArrayInitDependentBound] - // CHECK:STDERR: var unused a: array(i32, F(N)) = (0, 1, 2); - // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: var unused a: array(i32, F(N)) = (0, 1, 2); } diff --git a/toolchain/check/testdata/function/builtin/call.carbon b/toolchain/check/testdata/function/builtin/call.carbon index 868a7cd7c294..42d0ed9b1e11 100644 --- a/toolchain/check/testdata/function/builtin/call.carbon +++ b/toolchain/check/testdata/function/builtin/call.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -74,19 +74,21 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.69e, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.545: = bound_method %int_3.410, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.771: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %arr.patt: %pattern_type.771 = ref_binding_pattern arr [concrete] -// CHECK:STDOUT: %arr.var_patt: %pattern_type.771 = var_pattern %arr.patt [concrete] -// CHECK:STDOUT: %DefaultOrUnformed.type: type = facet_type <@DefaultOrUnformed> [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Array.b3a: type = class_type @Array, @Array(%i32, %int_3.1ba) [concrete] +// CHECK:STDOUT: %pattern_type.7a1: type = pattern_type %Array.b3a [concrete] +// CHECK:STDOUT: %arr.patt: %pattern_type.7a1 = ref_binding_pattern arr [concrete] +// CHECK:STDOUT: %arr.var_patt: %pattern_type.7a1 = var_pattern %arr.patt [concrete] +// CHECK:STDOUT: %DefaultOrUnformed.type: type = facet_type <@DefaultOrUnformed> [concrete] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.type.150: type = fn_type @T.as.DefaultOrUnformed.impl.Op, @T.as.DefaultOrUnformed.impl(%T.67d) [symbolic] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.53a: %T.as.DefaultOrUnformed.impl.Op.type.150 = struct_value () [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.impl_witness.8fb: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.856, @T.as.DefaultOrUnformed.impl(%array_type) [concrete] -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.type.f29: type = fn_type @T.as.DefaultOrUnformed.impl.Op, @T.as.DefaultOrUnformed.impl(%array_type) [concrete] -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.2c9: %T.as.DefaultOrUnformed.impl.Op.type.f29 = struct_value () [concrete] -// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %array_type, (%DefaultOrUnformed.impl_witness.8fb) [concrete] -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function %T.as.DefaultOrUnformed.impl.Op.2c9, @T.as.DefaultOrUnformed.impl.Op(%array_type) [concrete] +// CHECK:STDOUT: %DefaultOrUnformed.impl_witness.c11: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.856, @T.as.DefaultOrUnformed.impl(%Array.b3a) [concrete] +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.type.042: type = fn_type @T.as.DefaultOrUnformed.impl.Op, @T.as.DefaultOrUnformed.impl(%Array.b3a) [concrete] +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.fd3: %T.as.DefaultOrUnformed.impl.Op.type.042 = struct_value () [concrete] +// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %Array.b3a, (%DefaultOrUnformed.impl_witness.c11) [concrete] +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function %T.as.DefaultOrUnformed.impl.Op.fd3, @T.as.DefaultOrUnformed.impl.Op(%Array.b3a) [concrete] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [concrete] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -95,6 +97,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -105,6 +108,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1aa = impl_witness_table (%Core.import_ref.edf), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.32e: @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert.type (%Int.as.ImplicitAs.impl.Convert.type.48d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert (constants.%Int.as.ImplicitAs.impl.Convert.0f9)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.204 = impl_witness_table (%Core.import_ref.32e), @Int.as.ImplicitAs.impl [concrete] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.DefaultOrUnformed: type = import_ref Core//prelude/parts/default, DefaultOrUnformed, loaded [concrete = constants.%DefaultOrUnformed.type] // CHECK:STDOUT: %Core.import_ref.cc8: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.150) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.53a)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.cc8), @T.as.DefaultOrUnformed.impl [concrete] @@ -137,8 +141,8 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %arr.var: ref %array_type = var_storage %arr.var_patt [concrete] -// CHECK:STDOUT: %.loc17_30: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %arr.var: ref %Array.b3a = var_storage %arr.var_patt [concrete] +// CHECK:STDOUT: %.loc17_30: type = splice_block %Array [concrete = constants.%Array.b3a] { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [concrete = constants.%Add] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -167,12 +171,12 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc17_29.2(%.loc17_29.2) [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc17_29.3: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc17_29.4: Core.IntLiteral = converted %Add.call, %.loc17_29.3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type: type = array_type %.loc17_29.4, %i32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_3.1ba) [concrete = constants.%Array.b3a] // CHECK:STDOUT: } -// CHECK:STDOUT: %arr: ref %array_type = wrapper_binding arr, %arr.var [concrete = %arr.var] +// CHECK:STDOUT: %arr: ref %Array.b3a = wrapper_binding arr, %arr.var [concrete = %arr.var] // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %arr.patt: %pattern_type.771 = ref_binding_pattern arr [concrete = constants.%arr.patt] -// CHECK:STDOUT: %arr.var_patt: %pattern_type.771 = var_pattern %arr.patt [concrete = constants.%arr.var_patt] +// CHECK:STDOUT: %arr.patt: %pattern_type.7a1 = ref_binding_pattern arr [concrete = constants.%arr.patt] +// CHECK:STDOUT: %arr.var_patt: %pattern_type.7a1 = var_pattern %arr.patt [concrete = constants.%arr.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [concrete = constants.%RuntimeCall] { // CHECK:STDOUT: %a.param_patt: %pattern_type.6b6 = value_param_pattern [concrete = constants.%a.param_patt] @@ -208,13 +212,13 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value constants.%array_type, (constants.%DefaultOrUnformed.impl_witness.8fb) [concrete = constants.%DefaultOrUnformed.facet] -// CHECK:STDOUT: %.loc17_31.1: %DefaultOrUnformed.type = converted constants.%array_type, %DefaultOrUnformed.facet [concrete = constants.%DefaultOrUnformed.facet] -// CHECK:STDOUT: %as_type: type = facet_access_type %.loc17_31.1 [concrete = constants.%array_type] -// CHECK:STDOUT: %.loc17_31.2: type = converted %.loc17_31.1, %as_type [concrete = constants.%array_type] -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.2c9, @T.as.DefaultOrUnformed.impl.Op(constants.%array_type) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn] -// CHECK:STDOUT: %.loc17_1: ref %array_type = splice_block file.%arr.var [concrete = file.%arr.var] {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %array_type to %.loc17_1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value constants.%Array.b3a, (constants.%DefaultOrUnformed.impl_witness.c11) [concrete = constants.%DefaultOrUnformed.facet] +// CHECK:STDOUT: %.loc17_31.1: %DefaultOrUnformed.type = converted constants.%Array.b3a, %DefaultOrUnformed.facet [concrete = constants.%DefaultOrUnformed.facet] +// CHECK:STDOUT: %as_type: type = facet_access_type %.loc17_31.1 [concrete = constants.%Array.b3a] +// CHECK:STDOUT: %.loc17_31.2: type = converted %.loc17_31.1, %as_type [concrete = constants.%Array.b3a] +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.fd3, @T.as.DefaultOrUnformed.impl.Op(constants.%Array.b3a) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn] +// CHECK:STDOUT: %.loc17_1: ref %Array.b3a = splice_block file.%arr.var [concrete = file.%arr.var] {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Array.b3a to %.loc17_1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign file.%arr.var, %T.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/builtin/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/call_from_operator.carbon index 4d92f62ce572..76ac03d0f67b 100644 --- a/toolchain/check/testdata/function/builtin/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/call_from_operator.carbon @@ -19,6 +19,7 @@ package Core; fn MakeIntLiteral() -> type = "int_literal.make_type"; alias IntLiteral = MakeIntLiteral(); fn Int(N: IntLiteral) -> type = "int.make_type_signed"; +fn Array(T: type, N: IntLiteral) -> type = "array.make_type"; interface AddWith(T: type) { fn Op(self, other: Self) -> Self; @@ -70,8 +71,12 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %N.patt: %pattern_type.dc0 = wrapper_binding_pattern N, %N.param_patt [concrete] // CHECK:STDOUT: %Int.type: type = fn_type @Int [concrete] // CHECK:STDOUT: %Int: %Int.type = struct_value () [concrete] +// CHECK:STDOUT: %T.param_patt: %pattern_type.9a5 = value_param_pattern [concrete] +// CHECK:STDOUT: %T.patt.a5b: %pattern_type.9a5 = wrapper_binding_pattern T, %T.param_patt [concrete] +// CHECK:STDOUT: %Array.type: type = fn_type @Array [concrete] +// CHECK:STDOUT: %Array: %Array.type = struct_value () [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %AddWith.type.2ef: type = generic_interface_type @AddWith [concrete] // CHECK:STDOUT: %AddWith.generic: %AddWith.type.2ef = struct_value () [concrete] @@ -192,6 +197,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: .MakeIntLiteral = %MakeIntLiteral.decl // CHECK:STDOUT: .IntLiteral = %IntLiteral // CHECK:STDOUT: .Int = %Int.decl +// CHECK:STDOUT: .Array = %Array.decl // CHECK:STDOUT: .AddWith = %AddWith.decl // CHECK:STDOUT: .As = %As.decl // CHECK:STDOUT: .ImplicitAs = %ImplicitAs.decl @@ -224,203 +230,222 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.param: ref type = out_param call_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %AddWith.decl: %AddWith.type.2ef = interface_decl @AddWith [concrete = constants.%AddWith.generic] { -// CHECK:STDOUT: %T.patt.loc8_20.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_20.2 (constants.%T.patt)] +// CHECK:STDOUT: %Array.decl: %Array.type = fn_decl @Array [concrete = constants.%Array] { +// CHECK:STDOUT: %T.param_patt: %pattern_type.9a5 = value_param_pattern [concrete = constants.%T.param_patt] +// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = wrapper_binding_pattern T, %T.param_patt [concrete = constants.%T.patt.a5b] +// CHECK:STDOUT: %N.param_patt: %pattern_type.dc0 = value_param_pattern [concrete = constants.%N.param_patt] +// CHECK:STDOUT: %N.patt: %pattern_type.dc0 = wrapper_binding_pattern N, %N.param_patt [concrete = constants.%N.patt] +// CHECK:STDOUT: %return.param_patt: %pattern_type.9a5 = out_param_pattern [concrete = constants.%return.param_patt.90b] +// CHECK:STDOUT: %return.patt: %pattern_type.9a5 = return_slot_pattern %return.param_patt, %.loc7_37.1 [concrete = constants.%return.patt.718] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_22.1: type = splice_block %.loc8_22.2 [concrete = type] { +// CHECK:STDOUT: %.loc7_37.1: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_37.2: Core.Form = init_form %.loc7_37.1 [concrete = constants.%.576] +// CHECK:STDOUT: %T.param: type = value_param call_param0 +// CHECK:STDOUT: %.loc7_13: type = type_literal type [concrete = type] +// CHECK:STDOUT: %T: type = wrapper_binding T, %T.param +// CHECK:STDOUT: %N.param: Core.IntLiteral = value_param call_param1 +// CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, file.%IntLiteral [concrete = Core.IntLiteral] +// CHECK:STDOUT: %N: Core.IntLiteral = wrapper_binding N, %N.param +// CHECK:STDOUT: %return.param: ref type = out_param call_param2 +// CHECK:STDOUT: %return: ref type = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %AddWith.decl: %AddWith.type.2ef = interface_decl @AddWith [concrete = constants.%AddWith.generic] { +// CHECK:STDOUT: %T.patt.loc9_20.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_20.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: } { +// CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_22.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_22.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_20.1 (constants.%T)] +// CHECK:STDOUT: %T.loc9_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_20.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %As.decl: %As.type.116 = interface_decl @As [concrete = constants.%As.generic] { -// CHECK:STDOUT: %T.patt.loc12_15.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc13_15.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt.3a0)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_17.1: type = splice_block %.loc12_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc13_17.1: type = splice_block %.loc13_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc12_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc13_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc12_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T)] +// CHECK:STDOUT: %T.loc13_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.0ff = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] { -// CHECK:STDOUT: %T.patt.loc16_23.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_23.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc17_23.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_23.2 (constants.%T.patt.3a0)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_25.1: type = splice_block %.loc16_25.2 [concrete = type] { +// CHECK:STDOUT: %.loc17_25.1: type = splice_block %.loc17_25.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc16_25.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc17_25.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc16_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc16_23.1 (constants.%T)] +// CHECK:STDOUT: %T.loc17_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc17_23.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @i32.builtin.as.AddWith.impl [concrete] {} { -// CHECK:STDOUT: %.loc20_6: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc21_6: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] // CHECK:STDOUT: %AddWith.ref: %AddWith.type.2ef = name_ref AddWith, file.%AddWith.decl [concrete = constants.%AddWith.generic] -// CHECK:STDOUT: %.loc20_21: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc21_21: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(constants.%i32.builtin)> [concrete = constants.%AddWith.type.7c6] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc20: = impl_self_witness @i32.builtin.as.AddWith.impl.%.loc20_6, @AddWith, @AddWith(constants.%i32.builtin) [concrete = constants.%.417] +// CHECK:STDOUT: %.loc21: = impl_self_witness @i32.builtin.as.AddWith.impl.%.loc21_6, @AddWith, @AddWith(constants.%i32.builtin) [concrete = constants.%.417] // CHECK:STDOUT: impl_decl @Core.IntLiteral.as.As.impl [concrete] {} { // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, file.%IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: %As.ref: %As.type.116 = name_ref As, file.%As.decl [concrete = constants.%As.generic] -// CHECK:STDOUT: %.loc24: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc25: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32.builtin)> [concrete = constants.%As.type.dfb] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc24: = impl_self_witness @Core.IntLiteral.as.As.impl.%IntLiteral.ref, @As, @As(constants.%i32.builtin) [concrete = constants.%.559] +// CHECK:STDOUT: %.loc25: = impl_self_witness @Core.IntLiteral.as.As.impl.%IntLiteral.ref, @As, @As(constants.%i32.builtin) [concrete = constants.%.559] // CHECK:STDOUT: impl_decl @Core.IntLiteral.as.ImplicitAs.impl [concrete] {} { // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, file.%IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.0ff = name_ref ImplicitAs, file.%ImplicitAs.decl [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %.loc28: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc29: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32.builtin)> [concrete = constants.%ImplicitAs.type.9df] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc28: = impl_self_witness @Core.IntLiteral.as.ImplicitAs.impl.%IntLiteral.ref, @ImplicitAs, @ImplicitAs(constants.%i32.builtin) [concrete = constants.%.e10] +// CHECK:STDOUT: %.loc29: = impl_self_witness @Core.IntLiteral.as.ImplicitAs.impl.%IntLiteral.ref, @ImplicitAs, @ImplicitAs(constants.%i32.builtin) [concrete = constants.%.e10] // CHECK:STDOUT: impl_decl @i32.builtin.as.ImplicitAs.impl [concrete] {} { -// CHECK:STDOUT: %.loc32: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc33: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.0ff = name_ref ImplicitAs, file.%ImplicitAs.decl [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, file.%IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete = constants.%ImplicitAs.type.7cb] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc32: = impl_self_witness @i32.builtin.as.ImplicitAs.impl.%.loc32, @ImplicitAs, @ImplicitAs(Core.IntLiteral) [concrete = constants.%.328] +// CHECK:STDOUT: %.loc33: = impl_self_witness @i32.builtin.as.ImplicitAs.impl.%.loc33, @ImplicitAs, @ImplicitAs(Core.IntLiteral) [concrete = constants.%.328] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @AddWith(%T.loc8_20.2: type) { -// CHECK:STDOUT: %T.patt.loc8_20.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_20.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc8_20.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_20.1 (constants.%T)] +// CHECK:STDOUT: generic interface @AddWith(%T.loc9_20.2: type) { +// CHECK:STDOUT: %T.patt.loc9_20.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_20.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.loc9_20.1: type = symbolic_binding T, 0 [symbolic = %T.loc9_20.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T.loc8_20.1)> [symbolic = %AddWith.type (constants.%AddWith.type.7e9)] -// CHECK:STDOUT: %Self.loc8_28.2: @AddWith.%AddWith.type (%AddWith.type.7e9) = symbolic_binding Self, 1 [symbolic = %Self.loc8_28.2 (constants.%Self.8d5)] +// CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T.loc9_20.1)> [symbolic = %AddWith.type (constants.%AddWith.type.7e9)] +// CHECK:STDOUT: %Self.loc9_28.2: @AddWith.%AddWith.type (%AddWith.type.7e9) = symbolic_binding Self, 1 [symbolic = %Self.loc9_28.2 (constants.%Self.8d5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc8_28.1: @AddWith.%AddWith.type (%AddWith.type.7e9) = symbolic_binding Self, 1 [symbolic = %Self.loc8_28.2 (constants.%Self.8d5)] +// CHECK:STDOUT: %Self.loc9_28.1: @AddWith.%AddWith.type (%AddWith.type.7e9) = symbolic_binding Self, 1 [symbolic = %Self.loc9_28.2 (constants.%Self.8d5)] // CHECK:STDOUT: %AddWith.WithSelf.decl = interface_with_self_decl @AddWith [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %AddWith.WithSelf.Op.decl: @AddWith.WithSelf.%AddWith.WithSelf.Op.type (%AddWith.WithSelf.Op.type.e49) = fn_decl @AddWith.WithSelf.Op [symbolic = @AddWith.WithSelf.%AddWith.WithSelf.Op (constants.%AddWith.WithSelf.Op.adc)] { -// CHECK:STDOUT: %self.param_patt.loc9_9.1: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = value_param_pattern [symbolic = %self.param_patt.loc9_9.2 (constants.%self.param_patt.72e)] -// CHECK:STDOUT: %self.patt.loc9_9.1: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = wrapper_binding_pattern self, %self.param_patt.loc9_9.1 [symbolic = %self.patt.loc9_9.2 (constants.%self.patt.f75)] -// CHECK:STDOUT: %other.param_patt.loc9_20.1: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = value_param_pattern [symbolic = %other.param_patt.loc9_20.2 (constants.%other.param_patt.89e)] -// CHECK:STDOUT: %other.patt.loc9_20.1: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = wrapper_binding_pattern other, %other.param_patt.loc9_20.1 [symbolic = %other.patt.loc9_20.2 (constants.%other.patt.49b)] -// CHECK:STDOUT: %return.param_patt.loc9_31.1: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = out_param_pattern [symbolic = %return.param_patt.loc9_31.2 (constants.%return.param_patt.8c6)] -// CHECK:STDOUT: %return.patt.loc9_28.1: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = return_slot_pattern %return.param_patt.loc9_31.1, %.loc9_31.3 [symbolic = %return.patt.loc9_28.2 (constants.%return.patt.169)] +// CHECK:STDOUT: %self.param_patt.loc10_9.1: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = value_param_pattern [symbolic = %self.param_patt.loc10_9.2 (constants.%self.param_patt.72e)] +// CHECK:STDOUT: %self.patt.loc10_9.1: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = wrapper_binding_pattern self, %self.param_patt.loc10_9.1 [symbolic = %self.patt.loc10_9.2 (constants.%self.patt.f75)] +// CHECK:STDOUT: %other.param_patt.loc10_20.1: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = value_param_pattern [symbolic = %other.param_patt.loc10_20.2 (constants.%other.param_patt.89e)] +// CHECK:STDOUT: %other.patt.loc10_20.1: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = wrapper_binding_pattern other, %other.param_patt.loc10_20.1 [symbolic = %other.patt.loc10_20.2 (constants.%other.patt.49b)] +// CHECK:STDOUT: %return.param_patt.loc10_31.1: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = out_param_pattern [symbolic = %return.param_patt.loc10_31.2 (constants.%return.param_patt.8c6)] +// CHECK:STDOUT: %return.patt.loc10_28.1: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = return_slot_pattern %return.param_patt.loc10_31.1, %.loc10_31.3 [symbolic = %return.patt.loc10_28.2 (constants.%return.patt.169)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_31.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = specific_constant @AddWith.%Self.loc8_28.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.8d5)] -// CHECK:STDOUT: %Self.ref.loc9_31: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = name_ref Self, %.loc9_31.2 [symbolic = %Self (constants.%Self.8d5)] -// CHECK:STDOUT: %Self.as_type.loc9_31: type = facet_access_type %Self.ref.loc9_31 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] -// CHECK:STDOUT: %.loc9_31.3: type = converted %Self.ref.loc9_31, %Self.as_type.loc9_31 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] -// CHECK:STDOUT: %.loc9_31.4: Core.Form = init_form %.loc9_31.3 [symbolic = %.loc9_31.1 (constants.%.e80)] -// CHECK:STDOUT: %self.param: @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c) = value_param call_param0 -// CHECK:STDOUT: %.loc9_9.1: type = splice_block %.loc9_9.3 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] { -// CHECK:STDOUT: %.loc9_9.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = specific_constant @AddWith.%Self.loc8_28.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.8d5)] -// CHECK:STDOUT: %Self.ref.loc9_9: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = name_ref Self, %.loc9_9.2 [symbolic = %Self (constants.%Self.8d5)] -// CHECK:STDOUT: %Self.as_type.loc9_9.2: type = facet_access_type %Self.ref.loc9_9 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] -// CHECK:STDOUT: %.loc9_9.3: type = converted %Self.ref.loc9_9, %Self.as_type.loc9_9.2 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] +// CHECK:STDOUT: %.loc10_31.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = specific_constant @AddWith.%Self.loc9_28.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.8d5)] +// CHECK:STDOUT: %Self.ref.loc10_31: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = name_ref Self, %.loc10_31.2 [symbolic = %Self (constants.%Self.8d5)] +// CHECK:STDOUT: %Self.as_type.loc10_31: type = facet_access_type %Self.ref.loc10_31 [symbolic = %Self.as_type.loc10_9.1 (constants.%Self.as_type.48c)] +// CHECK:STDOUT: %.loc10_31.3: type = converted %Self.ref.loc10_31, %Self.as_type.loc10_31 [symbolic = %Self.as_type.loc10_9.1 (constants.%Self.as_type.48c)] +// CHECK:STDOUT: %.loc10_31.4: Core.Form = init_form %.loc10_31.3 [symbolic = %.loc10_31.1 (constants.%.e80)] +// CHECK:STDOUT: %self.param: @AddWith.WithSelf.Op.%Self.as_type.loc10_9.1 (%Self.as_type.48c) = value_param call_param0 +// CHECK:STDOUT: %.loc10_9.1: type = splice_block %.loc10_9.3 [symbolic = %Self.as_type.loc10_9.1 (constants.%Self.as_type.48c)] { +// CHECK:STDOUT: %.loc10_9.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = specific_constant @AddWith.%Self.loc9_28.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.8d5)] +// CHECK:STDOUT: %Self.ref.loc10_9: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = name_ref Self, %.loc10_9.2 [symbolic = %Self (constants.%Self.8d5)] +// CHECK:STDOUT: %Self.as_type.loc10_9.2: type = facet_access_type %Self.ref.loc10_9 [symbolic = %Self.as_type.loc10_9.1 (constants.%Self.as_type.48c)] +// CHECK:STDOUT: %.loc10_9.3: type = converted %Self.ref.loc10_9, %Self.as_type.loc10_9.2 [symbolic = %Self.as_type.loc10_9.1 (constants.%Self.as_type.48c)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c) = wrapper_binding self, %self.param -// CHECK:STDOUT: %other.param: @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c) = value_param call_param1 -// CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.3 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] { -// CHECK:STDOUT: %.loc9_22.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = specific_constant @AddWith.%Self.loc8_28.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.8d5)] -// CHECK:STDOUT: %Self.ref.loc9_22: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = name_ref Self, %.loc9_22.2 [symbolic = %Self (constants.%Self.8d5)] -// CHECK:STDOUT: %Self.as_type.loc9_22: type = facet_access_type %Self.ref.loc9_22 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] -// CHECK:STDOUT: %.loc9_22.3: type = converted %Self.ref.loc9_22, %Self.as_type.loc9_22 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] +// CHECK:STDOUT: %self: @AddWith.WithSelf.Op.%Self.as_type.loc10_9.1 (%Self.as_type.48c) = wrapper_binding self, %self.param +// CHECK:STDOUT: %other.param: @AddWith.WithSelf.Op.%Self.as_type.loc10_9.1 (%Self.as_type.48c) = value_param call_param1 +// CHECK:STDOUT: %.loc10_22.1: type = splice_block %.loc10_22.3 [symbolic = %Self.as_type.loc10_9.1 (constants.%Self.as_type.48c)] { +// CHECK:STDOUT: %.loc10_22.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = specific_constant @AddWith.%Self.loc9_28.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.8d5)] +// CHECK:STDOUT: %Self.ref.loc10_22: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = name_ref Self, %.loc10_22.2 [symbolic = %Self (constants.%Self.8d5)] +// CHECK:STDOUT: %Self.as_type.loc10_22: type = facet_access_type %Self.ref.loc10_22 [symbolic = %Self.as_type.loc10_9.1 (constants.%Self.as_type.48c)] +// CHECK:STDOUT: %.loc10_22.3: type = converted %Self.ref.loc10_22, %Self.as_type.loc10_22 [symbolic = %Self.as_type.loc10_9.1 (constants.%Self.as_type.48c)] // CHECK:STDOUT: } -// CHECK:STDOUT: %other: @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c) = wrapper_binding other, %other.param -// CHECK:STDOUT: %return.param: ref @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c) = out_param call_param2 -// CHECK:STDOUT: %return: ref @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c) = return_slot %return.param +// CHECK:STDOUT: %other: @AddWith.WithSelf.Op.%Self.as_type.loc10_9.1 (%Self.as_type.48c) = wrapper_binding other, %other.param +// CHECK:STDOUT: %return.param: ref @AddWith.WithSelf.Op.%Self.as_type.loc10_9.1 (%Self.as_type.48c) = out_param call_param2 +// CHECK:STDOUT: %return: ref @AddWith.WithSelf.Op.%Self.as_type.loc10_9.1 (%Self.as_type.48c) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc9_35.1: @AddWith.WithSelf.%AddWith.assoc_type (%AddWith.assoc_type.588) = assoc_entity element0, %AddWith.WithSelf.Op.decl [symbolic = %assoc0.loc9_35.2 (constants.%assoc0.aed)] +// CHECK:STDOUT: %assoc0.loc10_35.1: @AddWith.WithSelf.%AddWith.assoc_type (%AddWith.assoc_type.588) = assoc_entity element0, %AddWith.WithSelf.Op.decl [symbolic = %assoc0.loc10_35.2 (constants.%assoc0.aed)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc8_28.1 -// CHECK:STDOUT: .Op = @AddWith.WithSelf.%assoc0.loc9_35.1 +// CHECK:STDOUT: .Self = %Self.loc9_28.1 +// CHECK:STDOUT: .Op = @AddWith.WithSelf.%assoc0.loc10_35.1 // CHECK:STDOUT: witness = (@AddWith.WithSelf.%AddWith.WithSelf.Op.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @As(%T.loc12_15.2: type) { -// CHECK:STDOUT: %T.patt.loc12_15.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc12_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T)] +// CHECK:STDOUT: generic interface @As(%T.loc13_15.2: type) { +// CHECK:STDOUT: %T.patt.loc13_15.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.loc13_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T.loc12_15.1)> [symbolic = %As.type (constants.%As.type.c5f)] -// CHECK:STDOUT: %Self.loc12_23.2: @As.%As.type (%As.type.c5f) = symbolic_binding Self, 1 [symbolic = %Self.loc12_23.2 (constants.%Self.f80)] +// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T.loc13_15.1)> [symbolic = %As.type (constants.%As.type.c5f)] +// CHECK:STDOUT: %Self.loc13_23.2: @As.%As.type (%As.type.c5f) = symbolic_binding Self, 1 [symbolic = %Self.loc13_23.2 (constants.%Self.f80)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc12_23.1: @As.%As.type (%As.type.c5f) = symbolic_binding Self, 1 [symbolic = %Self.loc12_23.2 (constants.%Self.f80)] +// CHECK:STDOUT: %Self.loc13_23.1: @As.%As.type (%As.type.c5f) = symbolic_binding Self, 1 [symbolic = %Self.loc13_23.2 (constants.%Self.f80)] // CHECK:STDOUT: %As.WithSelf.decl = interface_with_self_decl @As [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %As.WithSelf.Convert.decl: @As.WithSelf.%As.WithSelf.Convert.type (%As.WithSelf.Convert.type.640) = fn_decl @As.WithSelf.Convert [symbolic = @As.WithSelf.%As.WithSelf.Convert (constants.%As.WithSelf.Convert.896)] { -// CHECK:STDOUT: %self.param_patt.loc13_14.1: @As.WithSelf.Convert.%pattern_type.loc13_14 (%pattern_type.a01) = value_param_pattern [symbolic = %self.param_patt.loc13_14.2 (constants.%self.param_patt.29a)] -// CHECK:STDOUT: %self.patt.loc13_14.1: @As.WithSelf.Convert.%pattern_type.loc13_14 (%pattern_type.a01) = wrapper_binding_pattern self, %self.param_patt.loc13_14.1 [symbolic = %self.patt.loc13_14.2 (constants.%self.patt.7e4)] -// CHECK:STDOUT: %return.param_patt.loc13_23.1: @As.WithSelf.Convert.%pattern_type.loc13_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc13_23.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc13_20.1: @As.WithSelf.Convert.%pattern_type.loc13_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc13_23.1, %T.ref [symbolic = %return.patt.loc13_20.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %self.param_patt.loc14_14.1: @As.WithSelf.Convert.%pattern_type.loc14_14 (%pattern_type.a01) = value_param_pattern [symbolic = %self.param_patt.loc14_14.2 (constants.%self.param_patt.29a)] +// CHECK:STDOUT: %self.patt.loc14_14.1: @As.WithSelf.Convert.%pattern_type.loc14_14 (%pattern_type.a01) = wrapper_binding_pattern self, %self.param_patt.loc14_14.1 [symbolic = %self.patt.loc14_14.2 (constants.%self.patt.7e4)] +// CHECK:STDOUT: %return.param_patt.loc14_23.1: @As.WithSelf.Convert.%pattern_type.loc14_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc14_23.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc14_20.1: @As.WithSelf.Convert.%pattern_type.loc14_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc14_23.1, %T.ref [symbolic = %return.patt.loc14_20.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @As.%T.loc12_15.2 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %.loc13_23.2: Core.Form = init_form %T.ref [symbolic = %.loc13_23.1 (constants.%.184)] -// CHECK:STDOUT: %self.param: @As.WithSelf.Convert.%Self.as_type.loc13_14.1 (%Self.as_type.1ce) = value_param call_param0 -// CHECK:STDOUT: %.loc13_14.1: type = splice_block %.loc13_14.3 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1ce)] { -// CHECK:STDOUT: %.loc13_14.2: @As.WithSelf.Convert.%As.type (%As.type.c5f) = specific_constant @As.%Self.loc12_23.1, @As(constants.%T) [symbolic = %Self (constants.%Self.f80)] -// CHECK:STDOUT: %Self.ref: @As.WithSelf.Convert.%As.type (%As.type.c5f) = name_ref Self, %.loc13_14.2 [symbolic = %Self (constants.%Self.f80)] -// CHECK:STDOUT: %Self.as_type.loc13_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1ce)] -// CHECK:STDOUT: %.loc13_14.3: type = converted %Self.ref, %Self.as_type.loc13_14.2 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1ce)] +// CHECK:STDOUT: %T.ref: type = name_ref T, @As.%T.loc13_15.2 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %.loc14_23.2: Core.Form = init_form %T.ref [symbolic = %.loc14_23.1 (constants.%.184)] +// CHECK:STDOUT: %self.param: @As.WithSelf.Convert.%Self.as_type.loc14_14.1 (%Self.as_type.1ce) = value_param call_param0 +// CHECK:STDOUT: %.loc14_14.1: type = splice_block %.loc14_14.3 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type.1ce)] { +// CHECK:STDOUT: %.loc14_14.2: @As.WithSelf.Convert.%As.type (%As.type.c5f) = specific_constant @As.%Self.loc13_23.1, @As(constants.%T) [symbolic = %Self (constants.%Self.f80)] +// CHECK:STDOUT: %Self.ref: @As.WithSelf.Convert.%As.type (%As.type.c5f) = name_ref Self, %.loc14_14.2 [symbolic = %Self (constants.%Self.f80)] +// CHECK:STDOUT: %Self.as_type.loc14_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type.1ce)] +// CHECK:STDOUT: %.loc14_14.3: type = converted %Self.ref, %Self.as_type.loc14_14.2 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type.1ce)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @As.WithSelf.Convert.%Self.as_type.loc13_14.1 (%Self.as_type.1ce) = wrapper_binding self, %self.param +// CHECK:STDOUT: %self: @As.WithSelf.Convert.%Self.as_type.loc14_14.1 (%Self.as_type.1ce) = wrapper_binding self, %self.param // CHECK:STDOUT: %return.param: ref @As.WithSelf.Convert.%T (%T) = out_param call_param1 // CHECK:STDOUT: %return: ref @As.WithSelf.Convert.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc13_24.1: @As.WithSelf.%As.assoc_type (%As.assoc_type.b40) = assoc_entity element0, %As.WithSelf.Convert.decl [symbolic = %assoc0.loc13_24.2 (constants.%assoc0.a44)] +// CHECK:STDOUT: %assoc0.loc14_24.1: @As.WithSelf.%As.assoc_type (%As.assoc_type.b40) = assoc_entity element0, %As.WithSelf.Convert.decl [symbolic = %assoc0.loc14_24.2 (constants.%assoc0.a44)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc12_23.1 +// CHECK:STDOUT: .Self = %Self.loc13_23.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = -// CHECK:STDOUT: .Convert = @As.WithSelf.%assoc0.loc13_24.1 +// CHECK:STDOUT: .Convert = @As.WithSelf.%assoc0.loc14_24.1 // CHECK:STDOUT: witness = (@As.WithSelf.%As.WithSelf.Convert.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @ImplicitAs(%T.loc16_23.2: type) { -// CHECK:STDOUT: %T.patt.loc16_23.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_23.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc16_23.1: type = symbolic_binding T, 0 [symbolic = %T.loc16_23.1 (constants.%T)] +// CHECK:STDOUT: generic interface @ImplicitAs(%T.loc17_23.2: type) { +// CHECK:STDOUT: %T.patt.loc17_23.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_23.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.loc17_23.1: type = symbolic_binding T, 0 [symbolic = %T.loc17_23.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T.loc16_23.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)] -// CHECK:STDOUT: %Self.loc16_31.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc16_31.2 (constants.%Self.bb1)] +// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T.loc17_23.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)] +// CHECK:STDOUT: %Self.loc17_31.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc17_31.2 (constants.%Self.bb1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc16_31.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc16_31.2 (constants.%Self.bb1)] +// CHECK:STDOUT: %Self.loc17_31.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc17_31.2 (constants.%Self.bb1)] // CHECK:STDOUT: %ImplicitAs.WithSelf.decl = interface_with_self_decl @ImplicitAs [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.decl: @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type.920) = fn_decl @ImplicitAs.WithSelf.Convert [symbolic = @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert.293)] { -// CHECK:STDOUT: %self.param_patt.loc17_14.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc17_14 (%pattern_type.701) = value_param_pattern [symbolic = %self.param_patt.loc17_14.2 (constants.%self.param_patt.c3f)] -// CHECK:STDOUT: %self.patt.loc17_14.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc17_14 (%pattern_type.701) = wrapper_binding_pattern self, %self.param_patt.loc17_14.1 [symbolic = %self.patt.loc17_14.2 (constants.%self.patt.2f3)] -// CHECK:STDOUT: %return.param_patt.loc17_23.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc17_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc17_23.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc17_20.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc17_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc17_23.1, %T.ref [symbolic = %return.patt.loc17_20.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %self.param_patt.loc18_14.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc18_14 (%pattern_type.701) = value_param_pattern [symbolic = %self.param_patt.loc18_14.2 (constants.%self.param_patt.c3f)] +// CHECK:STDOUT: %self.patt.loc18_14.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc18_14 (%pattern_type.701) = wrapper_binding_pattern self, %self.param_patt.loc18_14.1 [symbolic = %self.patt.loc18_14.2 (constants.%self.patt.2f3)] +// CHECK:STDOUT: %return.param_patt.loc18_23.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc18_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc18_23.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc18_20.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc18_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc18_23.1, %T.ref [symbolic = %return.patt.loc18_20.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc16_23.2 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %.loc17_23.2: Core.Form = init_form %T.ref [symbolic = %.loc17_23.1 (constants.%.184)] -// CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc17_14.1 (%Self.as_type.5b8) = value_param call_param0 -// CHECK:STDOUT: %.loc17_14.1: type = splice_block %.loc17_14.3 [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type.5b8)] { -// CHECK:STDOUT: %.loc17_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = specific_constant @ImplicitAs.%Self.loc16_31.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.bb1)] -// CHECK:STDOUT: %Self.ref: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = name_ref Self, %.loc17_14.2 [symbolic = %Self (constants.%Self.bb1)] -// CHECK:STDOUT: %Self.as_type.loc17_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type.5b8)] -// CHECK:STDOUT: %.loc17_14.3: type = converted %Self.ref, %Self.as_type.loc17_14.2 [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type.5b8)] +// CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc17_23.2 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %.loc18_23.2: Core.Form = init_form %T.ref [symbolic = %.loc18_23.1 (constants.%.184)] +// CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc18_14.1 (%Self.as_type.5b8) = value_param call_param0 +// CHECK:STDOUT: %.loc18_14.1: type = splice_block %.loc18_14.3 [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type.5b8)] { +// CHECK:STDOUT: %.loc18_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = specific_constant @ImplicitAs.%Self.loc17_31.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.bb1)] +// CHECK:STDOUT: %Self.ref: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = name_ref Self, %.loc18_14.2 [symbolic = %Self (constants.%Self.bb1)] +// CHECK:STDOUT: %Self.as_type.loc18_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type.5b8)] +// CHECK:STDOUT: %.loc18_14.3: type = converted %Self.ref, %Self.as_type.loc18_14.2 [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type.5b8)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc17_14.1 (%Self.as_type.5b8) = wrapper_binding self, %self.param +// CHECK:STDOUT: %self: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc18_14.1 (%Self.as_type.5b8) = wrapper_binding self, %self.param // CHECK:STDOUT: %return.param: ref @ImplicitAs.WithSelf.Convert.%T (%T) = out_param call_param1 // CHECK:STDOUT: %return: ref @ImplicitAs.WithSelf.Convert.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc17_24.1: @ImplicitAs.WithSelf.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.fcc) = assoc_entity element0, %ImplicitAs.WithSelf.Convert.decl [symbolic = %assoc0.loc17_24.2 (constants.%assoc0.313)] +// CHECK:STDOUT: %assoc0.loc18_24.1: @ImplicitAs.WithSelf.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.fcc) = assoc_entity element0, %ImplicitAs.WithSelf.Convert.decl [symbolic = %assoc0.loc18_24.2 (constants.%assoc0.313)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc16_31.1 +// CHECK:STDOUT: .Self = %Self.loc17_31.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = -// CHECK:STDOUT: .Convert = @ImplicitAs.WithSelf.%assoc0.loc17_24.1 +// CHECK:STDOUT: .Convert = @ImplicitAs.WithSelf.%assoc0.loc18_24.1 // CHECK:STDOUT: .IntLiteral = // CHECK:STDOUT: witness = (@ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.decl) // CHECK:STDOUT: @@ -428,22 +453,22 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @i32.builtin.as.AddWith.impl: %.loc20_6 as %AddWith.type { +// CHECK:STDOUT: impl @i32.builtin.as.AddWith.impl: %.loc21_6 as %AddWith.type { // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op.decl: %i32.builtin.as.AddWith.impl.Op.type = fn_decl @i32.builtin.as.AddWith.impl.Op [concrete = constants.%i32.builtin.as.AddWith.impl.Op] { // CHECK:STDOUT: %self.param_patt: %pattern_type.956 = value_param_pattern [concrete = constants.%self.param_patt.936] // CHECK:STDOUT: %self.patt: %pattern_type.956 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.16e] // CHECK:STDOUT: %other.param_patt: %pattern_type.956 = value_param_pattern [concrete = constants.%other.param_patt.36d] // CHECK:STDOUT: %other.patt: %pattern_type.956 = wrapper_binding_pattern other, %other.param_patt [concrete = constants.%other.patt.8f0] // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern [concrete = constants.%return.param_patt.903] -// CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern %return.param_patt, %Self.ref.loc21_31 [concrete = constants.%return.patt.930] +// CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern %return.param_patt, %Self.ref.loc22_31 [concrete = constants.%return.patt.930] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc21_31: type = name_ref Self, @i32.builtin.as.AddWith.impl.%.loc20_6 [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %.loc21: Core.Form = init_form %Self.ref.loc21_31 [concrete = constants.%.9cb] +// CHECK:STDOUT: %Self.ref.loc22_31: type = name_ref Self, @i32.builtin.as.AddWith.impl.%.loc21_6 [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc22: Core.Form = init_form %Self.ref.loc22_31 [concrete = constants.%.9cb] // CHECK:STDOUT: %self.param: %i32.builtin = value_param call_param0 -// CHECK:STDOUT: %Self.ref.loc21_9: type = name_ref Self, @i32.builtin.as.AddWith.impl.%.loc20_6 [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %Self.ref.loc22_9: type = name_ref Self, @i32.builtin.as.AddWith.impl.%.loc21_6 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %self: %i32.builtin = wrapper_binding self, %self.param // CHECK:STDOUT: %other.param: %i32.builtin = value_param call_param1 -// CHECK:STDOUT: %Self.ref.loc21_22: type = name_ref Self, @i32.builtin.as.AddWith.impl.%.loc20_6 [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %Self.ref.loc22_22: type = name_ref Self, @i32.builtin.as.AddWith.impl.%.loc21_6 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %other: %i32.builtin = wrapper_binding other, %other.param // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param call_param2 // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param @@ -462,10 +487,10 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %self.param_patt: %pattern_type.dc0 = value_param_pattern [concrete = constants.%self.param_patt.1ca] // CHECK:STDOUT: %self.patt: %pattern_type.dc0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d07] // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern [concrete = constants.%return.param_patt.903] -// CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern %return.param_patt, %.loc25_23.1 [concrete = constants.%return.patt.930] +// CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern %return.param_patt, %.loc26_23.1 [concrete = constants.%return.patt.930] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc25_23.1: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %.loc25_23.2: Core.Form = init_form %.loc25_23.1 [concrete = constants.%.9cb] +// CHECK:STDOUT: %.loc26_23.1: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc26_23.2: Core.Form = init_form %.loc26_23.1 [concrete = constants.%.9cb] // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param call_param0 // CHECK:STDOUT: %Self.ref: type = name_ref Self, @Core.IntLiteral.as.As.impl.%IntLiteral.ref [concrete = Core.IntLiteral] // CHECK:STDOUT: %self: Core.IntLiteral = wrapper_binding self, %self.param @@ -486,10 +511,10 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %self.param_patt: %pattern_type.dc0 = value_param_pattern [concrete = constants.%self.param_patt.1ca] // CHECK:STDOUT: %self.patt: %pattern_type.dc0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d07] // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern [concrete = constants.%return.param_patt.903] -// CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern %return.param_patt, %.loc29_23.1 [concrete = constants.%return.patt.930] +// CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern %return.param_patt, %.loc30_23.1 [concrete = constants.%return.patt.930] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc29_23.1: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %.loc29_23.2: Core.Form = init_form %.loc29_23.1 [concrete = constants.%.9cb] +// CHECK:STDOUT: %.loc30_23.1: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc30_23.2: Core.Form = init_form %.loc30_23.1 [concrete = constants.%.9cb] // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param call_param0 // CHECK:STDOUT: %Self.ref: type = name_ref Self, @Core.IntLiteral.as.ImplicitAs.impl.%IntLiteral.ref [concrete = Core.IntLiteral] // CHECK:STDOUT: %self: Core.IntLiteral = wrapper_binding self, %self.param @@ -505,7 +530,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: witness = %ImplicitAs.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @i32.builtin.as.ImplicitAs.impl: %.loc32 as %ImplicitAs.type { +// CHECK:STDOUT: impl @i32.builtin.as.ImplicitAs.impl: %.loc33 as %ImplicitAs.type { // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert.decl: %i32.builtin.as.ImplicitAs.impl.Convert.type = fn_decl @i32.builtin.as.ImplicitAs.impl.Convert [concrete = constants.%i32.builtin.as.ImplicitAs.impl.Convert] { // CHECK:STDOUT: %self.param_patt: %pattern_type.956 = value_param_pattern [concrete = constants.%self.param_patt.936] // CHECK:STDOUT: %self.patt: %pattern_type.956 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.16e] @@ -513,9 +538,9 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.patt: %pattern_type.dc0 = return_slot_pattern %return.param_patt, %IntLiteral.ref [concrete = constants.%return.patt.cd4] // CHECK:STDOUT: } { // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, file.%IntLiteral [concrete = Core.IntLiteral] -// CHECK:STDOUT: %.loc33: Core.Form = init_form %IntLiteral.ref [concrete = constants.%.f7d] +// CHECK:STDOUT: %.loc34: Core.Form = init_form %IntLiteral.ref [concrete = constants.%.f7d] // CHECK:STDOUT: %self.param: %i32.builtin = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @i32.builtin.as.ImplicitAs.impl.%.loc32 [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @i32.builtin.as.ImplicitAs.impl.%.loc33 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %self: %i32.builtin = wrapper_binding self, %self.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param call_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param @@ -534,53 +559,55 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%N.param: Core.IntLiteral) -> out %return.param: type = "int.make_type_signed"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AddWith.WithSelf.Op(@AddWith.%T.loc8_20.2: type, @AddWith.%Self.loc8_28.1: @AddWith.%AddWith.type (%AddWith.type.7e9)) { +// CHECK:STDOUT: fn @Array(%T.param: type, %N.param: Core.IntLiteral) -> out %return.param: type = "array.make_type"; +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @AddWith.WithSelf.Op(@AddWith.%T.loc9_20.2: type, @AddWith.%Self.loc9_28.1: @AddWith.%AddWith.type (%AddWith.type.7e9)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.7e9)] // CHECK:STDOUT: %Self: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.8d5)] -// CHECK:STDOUT: %Self.as_type.loc9_9.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc9_9.1 [symbolic = %pattern_type (constants.%pattern_type.131)] -// CHECK:STDOUT: %self.param_patt.loc9_9.2: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = value_param_pattern [symbolic = %self.param_patt.loc9_9.2 (constants.%self.param_patt.72e)] -// CHECK:STDOUT: %self.patt.loc9_9.2: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = wrapper_binding_pattern self, %self.param_patt.loc9_9.2 [symbolic = %self.patt.loc9_9.2 (constants.%self.patt.f75)] -// CHECK:STDOUT: %other.param_patt.loc9_20.2: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = value_param_pattern [symbolic = %other.param_patt.loc9_20.2 (constants.%other.param_patt.89e)] -// CHECK:STDOUT: %other.patt.loc9_20.2: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = wrapper_binding_pattern other, %other.param_patt.loc9_20.2 [symbolic = %other.patt.loc9_20.2 (constants.%other.patt.49b)] -// CHECK:STDOUT: %.loc9_31.1: Core.Form = init_form %Self.as_type.loc9_9.1 [symbolic = %.loc9_31.1 (constants.%.e80)] -// CHECK:STDOUT: %return.param_patt.loc9_31.2: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = out_param_pattern [symbolic = %return.param_patt.loc9_31.2 (constants.%return.param_patt.8c6)] -// CHECK:STDOUT: %return.patt.loc9_28.2: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = return_slot_pattern %return.param_patt.loc9_31.2, %Self.as_type.loc9_9.1 [symbolic = %return.patt.loc9_28.2 (constants.%return.patt.169)] +// CHECK:STDOUT: %Self.as_type.loc10_9.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc10_9.1 (constants.%Self.as_type.48c)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc10_9.1 [symbolic = %pattern_type (constants.%pattern_type.131)] +// CHECK:STDOUT: %self.param_patt.loc10_9.2: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = value_param_pattern [symbolic = %self.param_patt.loc10_9.2 (constants.%self.param_patt.72e)] +// CHECK:STDOUT: %self.patt.loc10_9.2: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = wrapper_binding_pattern self, %self.param_patt.loc10_9.2 [symbolic = %self.patt.loc10_9.2 (constants.%self.patt.f75)] +// CHECK:STDOUT: %other.param_patt.loc10_20.2: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = value_param_pattern [symbolic = %other.param_patt.loc10_20.2 (constants.%other.param_patt.89e)] +// CHECK:STDOUT: %other.patt.loc10_20.2: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = wrapper_binding_pattern other, %other.param_patt.loc10_20.2 [symbolic = %other.patt.loc10_20.2 (constants.%other.patt.49b)] +// CHECK:STDOUT: %.loc10_31.1: Core.Form = init_form %Self.as_type.loc10_9.1 [symbolic = %.loc10_31.1 (constants.%.e80)] +// CHECK:STDOUT: %return.param_patt.loc10_31.2: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = out_param_pattern [symbolic = %return.param_patt.loc10_31.2 (constants.%return.param_patt.8c6)] +// CHECK:STDOUT: %return.patt.loc10_28.2: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = return_slot_pattern %return.param_patt.loc10_31.2, %Self.as_type.loc10_9.1 [symbolic = %return.patt.loc10_28.2 (constants.%return.patt.169)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c), %other.param: @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c)) -> out %return.param: @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c); +// CHECK:STDOUT: fn(%self.param: @AddWith.WithSelf.Op.%Self.as_type.loc10_9.1 (%Self.as_type.48c), %other.param: @AddWith.WithSelf.Op.%Self.as_type.loc10_9.1 (%Self.as_type.48c)) -> out %return.param: @AddWith.WithSelf.Op.%Self.as_type.loc10_9.1 (%Self.as_type.48c); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @As.WithSelf.Convert(@As.%T.loc12_15.2: type, @As.%Self.loc12_23.1: @As.%As.type (%As.type.c5f)) { +// CHECK:STDOUT: generic fn @As.WithSelf.Convert(@As.%T.loc13_15.2: type, @As.%Self.loc13_23.1: @As.%As.type (%As.type.c5f)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.c5f)] // CHECK:STDOUT: %Self: @As.WithSelf.Convert.%As.type (%As.type.c5f) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.f80)] -// CHECK:STDOUT: %Self.as_type.loc13_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1ce)] -// CHECK:STDOUT: %pattern_type.loc13_14: type = pattern_type %Self.as_type.loc13_14.1 [symbolic = %pattern_type.loc13_14 (constants.%pattern_type.a01)] -// CHECK:STDOUT: %self.param_patt.loc13_14.2: @As.WithSelf.Convert.%pattern_type.loc13_14 (%pattern_type.a01) = value_param_pattern [symbolic = %self.param_patt.loc13_14.2 (constants.%self.param_patt.29a)] -// CHECK:STDOUT: %self.patt.loc13_14.2: @As.WithSelf.Convert.%pattern_type.loc13_14 (%pattern_type.a01) = wrapper_binding_pattern self, %self.param_patt.loc13_14.2 [symbolic = %self.patt.loc13_14.2 (constants.%self.patt.7e4)] -// CHECK:STDOUT: %.loc13_23.1: Core.Form = init_form %T [symbolic = %.loc13_23.1 (constants.%.184)] -// CHECK:STDOUT: %pattern_type.loc13_23: type = pattern_type %T [symbolic = %pattern_type.loc13_23 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %return.param_patt.loc13_23.2: @As.WithSelf.Convert.%pattern_type.loc13_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc13_23.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc13_20.2: @As.WithSelf.Convert.%pattern_type.loc13_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc13_23.2, %T [symbolic = %return.patt.loc13_20.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %Self.as_type.loc14_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type.1ce)] +// CHECK:STDOUT: %pattern_type.loc14_14: type = pattern_type %Self.as_type.loc14_14.1 [symbolic = %pattern_type.loc14_14 (constants.%pattern_type.a01)] +// CHECK:STDOUT: %self.param_patt.loc14_14.2: @As.WithSelf.Convert.%pattern_type.loc14_14 (%pattern_type.a01) = value_param_pattern [symbolic = %self.param_patt.loc14_14.2 (constants.%self.param_patt.29a)] +// CHECK:STDOUT: %self.patt.loc14_14.2: @As.WithSelf.Convert.%pattern_type.loc14_14 (%pattern_type.a01) = wrapper_binding_pattern self, %self.param_patt.loc14_14.2 [symbolic = %self.patt.loc14_14.2 (constants.%self.patt.7e4)] +// CHECK:STDOUT: %.loc14_23.1: Core.Form = init_form %T [symbolic = %.loc14_23.1 (constants.%.184)] +// CHECK:STDOUT: %pattern_type.loc14_23: type = pattern_type %T [symbolic = %pattern_type.loc14_23 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %return.param_patt.loc14_23.2: @As.WithSelf.Convert.%pattern_type.loc14_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc14_23.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc14_20.2: @As.WithSelf.Convert.%pattern_type.loc14_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc14_23.2, %T [symbolic = %return.patt.loc14_20.2 (constants.%return.patt.b39)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @As.WithSelf.Convert.%Self.as_type.loc13_14.1 (%Self.as_type.1ce)) -> out %return.param: @As.WithSelf.Convert.%T (%T); +// CHECK:STDOUT: fn(%self.param: @As.WithSelf.Convert.%Self.as_type.loc14_14.1 (%Self.as_type.1ce)) -> out %return.param: @As.WithSelf.Convert.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%T.loc16_23.2: type, @ImplicitAs.%Self.loc16_31.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa)) { +// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%T.loc17_23.2: type, @ImplicitAs.%Self.loc17_31.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)] // CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.bb1)] -// CHECK:STDOUT: %Self.as_type.loc17_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type.5b8)] -// CHECK:STDOUT: %pattern_type.loc17_14: type = pattern_type %Self.as_type.loc17_14.1 [symbolic = %pattern_type.loc17_14 (constants.%pattern_type.701)] -// CHECK:STDOUT: %self.param_patt.loc17_14.2: @ImplicitAs.WithSelf.Convert.%pattern_type.loc17_14 (%pattern_type.701) = value_param_pattern [symbolic = %self.param_patt.loc17_14.2 (constants.%self.param_patt.c3f)] -// CHECK:STDOUT: %self.patt.loc17_14.2: @ImplicitAs.WithSelf.Convert.%pattern_type.loc17_14 (%pattern_type.701) = wrapper_binding_pattern self, %self.param_patt.loc17_14.2 [symbolic = %self.patt.loc17_14.2 (constants.%self.patt.2f3)] -// CHECK:STDOUT: %.loc17_23.1: Core.Form = init_form %T [symbolic = %.loc17_23.1 (constants.%.184)] -// CHECK:STDOUT: %pattern_type.loc17_23: type = pattern_type %T [symbolic = %pattern_type.loc17_23 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %return.param_patt.loc17_23.2: @ImplicitAs.WithSelf.Convert.%pattern_type.loc17_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc17_23.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc17_20.2: @ImplicitAs.WithSelf.Convert.%pattern_type.loc17_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc17_23.2, %T [symbolic = %return.patt.loc17_20.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %Self.as_type.loc18_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type.5b8)] +// CHECK:STDOUT: %pattern_type.loc18_14: type = pattern_type %Self.as_type.loc18_14.1 [symbolic = %pattern_type.loc18_14 (constants.%pattern_type.701)] +// CHECK:STDOUT: %self.param_patt.loc18_14.2: @ImplicitAs.WithSelf.Convert.%pattern_type.loc18_14 (%pattern_type.701) = value_param_pattern [symbolic = %self.param_patt.loc18_14.2 (constants.%self.param_patt.c3f)] +// CHECK:STDOUT: %self.patt.loc18_14.2: @ImplicitAs.WithSelf.Convert.%pattern_type.loc18_14 (%pattern_type.701) = wrapper_binding_pattern self, %self.param_patt.loc18_14.2 [symbolic = %self.patt.loc18_14.2 (constants.%self.patt.2f3)] +// CHECK:STDOUT: %.loc18_23.1: Core.Form = init_form %T [symbolic = %.loc18_23.1 (constants.%.184)] +// CHECK:STDOUT: %pattern_type.loc18_23: type = pattern_type %T [symbolic = %pattern_type.loc18_23 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %return.param_patt.loc18_23.2: @ImplicitAs.WithSelf.Convert.%pattern_type.loc18_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc18_23.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc18_20.2: @ImplicitAs.WithSelf.Convert.%pattern_type.loc18_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc18_23.2, %T [symbolic = %return.patt.loc18_20.2 (constants.%return.patt.b39)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc17_14.1 (%Self.as_type.5b8)) -> out %return.param: @ImplicitAs.WithSelf.Convert.%T (%T); +// CHECK:STDOUT: fn(%self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc18_14.1 (%Self.as_type.5b8)) -> out %return.param: @ImplicitAs.WithSelf.Convert.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @i32.builtin.as.AddWith.impl.Op(%self.param: %i32.builtin, %other.param: %i32.builtin) -> out %return.param: %i32.builtin = "int.sadd"; @@ -592,8 +619,8 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: fn @i32.builtin.as.ImplicitAs.impl.Convert(%self.param: %i32.builtin) -> out %return.param: Core.IntLiteral = "int.convert_checked"; // CHECK:STDOUT: // CHECK:STDOUT: specific @AddWith(constants.%T) { -// CHECK:STDOUT: %T.patt.loc8_20.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_20.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc9_20.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc9_20.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddWith.WithSelf(constants.%T, constants.%Self.8d5) {} @@ -602,20 +629,20 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.7e9 // CHECK:STDOUT: %Self => constants.%Self.8d5 -// CHECK:STDOUT: %Self.as_type.loc9_9.1 => constants.%Self.as_type.48c +// CHECK:STDOUT: %Self.as_type.loc10_9.1 => constants.%Self.as_type.48c // CHECK:STDOUT: %pattern_type => constants.%pattern_type.131 -// CHECK:STDOUT: %self.param_patt.loc9_9.2 => constants.%self.param_patt.72e -// CHECK:STDOUT: %self.patt.loc9_9.2 => constants.%self.patt.f75 -// CHECK:STDOUT: %other.param_patt.loc9_20.2 => constants.%other.param_patt.89e -// CHECK:STDOUT: %other.patt.loc9_20.2 => constants.%other.patt.49b -// CHECK:STDOUT: %.loc9_31.1 => constants.%.e80 -// CHECK:STDOUT: %return.param_patt.loc9_31.2 => constants.%return.param_patt.8c6 -// CHECK:STDOUT: %return.patt.loc9_28.2 => constants.%return.patt.169 +// CHECK:STDOUT: %self.param_patt.loc10_9.2 => constants.%self.param_patt.72e +// CHECK:STDOUT: %self.patt.loc10_9.2 => constants.%self.patt.f75 +// CHECK:STDOUT: %other.param_patt.loc10_20.2 => constants.%other.param_patt.89e +// CHECK:STDOUT: %other.patt.loc10_20.2 => constants.%other.patt.49b +// CHECK:STDOUT: %.loc10_31.1 => constants.%.e80 +// CHECK:STDOUT: %return.param_patt.loc10_31.2 => constants.%return.param_patt.8c6 +// CHECK:STDOUT: %return.patt.loc10_28.2 => constants.%return.patt.169 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(constants.%T) { -// CHECK:STDOUT: %T.patt.loc12_15.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc12_15.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc13_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As.WithSelf(constants.%T, constants.%Self.f80) {} @@ -624,19 +651,19 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %As.type => constants.%As.type.c5f // CHECK:STDOUT: %Self => constants.%Self.f80 -// CHECK:STDOUT: %Self.as_type.loc13_14.1 => constants.%Self.as_type.1ce -// CHECK:STDOUT: %pattern_type.loc13_14 => constants.%pattern_type.a01 -// CHECK:STDOUT: %self.param_patt.loc13_14.2 => constants.%self.param_patt.29a -// CHECK:STDOUT: %self.patt.loc13_14.2 => constants.%self.patt.7e4 -// CHECK:STDOUT: %.loc13_23.1 => constants.%.184 -// CHECK:STDOUT: %pattern_type.loc13_23 => constants.%pattern_type.51d -// CHECK:STDOUT: %return.param_patt.loc13_23.2 => constants.%return.param_patt.41d -// CHECK:STDOUT: %return.patt.loc13_20.2 => constants.%return.patt.b39 +// CHECK:STDOUT: %Self.as_type.loc14_14.1 => constants.%Self.as_type.1ce +// CHECK:STDOUT: %pattern_type.loc14_14 => constants.%pattern_type.a01 +// CHECK:STDOUT: %self.param_patt.loc14_14.2 => constants.%self.param_patt.29a +// CHECK:STDOUT: %self.patt.loc14_14.2 => constants.%self.patt.7e4 +// CHECK:STDOUT: %.loc14_23.1 => constants.%.184 +// CHECK:STDOUT: %pattern_type.loc14_23 => constants.%pattern_type.51d +// CHECK:STDOUT: %return.param_patt.loc14_23.2 => constants.%return.param_patt.41d +// CHECK:STDOUT: %return.patt.loc14_20.2 => constants.%return.patt.b39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%T) { -// CHECK:STDOUT: %T.patt.loc16_23.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc16_23.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc17_23.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc17_23.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs.WithSelf(constants.%T, constants.%Self.bb1) {} @@ -645,23 +672,23 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3aa // CHECK:STDOUT: %Self => constants.%Self.bb1 -// CHECK:STDOUT: %Self.as_type.loc17_14.1 => constants.%Self.as_type.5b8 -// CHECK:STDOUT: %pattern_type.loc17_14 => constants.%pattern_type.701 -// CHECK:STDOUT: %self.param_patt.loc17_14.2 => constants.%self.param_patt.c3f -// CHECK:STDOUT: %self.patt.loc17_14.2 => constants.%self.patt.2f3 -// CHECK:STDOUT: %.loc17_23.1 => constants.%.184 -// CHECK:STDOUT: %pattern_type.loc17_23 => constants.%pattern_type.51d -// CHECK:STDOUT: %return.param_patt.loc17_23.2 => constants.%return.param_patt.41d -// CHECK:STDOUT: %return.patt.loc17_20.2 => constants.%return.patt.b39 +// CHECK:STDOUT: %Self.as_type.loc18_14.1 => constants.%Self.as_type.5b8 +// CHECK:STDOUT: %pattern_type.loc18_14 => constants.%pattern_type.701 +// CHECK:STDOUT: %self.param_patt.loc18_14.2 => constants.%self.param_patt.c3f +// CHECK:STDOUT: %self.patt.loc18_14.2 => constants.%self.patt.2f3 +// CHECK:STDOUT: %.loc18_23.1 => constants.%.184 +// CHECK:STDOUT: %pattern_type.loc18_23 => constants.%pattern_type.51d +// CHECK:STDOUT: %return.param_patt.loc18_23.2 => constants.%return.param_patt.41d +// CHECK:STDOUT: %return.patt.loc18_20.2 => constants.%return.patt.b39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddWith(constants.%i32.builtin) { -// CHECK:STDOUT: %T.patt.loc8_20.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_20.1 => constants.%i32.builtin +// CHECK:STDOUT: %T.patt.loc9_20.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc9_20.1 => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.7c6 -// CHECK:STDOUT: %Self.loc8_28.2 => constants.%Self.9ab +// CHECK:STDOUT: %Self.loc9_28.2 => constants.%Self.9ab // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddWith.WithSelf(constants.%i32.builtin, constants.%Self.8d5) { @@ -672,7 +699,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.aad // CHECK:STDOUT: %AddWith.WithSelf.Op => constants.%AddWith.WithSelf.Op.e15 // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.439 -// CHECK:STDOUT: %assoc0.loc9_35.2 => constants.%assoc0.7f8 +// CHECK:STDOUT: %assoc0.loc10_35.2 => constants.%assoc0.7f8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddWith.WithSelf(constants.%i32.builtin, constants.%AddWith.facet) { @@ -683,31 +710,31 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.5c5 // CHECK:STDOUT: %AddWith.WithSelf.Op => constants.%AddWith.WithSelf.Op.2a7 // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.439 -// CHECK:STDOUT: %assoc0.loc9_35.2 => constants.%assoc0.7f8 +// CHECK:STDOUT: %assoc0.loc10_35.2 => constants.%assoc0.7f8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddWith.WithSelf.Op(constants.%i32.builtin, constants.%AddWith.facet) { // CHECK:STDOUT: %T => constants.%i32.builtin // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.7c6 // CHECK:STDOUT: %Self => constants.%AddWith.facet -// CHECK:STDOUT: %Self.as_type.loc9_9.1 => constants.%i32.builtin +// CHECK:STDOUT: %Self.as_type.loc10_9.1 => constants.%i32.builtin // CHECK:STDOUT: %pattern_type => constants.%pattern_type.956 -// CHECK:STDOUT: %self.param_patt.loc9_9.2 => constants.%self.param_patt.936 -// CHECK:STDOUT: %self.patt.loc9_9.2 => constants.%self.patt.16e -// CHECK:STDOUT: %other.param_patt.loc9_20.2 => constants.%other.param_patt.36d -// CHECK:STDOUT: %other.patt.loc9_20.2 => constants.%other.patt.8f0 -// CHECK:STDOUT: %.loc9_31.1 => constants.%.9cb -// CHECK:STDOUT: %return.param_patt.loc9_31.2 => constants.%return.param_patt.903 -// CHECK:STDOUT: %return.patt.loc9_28.2 => constants.%return.patt.930 +// CHECK:STDOUT: %self.param_patt.loc10_9.2 => constants.%self.param_patt.936 +// CHECK:STDOUT: %self.patt.loc10_9.2 => constants.%self.patt.16e +// CHECK:STDOUT: %other.param_patt.loc10_20.2 => constants.%other.param_patt.36d +// CHECK:STDOUT: %other.patt.loc10_20.2 => constants.%other.patt.8f0 +// CHECK:STDOUT: %.loc10_31.1 => constants.%.9cb +// CHECK:STDOUT: %return.param_patt.loc10_31.2 => constants.%return.param_patt.903 +// CHECK:STDOUT: %return.patt.loc10_28.2 => constants.%return.patt.930 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(constants.%i32.builtin) { -// CHECK:STDOUT: %T.patt.loc12_15.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc12_15.1 => constants.%i32.builtin +// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc13_15.1 => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %As.type => constants.%As.type.dfb -// CHECK:STDOUT: %Self.loc12_23.2 => constants.%Self.2c0 +// CHECK:STDOUT: %Self.loc13_23.2 => constants.%Self.2c0 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As.WithSelf(constants.%i32.builtin, constants.%Self.f80) { @@ -718,7 +745,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %As.WithSelf.Convert.type => constants.%As.WithSelf.Convert.type.d9c // CHECK:STDOUT: %As.WithSelf.Convert => constants.%As.WithSelf.Convert.140 // CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.7f2 -// CHECK:STDOUT: %assoc0.loc13_24.2 => constants.%assoc0.402 +// CHECK:STDOUT: %assoc0.loc14_24.2 => constants.%assoc0.402 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As.WithSelf(constants.%i32.builtin, constants.%As.facet) { @@ -729,30 +756,30 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %As.WithSelf.Convert.type => constants.%As.WithSelf.Convert.type.f44 // CHECK:STDOUT: %As.WithSelf.Convert => constants.%As.WithSelf.Convert.1b6 // CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.7f2 -// CHECK:STDOUT: %assoc0.loc13_24.2 => constants.%assoc0.402 +// CHECK:STDOUT: %assoc0.loc14_24.2 => constants.%assoc0.402 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As.WithSelf.Convert(constants.%i32.builtin, constants.%As.facet) { // CHECK:STDOUT: %T => constants.%i32.builtin // CHECK:STDOUT: %As.type => constants.%As.type.dfb // CHECK:STDOUT: %Self => constants.%As.facet -// CHECK:STDOUT: %Self.as_type.loc13_14.1 => Core.IntLiteral -// CHECK:STDOUT: %pattern_type.loc13_14 => constants.%pattern_type.dc0 -// CHECK:STDOUT: %self.param_patt.loc13_14.2 => constants.%self.param_patt.1ca -// CHECK:STDOUT: %self.patt.loc13_14.2 => constants.%self.patt.d07 -// CHECK:STDOUT: %.loc13_23.1 => constants.%.9cb -// CHECK:STDOUT: %pattern_type.loc13_23 => constants.%pattern_type.956 -// CHECK:STDOUT: %return.param_patt.loc13_23.2 => constants.%return.param_patt.903 -// CHECK:STDOUT: %return.patt.loc13_20.2 => constants.%return.patt.930 +// CHECK:STDOUT: %Self.as_type.loc14_14.1 => Core.IntLiteral +// CHECK:STDOUT: %pattern_type.loc14_14 => constants.%pattern_type.dc0 +// CHECK:STDOUT: %self.param_patt.loc14_14.2 => constants.%self.param_patt.1ca +// CHECK:STDOUT: %self.patt.loc14_14.2 => constants.%self.patt.d07 +// CHECK:STDOUT: %.loc14_23.1 => constants.%.9cb +// CHECK:STDOUT: %pattern_type.loc14_23 => constants.%pattern_type.956 +// CHECK:STDOUT: %return.param_patt.loc14_23.2 => constants.%return.param_patt.903 +// CHECK:STDOUT: %return.patt.loc14_20.2 => constants.%return.patt.930 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) { -// CHECK:STDOUT: %T.patt.loc16_23.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc16_23.1 => constants.%i32.builtin +// CHECK:STDOUT: %T.patt.loc17_23.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc17_23.1 => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.9df -// CHECK:STDOUT: %Self.loc16_31.2 => constants.%Self.19a +// CHECK:STDOUT: %Self.loc17_31.2 => constants.%Self.19a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs.WithSelf(constants.%i32.builtin, constants.%Self.bb1) { @@ -763,7 +790,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.247 // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.e9a // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.081 -// CHECK:STDOUT: %assoc0.loc17_24.2 => constants.%assoc0.0d1 +// CHECK:STDOUT: %assoc0.loc18_24.2 => constants.%assoc0.0d1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs.WithSelf(constants.%i32.builtin, constants.%ImplicitAs.facet.cb9) { @@ -774,30 +801,30 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.be8 // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.d1d // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.081 -// CHECK:STDOUT: %assoc0.loc17_24.2 => constants.%assoc0.0d1 +// CHECK:STDOUT: %assoc0.loc18_24.2 => constants.%assoc0.0d1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(constants.%i32.builtin, constants.%ImplicitAs.facet.cb9) { // CHECK:STDOUT: %T => constants.%i32.builtin // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.9df // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.cb9 -// CHECK:STDOUT: %Self.as_type.loc17_14.1 => Core.IntLiteral -// CHECK:STDOUT: %pattern_type.loc17_14 => constants.%pattern_type.dc0 -// CHECK:STDOUT: %self.param_patt.loc17_14.2 => constants.%self.param_patt.1ca -// CHECK:STDOUT: %self.patt.loc17_14.2 => constants.%self.patt.d07 -// CHECK:STDOUT: %.loc17_23.1 => constants.%.9cb -// CHECK:STDOUT: %pattern_type.loc17_23 => constants.%pattern_type.956 -// CHECK:STDOUT: %return.param_patt.loc17_23.2 => constants.%return.param_patt.903 -// CHECK:STDOUT: %return.patt.loc17_20.2 => constants.%return.patt.930 +// CHECK:STDOUT: %Self.as_type.loc18_14.1 => Core.IntLiteral +// CHECK:STDOUT: %pattern_type.loc18_14 => constants.%pattern_type.dc0 +// CHECK:STDOUT: %self.param_patt.loc18_14.2 => constants.%self.param_patt.1ca +// CHECK:STDOUT: %self.patt.loc18_14.2 => constants.%self.patt.d07 +// CHECK:STDOUT: %.loc18_23.1 => constants.%.9cb +// CHECK:STDOUT: %pattern_type.loc18_23 => constants.%pattern_type.956 +// CHECK:STDOUT: %return.param_patt.loc18_23.2 => constants.%return.param_patt.903 +// CHECK:STDOUT: %return.patt.loc18_20.2 => constants.%return.patt.930 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) { -// CHECK:STDOUT: %T.patt.loc16_23.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc16_23.1 => Core.IntLiteral +// CHECK:STDOUT: %T.patt.loc17_23.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc17_23.1 => Core.IntLiteral // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.7cb -// CHECK:STDOUT: %Self.loc16_31.2 => constants.%Self.c40 +// CHECK:STDOUT: %Self.loc17_31.2 => constants.%Self.c40 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs.WithSelf(Core.IntLiteral, constants.%Self.bb1) { @@ -808,7 +835,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.46f // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.a78 // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.e73 -// CHECK:STDOUT: %assoc0.loc17_24.2 => constants.%assoc0.a37 +// CHECK:STDOUT: %assoc0.loc18_24.2 => constants.%assoc0.a37 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs.WithSelf(Core.IntLiteral, constants.%ImplicitAs.facet.1c1) { @@ -819,21 +846,21 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.a32 // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.70a // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.e73 -// CHECK:STDOUT: %assoc0.loc17_24.2 => constants.%assoc0.a37 +// CHECK:STDOUT: %assoc0.loc18_24.2 => constants.%assoc0.a37 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(Core.IntLiteral, constants.%ImplicitAs.facet.1c1) { // CHECK:STDOUT: %T => Core.IntLiteral // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.7cb // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.1c1 -// CHECK:STDOUT: %Self.as_type.loc17_14.1 => constants.%i32.builtin -// CHECK:STDOUT: %pattern_type.loc17_14 => constants.%pattern_type.956 -// CHECK:STDOUT: %self.param_patt.loc17_14.2 => constants.%self.param_patt.936 -// CHECK:STDOUT: %self.patt.loc17_14.2 => constants.%self.patt.16e -// CHECK:STDOUT: %.loc17_23.1 => constants.%.f7d -// CHECK:STDOUT: %pattern_type.loc17_23 => constants.%pattern_type.dc0 -// CHECK:STDOUT: %return.param_patt.loc17_23.2 => constants.%return.param_patt.eab -// CHECK:STDOUT: %return.patt.loc17_20.2 => constants.%return.patt.cd4 +// CHECK:STDOUT: %Self.as_type.loc18_14.1 => constants.%i32.builtin +// CHECK:STDOUT: %pattern_type.loc18_14 => constants.%pattern_type.956 +// CHECK:STDOUT: %self.param_patt.loc18_14.2 => constants.%self.param_patt.936 +// CHECK:STDOUT: %self.patt.loc18_14.2 => constants.%self.patt.16e +// CHECK:STDOUT: %.loc18_23.1 => constants.%.f7d +// CHECK:STDOUT: %pattern_type.loc18_23 => constants.%pattern_type.dc0 +// CHECK:STDOUT: %return.param_patt.loc18_23.2 => constants.%return.param_patt.eab +// CHECK:STDOUT: %return.patt.loc18_20.2 => constants.%return.patt.cd4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- user.carbon @@ -850,7 +877,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %As.generic: %As.type.116 = struct_value () [concrete] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %As.type.c5f: type = facet_type <@As, @As(%T)> [symbolic] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Self.37a: %As.type.c5f = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %As.assoc_type.b40: type = assoc_entity_type @As, @As(%T) [symbolic] // CHECK:STDOUT: %As.WithSelf.Convert.type.ff8: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%T, %Self.37a) [symbolic] @@ -943,6 +970,8 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert: %i32.builtin.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert.bound: = bound_method %int_3.a0f, %i32.builtin.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] +// CHECK:STDOUT: %Array.type: type = fn_type @Array [concrete] +// CHECK:STDOUT: %Array: %Array.type = struct_value () [concrete] // CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32.builtin [concrete] // CHECK:STDOUT: %pattern_type.9e2: type = pattern_type %array_type [concrete] // CHECK:STDOUT: %arr.patt: %pattern_type.9e2 = ref_binding_pattern arr [concrete] @@ -978,6 +1007,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: .As = %Core.As // CHECK:STDOUT: .AddWith = %Core.AddWith // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: import Core//default // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//default, Int, loaded [concrete = constants.%Int] @@ -1026,6 +1056,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Core.import_ref.017: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%ImplicitAs.type.7cb] // CHECK:STDOUT: %Core.import_ref.06c923.2: %i32.builtin.as.ImplicitAs.impl.Convert.type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%i32.builtin.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.c60 = impl_witness_table (%Core.import_ref.06c923.2), @i32.builtin.as.ImplicitAs.impl [concrete] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//default, Array, loaded [concrete = constants.%Array] // CHECK:STDOUT: %Core.import_ref.06c923.3: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.dc9 = impl_witness_table (%Core.import_ref.06c923.3), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: } @@ -1037,7 +1068,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %arr.var: ref %array_type = var_storage %arr.var_patt [concrete] -// CHECK:STDOUT: %.loc4_44: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc4_44.1: type = splice_block %.loc4_44.3 [concrete = constants.%array_type] { // CHECK:STDOUT: %.loc4_16: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc4_27: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] @@ -1063,7 +1094,9 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc4_32.2(%.loc4_32.2) [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc4_32.3: Core.IntLiteral = value_of_initializer %i32.builtin.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc4_32.4: Core.IntLiteral = converted %i32.builtin.as.AddWith.impl.Op.call, %.loc4_32.3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type: type = array_type %.loc4_32.4, %.loc4_16 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.call: init type = call constants.%Array(%.loc4_16, %.loc4_32.4) [concrete = constants.%array_type] +// CHECK:STDOUT: %.loc4_44.2: type = value_of_initializer %Array.call [concrete = constants.%array_type] +// CHECK:STDOUT: %.loc4_44.3: type = converted %Array.call, %.loc4_44.2 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %arr: ref %array_type = wrapper_binding arr, %arr.var [concrete = %arr.var] // CHECK:STDOUT: name_binding_decl { @@ -1073,7 +1106,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @As(imports.%Core.import_ref.b3bc94.3: type) [from "core.carbon"] { -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] +// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.3a0)] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1091,7 +1124,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @AddWith(imports.%Core.import_ref.b3bc94.6: type) [from "core.carbon"] { -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] +// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.3a0)] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1109,7 +1142,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.b3bc94.9: type) [from "core.carbon"] { -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] +// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.3a0)] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1203,6 +1236,8 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: fn @i32.builtin.as.ImplicitAs.impl.Convert = "int.convert_checked" [from "core.carbon"]; // CHECK:STDOUT: +// CHECK:STDOUT: fn @Array = "array.make_type" [from "core.carbon"]; +// CHECK:STDOUT: // CHECK:STDOUT: fn @Core.IntLiteral.as.ImplicitAs.impl.Convert = "int.convert_checked" [from "core.carbon"]; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -1251,7 +1286,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(constants.%T) { -// CHECK:STDOUT: %T.patt => constants.%T.patt +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0 // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1272,7 +1307,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(constants.%i32.builtin) { -// CHECK:STDOUT: %T.patt => constants.%T.patt +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0 // CHECK:STDOUT: %T => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1303,7 +1338,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddWith(constants.%T) { -// CHECK:STDOUT: %T.patt => constants.%T.patt +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0 // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1325,7 +1360,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddWith(constants.%i32.builtin) { -// CHECK:STDOUT: %T.patt => constants.%T.patt +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0 // CHECK:STDOUT: %T => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1356,7 +1391,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%T) { -// CHECK:STDOUT: %T.patt => constants.%T.patt +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0 // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1377,7 +1412,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) { -// CHECK:STDOUT: %T.patt => constants.%T.patt +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0 // CHECK:STDOUT: %T => Core.IntLiteral // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1397,7 +1432,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) { -// CHECK:STDOUT: %T.patt => constants.%T.patt +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0 // CHECK:STDOUT: %T => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/function/builtin/import.carbon b/toolchain/check/testdata/function/builtin/import.carbon index 0da86b97602c..1f261290991a 100644 --- a/toolchain/check/testdata/function/builtin/import.carbon +++ b/toolchain/check/testdata/function/builtin/import.carbon @@ -20,6 +20,7 @@ package Core library "[[@TEST_NAME]]"; fn MakeIntLiteral() -> type = "int_literal.make_type"; alias IntLiteral = MakeIntLiteral(); fn Int(N: IntLiteral) -> type = "int.make_type_signed"; +fn Array(T: type, N: IntLiteral) -> type = "array.make_type"; fn AsI32(a: IntLiteral) -> i32 = "int.convert_checked"; fn AsIntLiteral(a: i32) -> IntLiteral = "int.convert_checked"; @@ -47,6 +48,10 @@ var arr: array(i32, Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)) // CHECK:STDOUT: %N.patt: %pattern_type.dc0 = wrapper_binding_pattern N, %N.param_patt [concrete] // CHECK:STDOUT: %Int.type: type = fn_type @Int [concrete] // CHECK:STDOUT: %Int: %Int.type = struct_value () [concrete] +// CHECK:STDOUT: %T.param_patt: %pattern_type.9a5 = value_param_pattern [concrete] +// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = wrapper_binding_pattern T, %T.param_patt [concrete] +// CHECK:STDOUT: %Array.type: type = fn_type @Array [concrete] +// CHECK:STDOUT: %Array: %Array.type = struct_value () [concrete] // CHECK:STDOUT: %a.param_patt.ba0: %pattern_type.dc0 = value_param_pattern [concrete] // CHECK:STDOUT: %a.patt.b6c: %pattern_type.dc0 = wrapper_binding_pattern a, %a.param_patt.ba0 [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -75,6 +80,7 @@ var arr: array(i32, Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)) // CHECK:STDOUT: .MakeIntLiteral = %MakeIntLiteral.decl // CHECK:STDOUT: .IntLiteral = %IntLiteral // CHECK:STDOUT: .Int = %Int.decl +// CHECK:STDOUT: .Array = %Array.decl // CHECK:STDOUT: .AsI32 = %AsI32.decl // CHECK:STDOUT: .AsIntLiteral = %AsIntLiteral.decl // CHECK:STDOUT: .TestAdd = %TestAdd.decl @@ -107,14 +113,33 @@ var arr: array(i32, Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)) // CHECK:STDOUT: %return.param: ref type = out_param call_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param // CHECK:STDOUT: } +// CHECK:STDOUT: %Array.decl: %Array.type = fn_decl @Array [concrete = constants.%Array] { +// CHECK:STDOUT: %T.param_patt: %pattern_type.9a5 = value_param_pattern [concrete = constants.%T.param_patt] +// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = wrapper_binding_pattern T, %T.param_patt [concrete = constants.%T.patt] +// CHECK:STDOUT: %N.param_patt: %pattern_type.dc0 = value_param_pattern [concrete = constants.%N.param_patt] +// CHECK:STDOUT: %N.patt: %pattern_type.dc0 = wrapper_binding_pattern N, %N.param_patt [concrete = constants.%N.patt] +// CHECK:STDOUT: %return.param_patt: %pattern_type.9a5 = out_param_pattern [concrete = constants.%return.param_patt.90b] +// CHECK:STDOUT: %return.patt: %pattern_type.9a5 = return_slot_pattern %return.param_patt, %.loc8_37.1 [concrete = constants.%return.patt.718] +// CHECK:STDOUT: } { +// CHECK:STDOUT: %.loc8_37.1: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_37.2: Core.Form = init_form %.loc8_37.1 [concrete = constants.%.576] +// CHECK:STDOUT: %T.param: type = value_param call_param0 +// CHECK:STDOUT: %.loc8_13: type = type_literal type [concrete = type] +// CHECK:STDOUT: %T: type = wrapper_binding T, %T.param +// CHECK:STDOUT: %N.param: Core.IntLiteral = value_param call_param1 +// CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, file.%IntLiteral [concrete = Core.IntLiteral] +// CHECK:STDOUT: %N: Core.IntLiteral = wrapper_binding N, %N.param +// CHECK:STDOUT: %return.param: ref type = out_param call_param2 +// CHECK:STDOUT: %return: ref type = return_slot %return.param +// CHECK:STDOUT: } // CHECK:STDOUT: %AsI32.decl: %AsI32.type = fn_decl @AsI32 [concrete = constants.%AsI32] { // CHECK:STDOUT: %a.param_patt: %pattern_type.dc0 = value_param_pattern [concrete = constants.%a.param_patt.ba0] // CHECK:STDOUT: %a.patt: %pattern_type.dc0 = wrapper_binding_pattern a, %a.param_patt [concrete = constants.%a.patt.b6c] // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern [concrete = constants.%return.param_patt.903] -// CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern %return.param_patt, %.loc9_28.1 [concrete = constants.%return.patt.930] +// CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern %return.param_patt, %.loc10_28.1 [concrete = constants.%return.patt.930] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_28.1: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %.loc9_28.2: Core.Form = init_form %.loc9_28.1 [concrete = constants.%.9cb] +// CHECK:STDOUT: %.loc10_28.1: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc10_28.2: Core.Form = init_form %.loc10_28.1 [concrete = constants.%.9cb] // CHECK:STDOUT: %a.param: Core.IntLiteral = value_param call_param0 // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, file.%IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: %a: Core.IntLiteral = wrapper_binding a, %a.param @@ -128,9 +153,9 @@ var arr: array(i32, Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)) // CHECK:STDOUT: %return.patt: %pattern_type.dc0 = return_slot_pattern %return.param_patt, %IntLiteral.ref [concrete = constants.%return.patt.cd4] // CHECK:STDOUT: } { // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, file.%IntLiteral [concrete = Core.IntLiteral] -// CHECK:STDOUT: %.loc10_28: Core.Form = init_form %IntLiteral.ref [concrete = constants.%.f7d] +// CHECK:STDOUT: %.loc11_28: Core.Form = init_form %IntLiteral.ref [concrete = constants.%.f7d] // CHECK:STDOUT: %a.param: %i32.builtin = value_param call_param0 -// CHECK:STDOUT: %.loc10_20: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc11_20: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] // CHECK:STDOUT: %a: %i32.builtin = wrapper_binding a, %a.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param call_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param @@ -141,15 +166,15 @@ var arr: array(i32, Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)) // CHECK:STDOUT: %b.param_patt: %pattern_type.956 = value_param_pattern [concrete = constants.%b.param_patt] // CHECK:STDOUT: %b.patt: %pattern_type.956 = wrapper_binding_pattern b, %b.param_patt [concrete = constants.%b.patt] // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern [concrete = constants.%return.param_patt.903] -// CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern %return.param_patt, %.loc12_31.1 [concrete = constants.%return.patt.930] +// CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern %return.param_patt, %.loc13_31.1 [concrete = constants.%return.patt.930] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_31.1: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %.loc12_31.2: Core.Form = init_form %.loc12_31.1 [concrete = constants.%.9cb] +// CHECK:STDOUT: %.loc13_31.1: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc13_31.2: Core.Form = init_form %.loc13_31.1 [concrete = constants.%.9cb] // CHECK:STDOUT: %a.param: %i32.builtin = value_param call_param0 -// CHECK:STDOUT: %.loc12_15: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc13_15: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] // CHECK:STDOUT: %a: %i32.builtin = wrapper_binding a, %a.param // CHECK:STDOUT: %b.param: %i32.builtin = value_param call_param1 -// CHECK:STDOUT: %.loc12_23: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc13_23: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] // CHECK:STDOUT: %b: %i32.builtin = wrapper_binding b, %b.param // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param call_param2 // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param @@ -160,6 +185,8 @@ var arr: array(i32, Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)) // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%N.param: Core.IntLiteral) -> out %return.param: type = "int.make_type_signed"; // CHECK:STDOUT: +// CHECK:STDOUT: fn @Array(%T.param: type, %N.param: Core.IntLiteral) -> out %return.param: type = "array.make_type"; +// CHECK:STDOUT: // CHECK:STDOUT: fn @AsI32(%a.param: Core.IntLiteral) -> out %return.param: %i32.builtin = "int.convert_checked"; // CHECK:STDOUT: // CHECK:STDOUT: fn @AsIntLiteral(%a.param: %i32.builtin) -> out %return.param: Core.IntLiteral = "int.convert_checked"; @@ -186,6 +213,8 @@ var arr: array(i32, Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)) // CHECK:STDOUT: %int_2.5a1: %i32.builtin = int_value 2 [concrete] // CHECK:STDOUT: %int_3.a0f: %i32.builtin = int_value 3 [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] +// CHECK:STDOUT: %Array.type: type = fn_type @Array [concrete] +// CHECK:STDOUT: %Array: %Array.type = struct_value () [concrete] // CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32.builtin [concrete] // CHECK:STDOUT: %pattern_type.9e2: type = pattern_type %array_type [concrete] // CHECK:STDOUT: %arr.patt: %pattern_type.9e2 = ref_binding_pattern arr [concrete] @@ -202,12 +231,14 @@ var arr: array(i32, Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)) // CHECK:STDOUT: .AsIntLiteral = %Core.AsIntLiteral // CHECK:STDOUT: .TestAdd = %Core.TestAdd // CHECK:STDOUT: .AsI32 = %Core.AsI32 +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: import Core//core // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//core, Int, loaded [concrete = constants.%Int] // CHECK:STDOUT: %Core.AsIntLiteral: %AsIntLiteral.type = import_ref Core//core, AsIntLiteral, loaded [concrete = constants.%AsIntLiteral] // CHECK:STDOUT: %Core.TestAdd: %TestAdd.type = import_ref Core//core, TestAdd, loaded [concrete = constants.%TestAdd] // CHECK:STDOUT: %Core.AsI32: %AsI32.type = import_ref Core//core, AsI32, loaded [concrete = constants.%AsI32] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//core, Array, loaded [concrete = constants.%Array] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -217,7 +248,7 @@ var arr: array(i32, Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)) // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %arr.var: ref %array_type = var_storage %arr.var_patt [concrete] -// CHECK:STDOUT: %.loc4_82: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc4_82.1: type = splice_block %.loc4_82.3 [concrete = constants.%array_type] { // CHECK:STDOUT: %.loc4_16: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin] // CHECK:STDOUT: %Core.ref.loc4_21: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %AsIntLiteral.ref: %AsIntLiteral.type = name_ref AsIntLiteral, imports.%Core.AsIntLiteral [concrete = constants.%AsIntLiteral] @@ -241,7 +272,9 @@ var arr: array(i32, Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)) // CHECK:STDOUT: %AsIntLiteral.call: init Core.IntLiteral = call %AsIntLiteral.ref(%.loc4_80.2) [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc4_81.1: Core.IntLiteral = value_of_initializer %AsIntLiteral.call [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc4_81.2: Core.IntLiteral = converted %AsIntLiteral.call, %.loc4_81.1 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type: type = array_type %.loc4_81.2, %.loc4_16 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.call: init type = call constants.%Array(%.loc4_16, %.loc4_81.2) [concrete = constants.%array_type] +// CHECK:STDOUT: %.loc4_82.2: type = value_of_initializer %Array.call [concrete = constants.%array_type] +// CHECK:STDOUT: %.loc4_82.3: type = converted %Array.call, %.loc4_82.2 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %arr: ref %array_type = wrapper_binding arr, %arr.var [concrete = %arr.var] // CHECK:STDOUT: name_binding_decl { @@ -258,6 +291,8 @@ var arr: array(i32, Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)) // CHECK:STDOUT: // CHECK:STDOUT: fn @AsI32 = "int.convert_checked" [from "core.carbon"]; // CHECK:STDOUT: +// CHECK:STDOUT: fn @Array = "array.make_type" [from "core.carbon"]; +// CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Core.ref.loc4_87: = name_ref Core, imports.%Core [concrete = imports.%Core] diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index c7bf67afa344..328a6432ec68 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -111,19 +111,21 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.69e, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.545: = bound_method %int_3.410, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.771: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %arr.patt: %pattern_type.771 = ref_binding_pattern arr [concrete] -// CHECK:STDOUT: %arr.var_patt: %pattern_type.771 = var_pattern %arr.patt [concrete] -// CHECK:STDOUT: %DefaultOrUnformed.type: type = facet_type <@DefaultOrUnformed> [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Array.b3a: type = class_type @Array, @Array(%i32, %int_3.1ba) [concrete] +// CHECK:STDOUT: %pattern_type.7a1: type = pattern_type %Array.b3a [concrete] +// CHECK:STDOUT: %arr.patt: %pattern_type.7a1 = ref_binding_pattern arr [concrete] +// CHECK:STDOUT: %arr.var_patt: %pattern_type.7a1 = var_pattern %arr.patt [concrete] +// CHECK:STDOUT: %DefaultOrUnformed.type: type = facet_type <@DefaultOrUnformed> [concrete] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.type.150: type = fn_type @T.as.DefaultOrUnformed.impl.Op, @T.as.DefaultOrUnformed.impl(%T.67d) [symbolic] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.53a: %T.as.DefaultOrUnformed.impl.Op.type.150 = struct_value () [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.impl_witness.8fb: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.856, @T.as.DefaultOrUnformed.impl(%array_type) [concrete] -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.type.f29: type = fn_type @T.as.DefaultOrUnformed.impl.Op, @T.as.DefaultOrUnformed.impl(%array_type) [concrete] -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.2c9: %T.as.DefaultOrUnformed.impl.Op.type.f29 = struct_value () [concrete] -// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %array_type, (%DefaultOrUnformed.impl_witness.8fb) [concrete] -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function %T.as.DefaultOrUnformed.impl.Op.2c9, @T.as.DefaultOrUnformed.impl.Op(%array_type) [concrete] +// CHECK:STDOUT: %DefaultOrUnformed.impl_witness.c11: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.856, @T.as.DefaultOrUnformed.impl(%Array.b3a) [concrete] +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.type.042: type = fn_type @T.as.DefaultOrUnformed.impl.Op, @T.as.DefaultOrUnformed.impl(%Array.b3a) [concrete] +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.fd3: %T.as.DefaultOrUnformed.impl.Op.type.042 = struct_value () [concrete] +// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %Array.b3a, (%DefaultOrUnformed.impl_witness.c11) [concrete] +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function %T.as.DefaultOrUnformed.impl.Op.fd3, @T.as.DefaultOrUnformed.impl.Op(%Array.b3a) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -131,6 +133,7 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .As = %Core.As // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -144,6 +147,7 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1aa = impl_witness_table (%Core.import_ref.edf), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.32e: @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert.type (%Int.as.ImplicitAs.impl.Convert.type.48d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert (constants.%Int.as.ImplicitAs.impl.Convert.0f9)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.204 = impl_witness_table (%Core.import_ref.32e), @Int.as.ImplicitAs.impl [concrete] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.DefaultOrUnformed: type = import_ref Core//prelude/parts/default, DefaultOrUnformed, loaded [concrete = constants.%DefaultOrUnformed.type] // CHECK:STDOUT: %Core.import_ref.cc8: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.150) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.53a)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.cc8), @T.as.DefaultOrUnformed.impl [concrete] @@ -162,8 +166,8 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc19: = impl_self_witness @i32.as.I.impl.%i32, @I [concrete = constants.%.2a7] -// CHECK:STDOUT: %arr.var: ref %array_type = var_storage %arr.var_patt [concrete] -// CHECK:STDOUT: %.loc23_40: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %arr.var: ref %Array.b3a = var_storage %arr.var_patt [concrete] +// CHECK:STDOUT: %.loc23_40: type = splice_block %Array [concrete = constants.%Array.b3a] { // CHECK:STDOUT: %i32.loc23_16: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %i32.loc23_27: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -196,12 +200,12 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc23_39.2(%.loc23_39.2) [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc23_39.3: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc23_39.4: Core.IntLiteral = converted %i32.as.I.impl.F.call, %.loc23_39.3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type: type = array_type %.loc23_39.4, %i32.loc23_16 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_3.1ba) [concrete = constants.%Array.b3a] // CHECK:STDOUT: } -// CHECK:STDOUT: %arr: ref %array_type = wrapper_binding arr, %arr.var [concrete = %arr.var] +// CHECK:STDOUT: %arr: ref %Array.b3a = wrapper_binding arr, %arr.var [concrete = %arr.var] // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %arr.patt: %pattern_type.771 = ref_binding_pattern arr [concrete = constants.%arr.patt] -// CHECK:STDOUT: %arr.var_patt: %pattern_type.771 = var_pattern %arr.patt [concrete = constants.%arr.var_patt] +// CHECK:STDOUT: %arr.patt: %pattern_type.7a1 = ref_binding_pattern arr [concrete = constants.%arr.patt] +// CHECK:STDOUT: %arr.var_patt: %pattern_type.7a1 = var_pattern %arr.patt [concrete = constants.%arr.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -297,13 +301,13 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value constants.%array_type, (constants.%DefaultOrUnformed.impl_witness.8fb) [concrete = constants.%DefaultOrUnformed.facet] -// CHECK:STDOUT: %.loc23_41.1: %DefaultOrUnformed.type = converted constants.%array_type, %DefaultOrUnformed.facet [concrete = constants.%DefaultOrUnformed.facet] -// CHECK:STDOUT: %as_type: type = facet_access_type %.loc23_41.1 [concrete = constants.%array_type] -// CHECK:STDOUT: %.loc23_41.2: type = converted %.loc23_41.1, %as_type [concrete = constants.%array_type] -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.2c9, @T.as.DefaultOrUnformed.impl.Op(constants.%array_type) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn] -// CHECK:STDOUT: %.loc23_1: ref %array_type = splice_block file.%arr.var [concrete = file.%arr.var] {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %array_type to %.loc23_1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value constants.%Array.b3a, (constants.%DefaultOrUnformed.impl_witness.c11) [concrete = constants.%DefaultOrUnformed.facet] +// CHECK:STDOUT: %.loc23_41.1: %DefaultOrUnformed.type = converted constants.%Array.b3a, %DefaultOrUnformed.facet [concrete = constants.%DefaultOrUnformed.facet] +// CHECK:STDOUT: %as_type: type = facet_access_type %.loc23_41.1 [concrete = constants.%Array.b3a] +// CHECK:STDOUT: %.loc23_41.2: type = converted %.loc23_41.1, %as_type [concrete = constants.%Array.b3a] +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.fd3, @T.as.DefaultOrUnformed.impl.Op(constants.%Array.b3a) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn] +// CHECK:STDOUT: %.loc23_1: ref %Array.b3a = splice_block file.%arr.var [concrete = file.%arr.var] {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Array.b3a to %.loc23_1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign file.%arr.var, %T.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/param_in_type.carbon b/toolchain/check/testdata/function/generic/param_in_type.carbon index 9d2644ba08fd..e345db694e70 100644 --- a/toolchain/check/testdata/function/generic/param_in_type.carbon +++ b/toolchain/check/testdata/function/generic/param_in_type.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -42,11 +42,13 @@ fn F(generic N: i32, a: array(i32, N)*); // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.69e, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %N.37f, %Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method(%N.37f) [symbolic] -// CHECK:STDOUT: %array_type: type = array_type %Int.as.ImplicitAs.impl.Convert.call, %i32 [symbolic] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [symbolic] -// CHECK:STDOUT: %pattern_type.5a4: type = pattern_type %ptr [symbolic] -// CHECK:STDOUT: %a.param_patt: %pattern_type.5a4 = value_param_pattern [symbolic] -// CHECK:STDOUT: %a.patt: %pattern_type.5a4 = wrapper_binding_pattern a, %a.param_patt [symbolic] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.867: type = class_type @Array, @Array(%i32, %Int.as.ImplicitAs.impl.Convert.call) [symbolic] +// CHECK:STDOUT: %ptr: type = ptr_type %Array.867 [symbolic] +// CHECK:STDOUT: %pattern_type.bdd: type = pattern_type %ptr [symbolic] +// CHECK:STDOUT: %a.param_patt: %pattern_type.bdd = value_param_pattern [symbolic] +// CHECK:STDOUT: %a.patt: %pattern_type.bdd = wrapper_binding_pattern a, %a.param_patt [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -55,6 +57,7 @@ fn F(generic N: i32, a: array(i32, N)*); // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -62,6 +65,7 @@ fn F(generic N: i32, a: array(i32, N)*); // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.32e: @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert.type (%Int.as.ImplicitAs.impl.Convert.type.48d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert (constants.%Int.as.ImplicitAs.impl.Convert.0f9)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.204 = impl_witness_table (%Core.import_ref.32e), @Int.as.ImplicitAs.impl [concrete] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -72,8 +76,8 @@ fn F(generic N: i32, a: array(i32, N)*); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %N.patt.loc15_15.1: %pattern_type.6b6 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc15_15.2 (constants.%N.patt.38a)] -// CHECK:STDOUT: %a.param_patt.loc15_23.1: @F.%pattern_type (%pattern_type.5a4) = value_param_pattern [symbolic = %a.param_patt.loc15_23.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc15_23.1: @F.%pattern_type (%pattern_type.5a4) = wrapper_binding_pattern a, %a.param_patt.loc15_23.1 [symbolic = %a.patt.loc15_23.2 (constants.%a.patt)] +// CHECK:STDOUT: %a.param_patt.loc15_23.1: @F.%pattern_type (%pattern_type.bdd) = value_param_pattern [symbolic = %a.param_patt.loc15_23.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc15_23.1: @F.%pattern_type (%pattern_type.bdd) = wrapper_binding_pattern a, %a.param_patt.loc15_23.1 [symbolic = %a.patt.loc15_23.2 (constants.%a.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc15_17: type = splice_block %i32.loc15_17 [concrete = constants.%i32] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -91,8 +95,8 @@ fn F(generic N: i32, a: array(i32, N)*); // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc15_36.2: init Core.IntLiteral = call %bound_method.loc15_36.3(%N.ref) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: %.loc15_36.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc15_36.2 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: %.loc15_36.2: Core.IntLiteral = converted %N.ref, %.loc15_36.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc15_37.2: type = array_type %.loc15_36.2, %i32.loc15_31 [symbolic = %array_type.loc15_37.1 (constants.%array_type)] -// CHECK:STDOUT: %ptr.loc15_38.2: type = ptr_type %array_type.loc15_37.2 [symbolic = %ptr.loc15_38.1 (constants.%ptr)] +// CHECK:STDOUT: %Array.loc15_37.2: type = class_type @Array, @Array(constants.%i32, constants.%Int.as.ImplicitAs.impl.Convert.call) [symbolic = %Array.loc15_37.1 (constants.%Array.867)] +// CHECK:STDOUT: %ptr.loc15_38.2: type = ptr_type %Array.loc15_37.2 [symbolic = %ptr.loc15_38.1 (constants.%ptr)] // CHECK:STDOUT: } // CHECK:STDOUT: %a: @F.%ptr.loc15_38.1 (%ptr) = wrapper_binding a, %a.param // CHECK:STDOUT: } @@ -104,11 +108,11 @@ fn F(generic N: i32, a: array(i32, N)*); // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %N.loc15_15.1, constants.%Int.as.ImplicitAs.impl.Convert.69e [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] // CHECK:STDOUT: %bound_method.loc15_36.1: = bound_method %N.loc15_15.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc15_36.1 (constants.%bound_method)] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1: init Core.IntLiteral = call %bound_method.loc15_36.1(%N.loc15_15.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc15_37.1: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1, constants.%i32 [symbolic = %array_type.loc15_37.1 (constants.%array_type)] -// CHECK:STDOUT: %ptr.loc15_38.1: type = ptr_type %array_type.loc15_37.1 [symbolic = %ptr.loc15_38.1 (constants.%ptr)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc15_38.1 [symbolic = %pattern_type (constants.%pattern_type.5a4)] -// CHECK:STDOUT: %a.param_patt.loc15_23.2: @F.%pattern_type (%pattern_type.5a4) = value_param_pattern [symbolic = %a.param_patt.loc15_23.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc15_23.2: @F.%pattern_type (%pattern_type.5a4) = wrapper_binding_pattern a, %a.param_patt.loc15_23.2 [symbolic = %a.patt.loc15_23.2 (constants.%a.patt)] +// CHECK:STDOUT: %Array.loc15_37.1: type = class_type @Array, @Array(constants.%i32, %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1) [symbolic = %Array.loc15_37.1 (constants.%Array.867)] +// CHECK:STDOUT: %ptr.loc15_38.1: type = ptr_type %Array.loc15_37.1 [symbolic = %ptr.loc15_38.1 (constants.%ptr)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc15_38.1 [symbolic = %pattern_type (constants.%pattern_type.bdd)] +// CHECK:STDOUT: %a.param_patt.loc15_23.2: @F.%pattern_type (%pattern_type.bdd) = value_param_pattern [symbolic = %a.param_patt.loc15_23.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc15_23.2: @F.%pattern_type (%pattern_type.bdd) = wrapper_binding_pattern a, %a.param_patt.loc15_23.2 [symbolic = %a.patt.loc15_23.2 (constants.%a.patt)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%a.param: @F.%ptr.loc15_38.1 (%ptr)); // CHECK:STDOUT: } @@ -119,9 +123,9 @@ fn F(generic N: i32, a: array(i32, N)*); // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound => constants.%Int.as.ImplicitAs.impl.Convert.bound // CHECK:STDOUT: %bound_method.loc15_36.1 => constants.%bound_method // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1 => constants.%Int.as.ImplicitAs.impl.Convert.call -// CHECK:STDOUT: %array_type.loc15_37.1 => constants.%array_type +// CHECK:STDOUT: %Array.loc15_37.1 => constants.%Array.867 // CHECK:STDOUT: %ptr.loc15_38.1 => constants.%ptr -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.5a4 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.bdd // CHECK:STDOUT: %a.param_patt.loc15_23.2 => constants.%a.param_patt // CHECK:STDOUT: %a.patt.loc15_23.2 => constants.%a.patt // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/return_slot.carbon b/toolchain/check/testdata/function/generic/return_slot.carbon index 5296f25b79d5..d9002702c45a 100644 --- a/toolchain/check/testdata/function/generic/return_slot.carbon +++ b/toolchain/check/testdata/function/generic/return_slot.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -52,13 +52,15 @@ fn G() { // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_100: Core.IntLiteral = int_value 100 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_100, %i32 [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.b94: type = class_type @Array, @Array(%i32, %int_100) [concrete] // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete] // CHECK:STDOUT: %complete_type.f8a: = complete_type_witness %i32.builtin [concrete] -// CHECK:STDOUT: %pattern_type.3eb: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %array_type [concrete] -// CHECK:STDOUT: %struct_type.arr.fdc: type = struct_type {.arr: %array_type} [concrete] -// CHECK:STDOUT: %complete_type.18e: = complete_type_witness %struct_type.arr.fdc [concrete] +// CHECK:STDOUT: %pattern_type.89e: type = pattern_type %Array.b94 [concrete] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %Array.b94 [concrete] +// CHECK:STDOUT: %struct_type.arr.4b7: type = struct_type {.arr: %Array.b94} [concrete] +// CHECK:STDOUT: %complete_type.712: = complete_type_witness %struct_type.arr.4b7 [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.6b6: type = pattern_type %i32 [concrete] @@ -101,8 +103,8 @@ fn G() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.cc7: %pattern_type.3eb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.0e5: %pattern_type.3eb = wrapper_binding_pattern self, %self.param_patt.cc7 [concrete] +// CHECK:STDOUT: %self.param_patt.ac6: %pattern_type.89e = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.7fb: %pattern_type.89e = wrapper_binding_pattern self, %self.param_patt.ac6 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %int_99: Core.IntLiteral = int_value 99 [concrete] @@ -208,9 +210,9 @@ fn G() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.38e: type = pattern_type %struct_type.arr.fdc [concrete] -// CHECK:STDOUT: %self.param_patt.96e: %pattern_type.38e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.401: %pattern_type.38e = wrapper_binding_pattern self, %self.param_patt.96e [concrete] +// CHECK:STDOUT: %pattern_type.82b: type = pattern_type %struct_type.arr.4b7 [concrete] +// CHECK:STDOUT: %self.param_patt.09c: %pattern_type.82b = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.a93: %pattern_type.82b = wrapper_binding_pattern self, %self.param_patt.09c [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc24_3.3 [concrete] @@ -237,11 +239,13 @@ fn G() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -261,32 +265,32 @@ fn G() { // CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3eb = ref_param_pattern [concrete = constants.%self.param_patt.cc7] -// CHECK:STDOUT: %self.patt: %pattern_type.3eb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0e5] +// CHECK:STDOUT: %self.param_patt: %pattern_type.89e = ref_param_pattern [concrete = constants.%self.param_patt.ac6] +// CHECK:STDOUT: %self.patt: %pattern_type.89e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7fb] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.b94 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.b94 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3eb = ref_param_pattern [concrete = constants.%self.param_patt.cc7] -// CHECK:STDOUT: %self.patt: %pattern_type.3eb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0e5] +// CHECK:STDOUT: %self.param_patt: %pattern_type.89e = ref_param_pattern [concrete = constants.%self.param_patt.ac6] +// CHECK:STDOUT: %self.patt: %pattern_type.89e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7fb] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.b94 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.b94 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.38e = ref_param_pattern [concrete = constants.%self.param_patt.96e] -// CHECK:STDOUT: %self.patt: %pattern_type.38e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.401] +// CHECK:STDOUT: %self.param_patt: %pattern_type.82b = ref_param_pattern [concrete = constants.%self.param_patt.09c] +// CHECK:STDOUT: %self.patt: %pattern_type.82b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a93] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.arr.fdc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.arr.fdc = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %struct_type.arr.4b7 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %struct_type.arr.4b7 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc24_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.38e = ref_param_pattern [concrete = constants.%self.param_patt.96e] -// CHECK:STDOUT: %self.patt: %pattern_type.38e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.401] +// CHECK:STDOUT: %self.param_patt: %pattern_type.82b = ref_param_pattern [concrete = constants.%self.param_patt.09c] +// CHECK:STDOUT: %self.patt: %pattern_type.82b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a93] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.arr.fdc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.arr.fdc = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %struct_type.arr.4b7 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %struct_type.arr.4b7 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { // CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] @@ -368,12 +372,12 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %field_decl: %C.elem = field_decl arr, element0, %array_type in [concrete] { +// CHECK:STDOUT: %field_decl: %C.elem = field_decl arr, element0, %Array in [concrete] { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_100: Core.IntLiteral = int_value 100 [concrete = constants.%int_100] -// CHECK:STDOUT: %array_type: type = array_type %int_100, %i32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_100) [concrete = constants.%Array.b94] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.arr.fdc [concrete = constants.%complete_type.18e] +// CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.arr.4b7 [concrete = constants.%complete_type.712] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -477,7 +481,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %Array.b94) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_99: Core.IntLiteral = int_value 99 [concrete = constants.%int_99] // CHECK:STDOUT: %.loc24_3.1: ref %i32 = array_index %self.param, %int_99 @@ -882,26 +886,26 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.b94) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %Array.b94) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.3(%self.param: ref %struct_type.arr.fdc) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.3(%self.param: ref %struct_type.arr.4b7) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc24: ref %array_type = struct_access %self.param, element0 +// CHECK:STDOUT: %.loc24: ref %Array.b94 = struct_access %self.param, element0 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc24, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc24) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.3(%self.param: ref %struct_type.arr.fdc) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.3(%self.param: ref %struct_type.arr.4b7) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.3(%self.param: ref %struct_type.arr.fdc) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.3(%self.param: ref %struct_type.arr.4b7) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) @@ -911,7 +915,7 @@ fn G() { // CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.4(%self.param: ref %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %arr.ref: %C.elem = name_ref arr, @C.%field_decl [concrete = @C.%field_decl] -// CHECK:STDOUT: %.loc24: ref %array_type = class_element_access %self.param, element0 +// CHECK:STDOUT: %.loc24: ref %Array.b94 = class_element_access %self.param, element0 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc24, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc24) // CHECK:STDOUT: return @@ -1023,7 +1027,7 @@ fn G() { // CHECK:STDOUT: %return.patt.loc16_13.2 => constants.%return.patt.e4a // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.18e +// CHECK:STDOUT: %require_complete => constants.%complete_type.712 // CHECK:STDOUT: %Wrap.Make.type => constants.%Wrap.Make.type.bd1 // CHECK:STDOUT: %Wrap.Make => constants.%Wrap.Make.83f // CHECK:STDOUT: %Wrap.Make.specific_fn.loc16_27.2 => constants.%Wrap.Make.specific_fn.c96 diff --git a/toolchain/check/testdata/generic/extend_type_completion.carbon b/toolchain/check/testdata/generic/extend_type_completion.carbon index f0661e9766a9..0dce9a30dd78 100644 --- a/toolchain/check/testdata/generic/extend_type_completion.carbon +++ b/toolchain/check/testdata/generic/extend_type_completion.carbon @@ -13,10 +13,13 @@ // --- class_impl_doesnt_need_complete_interface.carbon library "[[@TEST_NAME]]"; +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + interface K(T: type) {} class C(N: i32) { - impl as K(array(i32, N)) {} + impl as K(Array(i32, N)) {} } // C does not extend K so the type of K is not completed. No error. @@ -25,10 +28,13 @@ fn F(unused v: C(-1)) {} // --- fail_class_extend_impl_does_need_complete_interface.carbon library "[[@TEST_NAME]]"; +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + interface K(T: type) {} class C(N: i32) { - extend impl as K(array(i32, N)) {} + extend impl as K(Array(i32, N)) {} } // C extends K so the type of K is completed, but is invalid. @@ -36,7 +42,7 @@ class C(N: i32) { // CHECK:STDERR: fn F(unused v: C(-1)) {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_class_extend_impl_does_need_complete_interface.carbon:[[@LINE-7]]:18: note: array bound of -1 is negative [ArrayBoundNegative] -// CHECK:STDERR: extend impl as K(array(i32, N)) {} +// CHECK:STDERR: extend impl as K(Array(i32, N)) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: fn F(unused v: C(-1)) {} @@ -44,9 +50,12 @@ fn F(unused v: C(-1)) {} // --- interface_require_impls_doesnt_need_complete_interface.carbon library "[[@TEST_NAME]]"; +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + interface K(T: type) {} interface J(N: i32) { - require impls K(array(i32, N)); + require impls K(Array(i32, N)); } // J does not extend K so the type of K is not completed. No error. @@ -55,9 +64,12 @@ fn F(unused v: J(-1)) {} // --- fail_interface_extend_require_impls_does_need_complete_interface.carbon library "[[@TEST_NAME]]"; +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + interface K(T: type) {} interface J(N: i32) { - extend require impls K(array(i32, N)); + extend require impls K(Array(i32, N)); } interface I(N: i32) { extend require impls J(N); @@ -76,7 +88,7 @@ interface I(N: i32) { // CHECK:STDERR: extend require impls J(N); // CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE-18]]:24: note: array bound of -1 is negative [ArrayBoundNegative] -// CHECK:STDERR: extend require impls K(array(i32, N)); +// CHECK:STDERR: extend require impls K(Array(i32, N)); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: fn F(unused v: I(-1)) {} @@ -84,9 +96,12 @@ fn F(unused v: I(-1)) {} // --- constraint_require_impls_doesnt_need_complete_interface.carbon library "[[@TEST_NAME]]"; +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + interface K(T: type) {} constraint J(N: i32) { - require impls K(array(i32, N)); + require impls K(Array(i32, N)); } // J does not extend K so the type of K is not completed. No error. @@ -95,9 +110,12 @@ fn F(unused v: J(-1)) {} // --- fail_constraint_extend_require_impls_does_need_complete_interface.carbon library "[[@TEST_NAME]]"; +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + interface K(T: type) {} constraint J(N: i32) { - extend require impls K(array(i32, N)); + extend require impls K(Array(i32, N)); } constraint I(N: i32) { extend require impls J(N); @@ -111,7 +129,7 @@ constraint I(N: i32) { // CHECK:STDERR: extend require impls J(N); // CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE-13]]:24: note: array bound of -1 is negative [ArrayBoundNegative] -// CHECK:STDERR: extend require impls K(array(i32, N)); +// CHECK:STDERR: extend require impls K(Array(i32, N)); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: fn F(unused v: I(-1)) {} @@ -119,9 +137,12 @@ fn F(unused v: I(-1)) {} // --- interface_require_impls_doesnt_need_complete_self.carbon library "[[@TEST_NAME]]"; +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + interface K {} interface J(N: i32) { - require array(Self, N) impls K; + require Array(Self, N) impls K; } // J does not extend K so the type of Self impling K is not completed. No error. @@ -130,9 +151,12 @@ fn F(unused v: J(-1)) {} // --- constraint_require_impls_doesnt_need_complete_self.carbon library "[[@TEST_NAME]]"; +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + interface K {} constraint J(N: i32) { - require array(Self, N) impls K; + require Array(Self, N) impls K; } // J does not extend K so the type of Self impling K is not completed. No error. diff --git a/toolchain/check/testdata/generic/identify_specific_facet_type.carbon b/toolchain/check/testdata/generic/identify_specific_facet_type.carbon index bc13b14df701..f0f29c294d3e 100644 --- a/toolchain/check/testdata/generic/identify_specific_facet_type.carbon +++ b/toolchain/check/testdata/generic/identify_specific_facet_type.carbon @@ -13,12 +13,15 @@ // --- fail_error_in_identifying_require_facet_type.carbon library "[[@TEST_NAME]]"; -// Identification tries to form the specific interface `K(array(i32, -1))` which +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + +// Identification tries to form the specific interface `K(Array(i32, -1))` which // is invalid, so the impl as a whole is invalid. interface K(T: type) {} constraint L(N: i32) { - require impls K(array(i32, N)); + require impls K(Array(i32, N)); } constraint J(N: i32) { require impls L(N); @@ -28,7 +31,7 @@ constraint J(N: i32) { // CHECK:STDERR: impl {} as J(-1) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_error_in_identifying_require_facet_type.carbon:[[@LINE-9]]:30: note: array bound of -1 is negative [ArrayBoundNegative] -// CHECK:STDERR: require impls K(array(i32, N)); +// CHECK:STDERR: require impls K(Array(i32, N)); // CHECK:STDERR: ^ // CHECK:STDERR: impl {} as J(-1) {} @@ -36,19 +39,22 @@ impl {} as J(-1) {} // --- fail_error_in_identifying_extend_require_facet_type.carbon library "[[@TEST_NAME]]"; -// Identification tries to form the specific interface `K(array(i32, -1))` which +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + +// Identification tries to form the specific interface `K(Array(i32, -1))` which // is invalid, so the impl as a whole is invalid. interface K(T: type) {} constraint J(N: i32) { - extend require impls K(array(i32, N)); + extend require impls K(Array(i32, N)); } // CHECK:STDERR: fail_error_in_identifying_extend_require_facet_type.carbon:[[@LINE+7]]:1: error: facet type `J(-1)` cannot be identified in `impl as` [ImplOfUnidentifiedFacetType] // CHECK:STDERR: impl {} as J(-1) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_error_in_identifying_extend_require_facet_type.carbon:[[@LINE-6]]:24: note: array bound of -1 is negative [ArrayBoundNegative] -// CHECK:STDERR: extend require impls K(array(i32, N)); +// CHECK:STDERR: extend require impls K(Array(i32, N)); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: impl {} as J(-1) {} @@ -56,9 +62,12 @@ impl {} as J(-1) {} // --- fail_monomorphization_during_period_self_substitution.carbon library "[[@TEST_NAME]]"; +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + interface Y {} interface CanFailToMonomorphize(N: Core.IntLiteral) { - let Z1: array((), N); + let Z1: Array((), N); let Z2: type; } @@ -85,7 +94,7 @@ fn G(generic T: Y) { // CHECK:STDERR: extend require impls CanFailToMonomorphize(N); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_monomorphization_during_period_self_substitution.carbon:[[@LINE-26]]:21: note: array bound of -1 is negative [ArrayBoundNegative] - // CHECK:STDERR: let Z1: array((), N); + // CHECK:STDERR: let Z1: Array((), N); // CHECK:STDERR: ^ // CHECK:STDERR: fail_monomorphization_during_period_self_substitution.carbon:[[@LINE-12]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z2 impls Y) {} @@ -97,13 +106,16 @@ fn G(generic T: Y) { // --- fail_monomorphization_identify_in_call.carbon library "[[@TEST_NAME]]"; +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + interface Y {} interface Z { let Z1: type; } constraint S(N: Core.IntLiteral) { - extend require impls Z where .Z1 = array((), N); + extend require impls Z where .Z1 = Array((), N); } fn F(generic N: Core.IntLiteral, generic _: S(N)) {} @@ -113,7 +125,7 @@ fn G(generic T: Z) { // CHECK:STDERR: F(-1, T); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_monomorphization_identify_in_call.carbon:[[@LINE-9]]:24: note: array bound of -1 is negative [ArrayBoundNegative] - // CHECK:STDERR: extend require impls Z where .Z1 = array((), N); + // CHECK:STDERR: extend require impls Z where .Z1 = Array((), N); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_monomorphization_identify_in_call.carbon:[[@LINE-9]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn F(generic N: Core.IntLiteral, generic _: S(N)) {} @@ -125,6 +137,9 @@ fn G(generic T: Z) { // --- fail_monomorphization_during_deduction_in_call.carbon library "[[@TEST_NAME]]"; +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + interface Y {} interface Z { let Z1: type; @@ -134,17 +149,17 @@ constraint S(N: Core.IntLiteral) { extend require impls Z; } -fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z1 = array((), N)) {} +fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z1 = Array((), N)) {} fn G(generic T: Z) { - // CHECK:STDERR: fail_monomorphization_during_deduction_in_call.carbon:[[@LINE+10]]:3: error: constructed invalid specific for `S(N) where .(Z.Z1) = array((), N)` from argument [SubstitutingGenericParamType] + // CHECK:STDERR: fail_monomorphization_during_deduction_in_call.carbon:[[@LINE+10]]:3: error: constructed invalid specific for `S(N) where .(Z.Z1) = ` from argument [SubstitutingGenericParamType] // CHECK:STDERR: F(-1, T); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_monomorphization_during_deduction_in_call.carbon:[[@LINE-6]]:42: note: array bound of -1 is negative [ArrayBoundNegative] - // CHECK:STDERR: fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z1 = array((), N)) {} + // CHECK:STDERR: fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z1 = Array((), N)) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_monomorphization_during_deduction_in_call.carbon:[[@LINE-9]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z1 = array((), N)) {} + // CHECK:STDERR: fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z1 = Array((), N)) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(-1, T); diff --git a/toolchain/check/testdata/generic/template/convert.carbon b/toolchain/check/testdata/generic/template/convert.carbon index 71e9534af610..d09a709b0cca 100644 --- a/toolchain/check/testdata/generic/template/convert.carbon +++ b/toolchain/check/testdata/generic/template/convert.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -796,12 +796,12 @@ fn F() { // CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0, template [template] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template] +// CHECK:STDOUT: %T.67db0b.1: type = symbolic_binding T, 0, template [template] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.944: = require_complete_type %T [template] -// CHECK:STDOUT: %pattern_type.51d1c4.1: type = pattern_type %T [template] +// CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67db0b.1 [template] +// CHECK:STDOUT: %pattern_type.51d1c4.1: type = pattern_type %T.67db0b.1 [template] // CHECK:STDOUT: %w.patt.f6d: %pattern_type.51d1c4.1 = ref_binding_pattern w [template] // CHECK:STDOUT: %w.var_patt.7fe: %pattern_type.51d1c4.1 = var_pattern %w.patt.f6d [template] // CHECK:STDOUT: %tuple.type.92e: type = tuple_type (%X, %X, %X) [concrete] @@ -809,7 +809,7 @@ fn F() { // CHECK:STDOUT: %.4e3: %X = splice_inst @F.%tuple.elem1 [template] // CHECK:STDOUT: %.c57: %X = splice_inst @F.%tuple.elem2 [template] // CHECK:STDOUT: %.ceb: %X = splice_inst @F.%tuple.elem3 [template] -// CHECK:STDOUT: %.b00: %T = splice_inst @F.%tuple.elem0 [template] +// CHECK:STDOUT: %.b00: %T.67db0b.1 = splice_inst @F.%tuple.elem0 [template] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Self.0e7: %Destroy.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.4e5: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self.0e7) [symbolic] @@ -830,7 +830,7 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.836 = facet_value %tuple.type.92e, (%ImplicitAs.impl_witness) [concrete] // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.354: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%Y, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %X [concrete] +// CHECK:STDOUT: %Array.452: type = class_type @Array, @Array(%X, %int_3) [concrete] // CHECK:STDOUT: %complete_type.8ad: = complete_type_witness %tuple.type.92e [concrete] // CHECK:STDOUT: %w.patt.689: %pattern_type.eca = ref_binding_pattern w [concrete] // CHECK:STDOUT: %w.var_patt.e50: %pattern_type.eca = var_pattern %w.patt.689 [concrete] @@ -890,35 +890,36 @@ fn F() { // CHECK:STDOUT: %inst.call.426619.1: = inst_value [concrete] { // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.67d: init %empty_tuple.type = call %.955(%.b1e3d3.1) // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type.3e8: = complete_type_witness %array_type [concrete] -// CHECK:STDOUT: %pattern_type.92a: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %w.patt.f13: %pattern_type.92a = ref_binding_pattern w [concrete] -// CHECK:STDOUT: %w.var_patt.c83: %pattern_type.92a = var_pattern %w.patt.f13 [concrete] +// CHECK:STDOUT: %array_type.4c0: type = array_type %int_3, %X [concrete] +// CHECK:STDOUT: %complete_type.3e8: = complete_type_witness %array_type.4c0 [concrete] +// CHECK:STDOUT: %pattern_type.6a3: type = pattern_type %Array.452 [concrete] +// CHECK:STDOUT: %w.patt.e6a: %pattern_type.6a3 = ref_binding_pattern w [concrete] +// CHECK:STDOUT: %w.var_patt.f99: %pattern_type.6a3 = var_pattern %w.patt.e6a [concrete] // CHECK:STDOUT: %inst.array_init: = inst_value [concrete] { -// CHECK:STDOUT: %.dc3: init %array_type to %.c5e285.2 = array_init (@F.%Make.call.loc9_27, @F.%Make.call.loc9_35, @F.%Make.call.loc9_43) +// CHECK:STDOUT: %.e6d: init %Array.452 to %.13fe15.2 = array_init (@F.%Make.call.loc9_27, @F.%Make.call.loc9_35, @F.%Make.call.loc9_43) // CHECK:STDOUT: } // CHECK:STDOUT: %inst.splice_block.426619.3: = inst_value [concrete] { -// CHECK:STDOUT: %.c80: ref %X = splice_block %.f75 { -// CHECK:STDOUT: %.c5e285.2: ref %array_type = specific_inst @F.%w.var, @F(%array_type) +// CHECK:STDOUT: %.b18: ref %X = splice_block %.5d0 { +// CHECK:STDOUT: %.13fe15.2: ref %Array.452 = specific_inst @F.%w.var, @F(%Array.452) // CHECK:STDOUT: %int_0.5c61a1.2: Core.IntLiteral = int_value 0 [concrete = %int_0.5c61a1.1] -// CHECK:STDOUT: %.f75: ref %X = array_index %.c5e285.2, %int_0.5c61a1.2 +// CHECK:STDOUT: %.5d0: ref %X = array_index %.13fe15.2, %int_0.5c61a1.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %inst.splice_block.426619.4: = inst_value [concrete] { -// CHECK:STDOUT: %.53e: ref %X = splice_block %.efc { +// CHECK:STDOUT: %.7af: ref %X = splice_block %.502 { // CHECK:STDOUT: %int_1.5b8115.2: Core.IntLiteral = int_value 1 [concrete = %int_1.5b8115.1] -// CHECK:STDOUT: %.efc: ref %X = array_index %.c5e285.2, %int_1.5b8115.2 +// CHECK:STDOUT: %.502: ref %X = array_index %.13fe15.2, %int_1.5b8115.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %inst.splice_block.426619.5: = inst_value [concrete] { -// CHECK:STDOUT: %.1e2: ref %X = splice_block %.d3b { +// CHECK:STDOUT: %.c64: ref %X = splice_block %.5c5 { // CHECK:STDOUT: %int_2.ecc8af.2: Core.IntLiteral = int_value 2 [concrete = %int_2.ecc8af.1] -// CHECK:STDOUT: %.d3b: ref %X = array_index %.c5e285.2, %int_2.ecc8af.2 +// CHECK:STDOUT: %.5c5: ref %X = array_index %.13fe15.2, %int_2.ecc8af.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %tuple.1ed7a0.2: %tuple.type.f39 = tuple_value (%inst.array_init, %inst.splice_block.426619.3, %inst.splice_block.426619.4, %inst.splice_block.426619.5) [concrete] -// CHECK:STDOUT: %self.param_patt.8dc: %pattern_type.92a = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.6fb: %pattern_type.92a = wrapper_binding_pattern self, %self.param_patt.8dc [concrete] +// CHECK:STDOUT: %self.param_patt.7cc: %pattern_type.6a3 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.c38: %pattern_type.6a3 = wrapper_binding_pattern self, %self.param_patt.7cc [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.4 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc9_3.4 [concrete] @@ -926,18 +927,18 @@ fn F() { // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.4 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.f8f19d.4: = custom_witness (%Destroy.WithSelf.Op.403171.4, %Destroy.WithSelf.SubobjectDestroy.d01daf.4, %Destroy.WithSelf.SelfDestruct.db3fdb.4), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.792: %Destroy.type = facet_value %array_type, (%custom_witness.f8f19d.4) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.387: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.792) [concrete] -// CHECK:STDOUT: %.e83: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.387, %Destroy.facet.792 [concrete] +// CHECK:STDOUT: %Destroy.facet.a53: %Destroy.type = facet_value %Array.452, (%custom_witness.f8f19d.4) [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.229: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.a53) [concrete] +// CHECK:STDOUT: %.6d5: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.229, %Destroy.facet.a53 [concrete] // CHECK:STDOUT: %inst.splice_block.426619.6: = inst_value [concrete] { -// CHECK:STDOUT: %.85a: = splice_block %bound_method.5ba { -// CHECK:STDOUT: %.c5e285.1: ref %array_type = specific_inst @F.%w.var, @F(%array_type) -// CHECK:STDOUT: %impl.elem2.96d: %.e83 = impl_witness_access %custom_witness.f8f19d.4, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.4] -// CHECK:STDOUT: %bound_method.5ba: = bound_method %.c5e285.1, %impl.elem2.96d +// CHECK:STDOUT: %.caa: = splice_block %bound_method.784 { +// CHECK:STDOUT: %.13fe15.1: ref %Array.452 = specific_inst @F.%w.var, @F(%Array.452) +// CHECK:STDOUT: %impl.elem2.b98: %.6d5 = impl_witness_access %custom_witness.f8f19d.4, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.4] +// CHECK:STDOUT: %bound_method.784: = bound_method %.13fe15.1, %impl.elem2.b98 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %inst.call.426619.2: = inst_value [concrete] { -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.014: init %empty_tuple.type = call %.85a(%.c5e285.1) +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.8a0: init %empty_tuple.type = call %.caa(%.13fe15.1) // CHECK:STDOUT: } // CHECK:STDOUT: %w.patt.22a: %pattern_type.7ab = ref_binding_pattern w [concrete] // CHECK:STDOUT: %w.var_patt.565: %pattern_type.7ab = var_pattern %w.patt.22a [concrete] @@ -1040,18 +1041,18 @@ fn F() { // CHECK:STDOUT: %self: ref %tuple.type.92e = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.92a = ref_param_pattern [concrete = constants.%self.param_patt.8dc] -// CHECK:STDOUT: %self.patt: %pattern_type.92a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6fb] +// CHECK:STDOUT: %self.param_patt: %pattern_type.6a3 = ref_param_pattern [concrete = constants.%self.param_patt.7cc] +// CHECK:STDOUT: %self.patt: %pattern_type.6a3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c38] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.452 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.452 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc9_3.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.92a = ref_param_pattern [concrete = constants.%self.param_patt.8dc] -// CHECK:STDOUT: %self.patt: %pattern_type.92a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6fb] +// CHECK:STDOUT: %self.param_patt: %pattern_type.6a3 = ref_param_pattern [concrete = constants.%self.param_patt.7cc] +// CHECK:STDOUT: %self.patt: %pattern_type.6a3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c38] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.452 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.452 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { // CHECK:STDOUT: %self.param_patt: %pattern_type.7ab = ref_param_pattern [concrete = constants.%self.param_patt.1fb] @@ -1071,19 +1072,19 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc8_16.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc8_16.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_16.2: type = symbolic_binding T, 0, template [template = %T.loc8_16.1 (constants.%T)] +// CHECK:STDOUT: %T.loc8_16.2: type = symbolic_binding T, 0, template [template = %T.loc8_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc8_16.2: type) { -// CHECK:STDOUT: %T.patt.loc8_16.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc8_16.1: type = symbolic_binding T, 0, template [template = %T.loc8_16.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc8_16.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc8_16.1: type = symbolic_binding T, 0, template [template = %T.loc8_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc8_16.1 [template = %require_complete (constants.%require_complete.944)] @@ -1098,7 +1099,7 @@ fn F() { // CHECK:STDOUT: %.loc9_3.11: %X = splice_inst %tuple.elem2 [template = %.loc9_3.11 (constants.%.c57)] // CHECK:STDOUT: %tuple.elem3: = tuple_access %.loc9_3.9, element3 [template] // CHECK:STDOUT: %.loc9_3.12: %X = splice_inst %tuple.elem3 [template = %.loc9_3.12 (constants.%.ceb)] -// CHECK:STDOUT: %.loc9_3.13: @F.%T.loc8_16.1 (%T) = splice_inst %tuple.elem0 [template = %.loc9_3.13 (constants.%.b00)] +// CHECK:STDOUT: %.loc9_3.13: @F.%T.loc8_16.1 (%T.67db0b.1) = splice_inst %tuple.elem0 [template = %.loc9_3.13 (constants.%.b00)] // CHECK:STDOUT: %.loc9_3.14: = compound_member_access_action %w.var, constants.%assoc2 [template] // CHECK:STDOUT: %.loc9_3.15: type = type_of_inst %.loc9_3.14 [template = %.loc9_3.15 (constants.%.8cb)] // CHECK:STDOUT: %.loc9_3.16: @F.%.loc9_3.15 (%.8cb) = splice_inst %.loc9_3.14 [template = %.loc9_3.16 (constants.%.c23)] @@ -1108,7 +1109,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %w.var: ref @F.%T.loc8_16.1 (%T) = var_storage %w.var_patt.loc9_3.1 +// CHECK:STDOUT: %w.var: ref @F.%T.loc8_16.1 (%T.67db0b.1) = var_storage %w.var_patt.loc9_3.1 // CHECK:STDOUT: %Make.ref.loc9_22: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] // CHECK:STDOUT: %.loc9_3.1: %X = splice_inst %tuple.elem1 [template = %.loc9_3.10 (constants.%.4e3)] // CHECK:STDOUT: %Make.call.loc9_27: init %X to %.loc9_3.1 = call %Make.ref.loc9_22() @@ -1119,10 +1120,10 @@ fn F() { // CHECK:STDOUT: %.loc9_3.3: %X = splice_inst %tuple.elem3 [template = %.loc9_3.12 (constants.%.ceb)] // CHECK:STDOUT: %Make.call.loc9_43: init %X to %.loc9_3.3 = call %Make.ref.loc9_38() // CHECK:STDOUT: %.loc9_44: %tuple.type.92e = tuple_literal (%Make.call.loc9_27, %Make.call.loc9_35, %Make.call.loc9_43) -// CHECK:STDOUT: %.loc9_3.4: @F.%T.loc8_16.1 (%T) = splice_inst %tuple.elem0 [template = %.loc9_3.13 (constants.%.b00)] +// CHECK:STDOUT: %.loc9_3.4: @F.%T.loc8_16.1 (%T.67db0b.1) = splice_inst %tuple.elem0 [template = %.loc9_3.13 (constants.%.b00)] // CHECK:STDOUT: assign %w.var, %.loc9_3.4 -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_16.2 [template = %T.loc8_16.1 (constants.%T)] -// CHECK:STDOUT: %w: ref @F.%T.loc8_16.1 (%T) = wrapper_binding w, %w.var +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_16.2 [template = %T.loc8_16.1 (constants.%T.67db0b.1)] +// CHECK:STDOUT: %w: ref @F.%T.loc8_16.1 (%T.67db0b.1) = wrapper_binding w, %w.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %w.patt.loc9_15.1: @F.%pattern_type (%pattern_type.51d1c4.1) = ref_binding_pattern w [template = %w.patt.loc9_15.2 (constants.%w.patt.f6d)] // CHECK:STDOUT: %w.var_patt.loc9_3.1: @F.%pattern_type (%pattern_type.51d1c4.1) = var_pattern %w.patt.loc9_15.1 [template = %w.var_patt.loc9_3.2 (constants.%w.var_patt.7fe)] @@ -1183,7 +1184,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.4(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.4(%self.param: ref %Array.452) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc8af.1] // CHECK:STDOUT: %.loc9_3.1: ref %X = array_index %self.param, %int_2 @@ -1200,9 +1201,9 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.4(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.4(%self.param: ref %Array.452) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.4(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.4(%self.param: ref %Array.452) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) @@ -1220,13 +1221,13 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_16.1 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.67db0b.1) { +// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc8_16.1 => constants.%T.67db0b.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%tuple.type.92e) { -// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc8_16.1 => constants.%tuple.type.92e // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1251,15 +1252,15 @@ fn F() { // CHECK:STDOUT: %.loc9_3.19 => // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%array_type) { -// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_16.1 => constants.%array_type +// CHECK:STDOUT: specific @F(constants.%Array.452) { +// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc8_16.1 => constants.%Array.452 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.3e8 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.92a -// CHECK:STDOUT: %w.patt.loc9_15.2 => constants.%w.patt.f13 -// CHECK:STDOUT: %w.var_patt.loc9_3.2 => constants.%w.var_patt.c83 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.6a3 +// CHECK:STDOUT: %w.patt.loc9_15.2 => constants.%w.patt.e6a +// CHECK:STDOUT: %w.var_patt.loc9_3.2 => constants.%w.var_patt.f99 // CHECK:STDOUT: %.loc9_3.9 => constants.%tuple.1ed7a0.2 // CHECK:STDOUT: %tuple.elem0 => constants.%inst.array_init // CHECK:STDOUT: %tuple.elem1 => constants.%inst.splice_block.426619.3 @@ -1278,7 +1279,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Y) { -// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc8_16.1 => constants.%Y // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index b307d352f91b..37e560ebe9c3 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -28,7 +28,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.6b6: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %n.param_patt: %pattern_type.6b6 = value_param_pattern [concrete] @@ -41,10 +41,12 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.97e: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %x.patt: %pattern_type.97e = ref_binding_pattern x [concrete] -// CHECK:STDOUT: %x.var_patt: %pattern_type.97e = var_pattern %x.patt [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.096: type = class_type @Array, @Array(%i32, %int_1) [concrete] +// CHECK:STDOUT: %pattern_type.297: type = pattern_type %Array.096 [concrete] +// CHECK:STDOUT: %x.patt: %pattern_type.297 = ref_binding_pattern x [concrete] +// CHECK:STDOUT: %x.var_patt: %pattern_type.297 = var_pattern %x.patt [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] // CHECK:STDOUT: %tuple.4f2: %tuple.type.985 = tuple_value (%int_0.5c6) [concrete] @@ -64,9 +66,9 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.3c0: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.3c0) [concrete] +// CHECK:STDOUT: %array: %Array.096 = tuple_value (%int_0.3c0) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.b51: = impl_witness imports.%Copy.impl_witness_table.8d2, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3f6: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] @@ -84,8 +86,8 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.dc5: %pattern_type.97e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7f9: %pattern_type.97e = wrapper_binding_pattern self, %self.param_patt.dc5 [concrete] +// CHECK:STDOUT: %self.param_patt.41b: %pattern_type.297 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.429: %pattern_type.297 = wrapper_binding_pattern self, %self.param_patt.41b [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc16_3.2 [concrete] @@ -98,6 +100,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Bool = %Core.Bool // CHECK:STDOUT: .Int = %Core.Int +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: .Destroy = %Core.Destroy @@ -106,6 +109,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Bool: type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = bool] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1aa = impl_witness_table (%Core.import_ref.edf), @Core.IntLiteral.as.ImplicitAs.impl [concrete] @@ -131,18 +135,18 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.97e = ref_param_pattern [concrete = constants.%self.param_patt.dc5] -// CHECK:STDOUT: %self.patt: %pattern_type.97e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7f9] +// CHECK:STDOUT: %self.param_patt: %pattern_type.297 = ref_param_pattern [concrete = constants.%self.param_patt.41b] +// CHECK:STDOUT: %self.patt: %pattern_type.297 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.429] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.096 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.096 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc16_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.97e = ref_param_pattern [concrete = constants.%self.param_patt.dc5] -// CHECK:STDOUT: %self.patt: %pattern_type.97e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7f9] +// CHECK:STDOUT: %self.param_patt: %pattern_type.297 = ref_param_pattern [concrete = constants.%self.param_patt.41b] +// CHECK:STDOUT: %self.patt: %pattern_type.297 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.429] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.096 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.096 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -180,7 +184,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%b.param: bool, %n.param: %i32, %m.param: %i32) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.var: ref %array_type = var_storage %x.var_patt +// CHECK:STDOUT: %x.var: ref %Array.096 = var_storage %x.var_patt // CHECK:STDOUT: %int_0.loc16_27: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc16_29.1: %tuple.type.985 = tuple_literal (%int_0.loc16_27) [concrete = constants.%tuple.4f2] // CHECK:STDOUT: %impl.elem0.loc16: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] @@ -192,31 +196,31 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %int_0.loc16_29: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc16_29.3: ref %i32 = array_index %x.var, %int_0.loc16_29 // CHECK:STDOUT: %.loc16_29.4: init %i32 to %.loc16_29.3 = in_place_init %.loc16_29.2 [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc16_29.5: init %array_type to %x.var = array_init (%.loc16_29.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc16_3: init %array_type = converted %.loc16_29.1, %.loc16_29.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc16_29.5: init %Array.096 to %x.var = array_init (%.loc16_29.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc16_3: init %Array.096 = converted %.loc16_29.1, %.loc16_29.5 [concrete = constants.%array] // CHECK:STDOUT: assign %x.var, %.loc16_3 -// CHECK:STDOUT: %.loc16_22: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc16_22: type = splice_block %Array [concrete = constants.%Array.096] { // CHECK:STDOUT: %i32.loc16: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32.loc16 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_1) [concrete = constants.%Array.096] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: ref %array_type = wrapper_binding x, %x.var +// CHECK:STDOUT: %x: ref %Array.096 = wrapper_binding x, %x.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %x.patt: %pattern_type.97e = ref_binding_pattern x [concrete = constants.%x.patt] -// CHECK:STDOUT: %x.var_patt: %pattern_type.97e = var_pattern %x.patt [concrete = constants.%x.var_patt] +// CHECK:STDOUT: %x.patt: %pattern_type.297 = ref_binding_pattern x [concrete = constants.%x.patt] +// CHECK:STDOUT: %x.var_patt: %pattern_type.297 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %b.ref: bool = name_ref b, %b // CHECK:STDOUT: if %b.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %x.ref.loc17_20: ref %array_type = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc17_20: ref %Array.096 = name_ref x, %x // CHECK:STDOUT: %m.ref: %i32 = name_ref m, %m // CHECK:STDOUT: %.loc17_23.1: ref %i32 = array_index %x.ref.loc17_20, %m.ref // CHECK:STDOUT: %.loc17_23.2: %i32 = acquire_value %.loc17_23.1 // CHECK:STDOUT: br !if.expr.result(%.loc17_23.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %x.ref.loc17_30: ref %array_type = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc17_30: ref %Array.096 = name_ref x, %x // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %.loc17_33.1: ref %i32 = array_index %x.ref.loc17_30, %n.ref // CHECK:STDOUT: %.loc17_33.2: %i32 = acquire_value %.loc17_33.1 @@ -245,7 +249,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %Array.096) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc16: ref %i32 = array_index %self.param, %int_0 @@ -254,9 +258,9 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.2(%self.param: ref %Array.096) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_3.2(%self.param: ref %Array.096) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) diff --git a/toolchain/check/testdata/impl/assoc_const_self.carbon b/toolchain/check/testdata/impl/assoc_const_self.carbon index ff8f741dce5f..9a85d3822785 100644 --- a/toolchain/check/testdata/impl/assoc_const_self.carbon +++ b/toolchain/check/testdata/impl/assoc_const_self.carbon @@ -65,15 +65,18 @@ impl C as I where .V = () {} library "[[@TEST_NAME]]"; +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + interface I(N: Core.IntLiteral) { - let V: array(Self, N); + let V: Array(Self, N); } // CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE+7]]:24: error: member access into facet of incomplete type `I(-1)` [IncompleteTypeInMemberAccessOfFacet] // CHECK:STDERR: impl {} as I(-1) where .V = () {} // CHECK:STDERR: ^~ // CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE-6]]:16: note: array bound of -1 is negative [ArrayBoundNegative] -// CHECK:STDERR: let V: array(Self, N); +// CHECK:STDERR: let V: Array(Self, N); // CHECK:STDERR: ^~~~ // CHECK:STDERR: impl {} as I(-1) where .V = () {} @@ -620,12 +623,22 @@ fn CallF() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] -// CHECK:STDOUT: %.Self.frozen.e58: type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.param_patt: %pattern_type.9a5 = value_param_pattern [concrete] +// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = wrapper_binding_pattern T, %T.param_patt [concrete] // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete] -// CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %N.param_patt: %pattern_type.dc0 = value_param_pattern [concrete] +// CHECK:STDOUT: %N.patt.4a4: %pattern_type.dc0 = wrapper_binding_pattern N, %N.param_patt [concrete] +// CHECK:STDOUT: %.576: Core.Form = init_form type [concrete] +// CHECK:STDOUT: %return.param_patt.90b: %pattern_type.9a5 = out_param_pattern [concrete] +// CHECK:STDOUT: %return.patt.718: %pattern_type.9a5 = return_slot_pattern %return.param_patt.90b, type [concrete] +// CHECK:STDOUT: %Array.type: type = fn_type @Array [concrete] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %Array: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self.frozen.e58: type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %N.patt.aa5: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %I.type.335: type = generic_interface_type @I [concrete] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %I.generic: %I.type.335 = struct_value () [concrete] // CHECK:STDOUT: %I.type.ac2: type = facet_type <@I, @I(%N)> [symbolic] // CHECK:STDOUT: %Self.4d2: %I.type.ac2 = symbolic_binding Self, 1 [symbolic] @@ -671,55 +684,78 @@ fn CallF() { // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core +// CHECK:STDOUT: .Array = %Array.decl // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { -// CHECK:STDOUT: %N.patt.loc4_14.1: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_14.2 (constants.%N.patt)] +// CHECK:STDOUT: %Array.decl: %Array.type = fn_decl @Array [concrete = constants.%Array] { +// CHECK:STDOUT: %T.param_patt: %pattern_type.9a5 = value_param_pattern [concrete = constants.%T.param_patt] +// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = wrapper_binding_pattern T, %T.param_patt [concrete = constants.%T.patt] +// CHECK:STDOUT: %N.param_patt: %pattern_type.dc0 = value_param_pattern [concrete = constants.%N.param_patt] +// CHECK:STDOUT: %N.patt: %pattern_type.dc0 = wrapper_binding_pattern N, %N.param_patt [concrete = constants.%N.patt.4a4] +// CHECK:STDOUT: %return.param_patt: %pattern_type.9a5 = out_param_pattern [concrete = constants.%return.param_patt.90b] +// CHECK:STDOUT: %return.patt: %pattern_type.9a5 = return_slot_pattern %return.param_patt, %.loc5_42.1 [concrete = constants.%return.patt.718] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4: type = splice_block %IntLiteral.ref [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.loc5_42.1: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_42.2: Core.Form = init_form %.loc5_42.1 [concrete = constants.%.576] +// CHECK:STDOUT: %T.param: type = value_param call_param0 +// CHECK:STDOUT: %.loc5_13: type = type_literal type [concrete = type] +// CHECK:STDOUT: %T: type = wrapper_binding T, %T.param +// CHECK:STDOUT: %N.param: Core.IntLiteral = value_param call_param1 +// CHECK:STDOUT: %.loc5_26: type = splice_block %IntLiteral.ref [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] +// CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] +// CHECK:STDOUT: } +// CHECK:STDOUT: %N: Core.IntLiteral = wrapper_binding N, %N.param +// CHECK:STDOUT: %return.param: ref type = out_param call_param2 +// CHECK:STDOUT: %return: ref type = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { +// CHECK:STDOUT: %N.patt.loc7_14.1: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc7_14.2 (constants.%N.patt.aa5)] +// CHECK:STDOUT: } { +// CHECK:STDOUT: %.loc7: type = splice_block %IntLiteral.ref [concrete = Core.IntLiteral] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.e58] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc4_14.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_14.1 (constants.%N)] +// CHECK:STDOUT: %N.loc7_14.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc7_14.1 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @empty_struct_type.as..impl [concrete] {} { -// CHECK:STDOUT: %.loc15_7.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc15_7.2: type = converted %.loc15_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc18_7.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc18_7.2: type = converted %.loc18_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %impl.elem1: %.758 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %int_1, %impl.elem1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op.bound] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.call: init Core.IntLiteral = call %bound_method(%int_1) [concrete = constants.%int_-1] -// CHECK:STDOUT: %.loc15_16.1: Core.IntLiteral = value_of_initializer %Core.IntLiteral.as.Negate.impl.Op.call [concrete = constants.%int_-1] -// CHECK:STDOUT: %.loc15_16.2: Core.IntLiteral = converted %Core.IntLiteral.as.Negate.impl.Op.call, %.loc15_16.1 [concrete = constants.%int_-1] +// CHECK:STDOUT: %.loc18_16.1: Core.IntLiteral = value_of_initializer %Core.IntLiteral.as.Negate.impl.Op.call [concrete = constants.%int_-1] +// CHECK:STDOUT: %.loc18_16.2: Core.IntLiteral = converted %Core.IntLiteral.as.Negate.impl.Op.call, %.loc18_16.1 [concrete = constants.%int_-1] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%int_-1)> [concrete = constants.%I.type.ce3] // CHECK:STDOUT: %.Self.frozen: %I.type.ce3 = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.978] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.type [concrete] // CHECK:STDOUT: %.Self.ref: %I.type.ce3 = name_ref .Self, %.Self.frozen [symbolic_self = constants.%.Self.frozen.978] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc15_24: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc18_24: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %V.ref: = name_ref V, [concrete = ] -// CHECK:STDOUT: %.loc15_30: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc18_30: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %rewrite = requirement_rewrite %V.ref, [concrete] -// CHECK:STDOUT: %.loc15_18: type = where_expr [concrete = ] { +// CHECK:STDOUT: %.loc18_18: type = where_expr [concrete = ] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.type [concrete] // CHECK:STDOUT: %rewrite = requirement_rewrite %V.ref, [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @I(%N.loc4_14.2: Core.IntLiteral) { -// CHECK:STDOUT: %N.patt.loc4_14.2: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_14.2 (constants.%N.patt)] -// CHECK:STDOUT: %N.loc4_14.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_14.1 (constants.%N)] +// CHECK:STDOUT: generic interface @I(%N.loc7_14.2: Core.IntLiteral) { +// CHECK:STDOUT: %N.patt.loc7_14.2: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc7_14.2 (constants.%N.patt.aa5)] +// CHECK:STDOUT: %N.loc7_14.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc7_14.1 (constants.%N)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%N.loc4_14.1)> [symbolic = %I.type (constants.%I.type.ac2)] -// CHECK:STDOUT: %Self.loc4_33.2: @I.%I.type (%I.type.ac2) = symbolic_binding Self, 1 [symbolic = %Self.loc4_33.2 (constants.%Self.4d2)] +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%N.loc7_14.1)> [symbolic = %I.type (constants.%I.type.ac2)] +// CHECK:STDOUT: %Self.loc7_33.2: @I.%I.type (%I.type.ac2) = symbolic_binding Self, 1 [symbolic = %Self.loc7_33.2 (constants.%Self.4d2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_33.1: @I.%I.type (%I.type.ac2) = symbolic_binding Self, 1 [symbolic = %Self.loc4_33.2 (constants.%Self.4d2)] +// CHECK:STDOUT: %Self.loc7_33.1: @I.%I.type (%I.type.ac2) = symbolic_binding Self, 1 [symbolic = %Self.loc7_33.2 (constants.%Self.4d2)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -728,8 +764,10 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_33.1 +// CHECK:STDOUT: .Self = %Self.loc7_33.1 +// CHECK:STDOUT: .Array = // CHECK:STDOUT: .N = +// CHECK:STDOUT: .Array = // CHECK:STDOUT: .N = // CHECK:STDOUT: .V = @V.%assoc0 // CHECK:STDOUT: witness = (@I.WithSelf.%V) @@ -738,26 +776,28 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @empty_struct_type.as..impl: %.loc15_7.2 as { +// CHECK:STDOUT: impl @empty_struct_type.as..impl: %.loc18_7.2 as { // CHECK:STDOUT: !members: // CHECK:STDOUT: extend // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: fn @Array(%T.param: type, %N.param: Core.IntLiteral) -> out %return.param: type = "array.make_type"; +// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%N) { -// CHECK:STDOUT: %N.patt.loc4_14.2 => constants.%N.patt -// CHECK:STDOUT: %N.loc4_14.1 => constants.%N +// CHECK:STDOUT: %N.patt.loc7_14.2 => constants.%N.patt.aa5 +// CHECK:STDOUT: %N.loc7_14.1 => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%N, constants.%Self.4d2) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%int_-1) { -// CHECK:STDOUT: %N.patt.loc4_14.2 => constants.%N.patt -// CHECK:STDOUT: %N.loc4_14.1 => constants.%int_-1 +// CHECK:STDOUT: %N.patt.loc7_14.2 => constants.%N.patt.aa5 +// CHECK:STDOUT: %N.loc7_14.1 => constants.%int_-1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.ce3 -// CHECK:STDOUT: %Self.loc4_33.2 => constants.%Self.4a1 +// CHECK:STDOUT: %Self.loc7_33.2 => constants.%Self.4a1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%int_-1, constants.%Self.4d2) { diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon index eddede018a9a..8b089cb3db7b 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -386,11 +386,13 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %x.param_patt.e85: %pattern_type.60a = value_param_pattern [symbolic] // CHECK:STDOUT: %x.patt.6af: %pattern_type.60a = wrapper_binding_pattern x, %x.param_patt.e85 [symbolic] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete] -// CHECK:STDOUT: %array_type.4e4: type = array_type %int_4, %Self.as_type.8ab [symbolic] -// CHECK:STDOUT: %.f45: Core.Form = init_form %array_type.4e4 [symbolic] -// CHECK:STDOUT: %pattern_type.2ab: type = pattern_type %array_type.4e4 [symbolic] -// CHECK:STDOUT: %return.param_patt.439: %pattern_type.2ab = out_param_pattern [symbolic] -// CHECK:STDOUT: %return.patt.869: %pattern_type.2ab = return_slot_pattern %return.param_patt.439, %array_type.4e4 [symbolic] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.afb: type = class_type @Array, @Array(%Self.as_type.8ab, %int_4) [symbolic] +// CHECK:STDOUT: %.4ee: Core.Form = init_form %Array.afb [symbolic] +// CHECK:STDOUT: %pattern_type.659: type = pattern_type %Array.afb [symbolic] +// CHECK:STDOUT: %return.param_patt.feb: %pattern_type.659 = out_param_pattern [symbolic] +// CHECK:STDOUT: %return.patt.3b9: %pattern_type.659 = return_slot_pattern %return.param_patt.feb, %Array.afb [symbolic] // CHECK:STDOUT: %SelfNested.WithSelf.F.type.702: type = fn_type @SelfNested.WithSelf.F, @SelfNested.WithSelf(%Self.e81) [symbolic] // CHECK:STDOUT: %SelfNested.WithSelf.F.eec: %SelfNested.WithSelf.F.type.702 = struct_value () [symbolic] // CHECK:STDOUT: %SelfNested.assoc_type: type = assoc_entity_type @SelfNested [concrete] @@ -405,11 +407,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %pattern_type.a68: type = pattern_type %tuple.type.e57 [concrete] // CHECK:STDOUT: %x.param_patt.140: %pattern_type.a68 = value_param_pattern [concrete] // CHECK:STDOUT: %x.patt.870: %pattern_type.a68 = wrapper_binding_pattern x, %x.param_patt.140 [concrete] -// CHECK:STDOUT: %array_type.291: type = array_type %int_4, %SelfNestedBadParam [concrete] -// CHECK:STDOUT: %.cc2: Core.Form = init_form %array_type.291 [concrete] -// CHECK:STDOUT: %pattern_type.3a0: type = pattern_type %array_type.291 [concrete] -// CHECK:STDOUT: %return.param_patt.489: %pattern_type.3a0 = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt.98a: %pattern_type.3a0 = return_slot_pattern %return.param_patt.489, %array_type.291 [concrete] +// CHECK:STDOUT: %Array.ae2: type = class_type @Array, @Array(%SelfNestedBadParam, %int_4) [concrete] +// CHECK:STDOUT: %.556: Core.Form = init_form %Array.ae2 [concrete] +// CHECK:STDOUT: %pattern_type.a39: type = pattern_type %Array.ae2 [concrete] +// CHECK:STDOUT: %return.param_patt.744: %pattern_type.a39 = out_param_pattern [concrete] +// CHECK:STDOUT: %return.patt.074: %pattern_type.a39 = return_slot_pattern %return.param_patt.744, %Array.ae2 [concrete] // CHECK:STDOUT: %SelfNestedBadParam.as.SelfNested.impl.F.type.4325e7.1: type = fn_type @SelfNestedBadParam.as.SelfNested.impl.F.loc196_87.1 [concrete] // CHECK:STDOUT: %SelfNestedBadParam.as.SelfNested.impl.F.5fd896.1: %SelfNestedBadParam.as.SelfNested.impl.F.type.4325e7.1 = struct_value () [concrete] // CHECK:STDOUT: %SelfNested.facet.d0d: %SelfNested.type = facet_value %SelfNestedBadParam, (%SelfNested.impl_witness.09d) [concrete] @@ -441,11 +443,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %SelfNested.facet.e71: %SelfNested.type = facet_value %SelfNestedBadReturnType, (%SelfNested.impl_witness.849) [concrete] // CHECK:STDOUT: %SelfNested.WithSelf.F.type.20c: type = fn_type @SelfNested.WithSelf.F, @SelfNested.WithSelf(%SelfNested.facet.e71) [concrete] // CHECK:STDOUT: %SelfNested.WithSelf.F.bab: %SelfNested.WithSelf.F.type.20c = struct_value () [concrete] -// CHECK:STDOUT: %array_type.a08: type = array_type %int_4, %SelfNestedBadReturnType [concrete] -// CHECK:STDOUT: %.442: Core.Form = init_form %array_type.a08 [concrete] -// CHECK:STDOUT: %pattern_type.f0d: type = pattern_type %array_type.a08 [concrete] -// CHECK:STDOUT: %return.param_patt.039: %pattern_type.f0d = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt.3c4: %pattern_type.f0d = return_slot_pattern %return.param_patt.039, %array_type.a08 [concrete] +// CHECK:STDOUT: %Array.bd1: type = class_type @Array, @Array(%SelfNestedBadReturnType, %int_4) [concrete] +// CHECK:STDOUT: %.916: Core.Form = init_form %Array.bd1 [concrete] +// CHECK:STDOUT: %pattern_type.4db: type = pattern_type %Array.bd1 [concrete] +// CHECK:STDOUT: %return.param_patt.46a: %pattern_type.4db = out_param_pattern [concrete] +// CHECK:STDOUT: %return.patt.57e: %pattern_type.4db = return_slot_pattern %return.param_patt.46a, %Array.bd1 [concrete] // CHECK:STDOUT: %SelfNestedBadReturnType.as.SelfNested.impl.F.type.1cbabe.2: type = fn_type @SelfNestedBadReturnType.as.SelfNested.impl.F.loc212_112.2 [concrete] // CHECK:STDOUT: %SelfNestedBadReturnType.as.SelfNested.impl.F.5a7d54.2: %SelfNestedBadReturnType.as.SelfNested.impl.F.type.1cbabe.2 = struct_value () [concrete] // CHECK:STDOUT: } @@ -455,6 +457,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: .Bool = %Core.Bool // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Int = %Core.Int +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -464,6 +467,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Core.import_ref.cb2: @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type.97e) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert.945)] // CHECK:STDOUT: %Core.import_ref.f9d = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -563,15 +567,15 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %SelfNested.WithSelf.F.decl: @SelfNested.WithSelf.%SelfNested.WithSelf.F.type (%SelfNested.WithSelf.F.type.702) = fn_decl @SelfNested.WithSelf.F [symbolic = @SelfNested.WithSelf.%SelfNested.WithSelf.F (constants.%SelfNested.WithSelf.F.eec)] { // CHECK:STDOUT: %x.param_patt.loc184_9.1: @SelfNested.WithSelf.F.%pattern_type.loc184_9 (%pattern_type.60a) = value_param_pattern [symbolic = %x.param_patt.loc184_9.2 (constants.%x.param_patt.e85)] // CHECK:STDOUT: %x.patt.loc184_9.1: @SelfNested.WithSelf.F.%pattern_type.loc184_9 (%pattern_type.60a) = wrapper_binding_pattern x, %x.param_patt.loc184_9.1 [symbolic = %x.patt.loc184_9.2 (constants.%x.patt.6af)] -// CHECK:STDOUT: %return.param_patt.loc184_57.1: @SelfNested.WithSelf.F.%pattern_type.loc184_57 (%pattern_type.2ab) = out_param_pattern [symbolic = %return.param_patt.loc184_57.2 (constants.%return.param_patt.439)] -// CHECK:STDOUT: %return.patt.loc184_41.1: @SelfNested.WithSelf.F.%pattern_type.loc184_57 (%pattern_type.2ab) = return_slot_pattern %return.param_patt.loc184_57.1, %array_type.loc184_57.2 [symbolic = %return.patt.loc184_41.2 (constants.%return.patt.869)] +// CHECK:STDOUT: %return.param_patt.loc184_57.1: @SelfNested.WithSelf.F.%pattern_type.loc184_57 (%pattern_type.659) = out_param_pattern [symbolic = %return.param_patt.loc184_57.2 (constants.%return.param_patt.feb)] +// CHECK:STDOUT: %return.patt.loc184_41.1: @SelfNested.WithSelf.F.%pattern_type.loc184_57 (%pattern_type.659) = return_slot_pattern %return.param_patt.loc184_57.1, %Array.loc184_57.2 [symbolic = %return.patt.loc184_41.2 (constants.%return.patt.3b9)] // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc184_50: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.e81)] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] // CHECK:STDOUT: %Self.as_type.loc184_50: type = facet_access_type %Self.ref.loc184_50 [symbolic = %Self.as_type.loc184_16.1 (constants.%Self.as_type.8ab)] // CHECK:STDOUT: %.loc184_50: type = converted %Self.ref.loc184_50, %Self.as_type.loc184_50 [symbolic = %Self.as_type.loc184_16.1 (constants.%Self.as_type.8ab)] -// CHECK:STDOUT: %array_type.loc184_57.2: type = array_type %int_4, %.loc184_50 [symbolic = %array_type.loc184_57.1 (constants.%array_type.4e4)] -// CHECK:STDOUT: %.loc184_57.2: Core.Form = init_form %array_type.loc184_57.2 [symbolic = %.loc184_57.1 (constants.%.f45)] +// CHECK:STDOUT: %Array.loc184_57.2: type = class_type @Array, @Array(constants.%Self.as_type.8ab, constants.%int_4) [symbolic = %Array.loc184_57.1 (constants.%Array.afb)] +// CHECK:STDOUT: %.loc184_57.2: Core.Form = init_form %Array.loc184_57.2 [symbolic = %.loc184_57.1 (constants.%.4ee)] // CHECK:STDOUT: %x.param: @SelfNested.WithSelf.F.%tuple.type (%tuple.type.c49) = value_param call_param0 // CHECK:STDOUT: %.loc184_38.1: type = splice_block %.loc184_38.3 [symbolic = %tuple.type (constants.%tuple.type.c49)] { // CHECK:STDOUT: %Self.ref.loc184_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.e81)] @@ -587,8 +591,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc184_38.3: type = converted %.loc184_38.2, constants.%tuple.type.c49 [symbolic = %tuple.type (constants.%tuple.type.c49)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @SelfNested.WithSelf.F.%tuple.type (%tuple.type.c49) = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @SelfNested.WithSelf.F.%array_type.loc184_57.1 (%array_type.4e4) = out_param call_param1 -// CHECK:STDOUT: %return: ref @SelfNested.WithSelf.F.%array_type.loc184_57.1 (%array_type.4e4) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @SelfNested.WithSelf.F.%Array.loc184_57.1 (%Array.afb) = out_param call_param1 +// CHECK:STDOUT: %return: ref @SelfNested.WithSelf.F.%Array.loc184_57.1 (%Array.afb) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %SelfNested.assoc_type = assoc_entity element0, %SelfNested.WithSelf.F.decl [concrete = constants.%assoc0.219] // CHECK:STDOUT: @@ -938,13 +942,13 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %SelfNestedBadParam.as.SelfNested.impl.F.decl.loc196_87.1: %SelfNestedBadParam.as.SelfNested.impl.F.type.4325e7.1 = fn_decl @SelfNestedBadParam.as.SelfNested.impl.F.loc196_87.1 [concrete = constants.%SelfNestedBadParam.as.SelfNested.impl.F.5fd896.1] { // CHECK:STDOUT: %x.param_patt: %pattern_type.a68 = value_param_pattern [concrete = constants.%x.param_patt.140] // CHECK:STDOUT: %x.patt: %pattern_type.a68 = wrapper_binding_pattern x, %x.param_patt [concrete = constants.%x.patt.870] -// CHECK:STDOUT: %return.param_patt: %pattern_type.3a0 = out_param_pattern [concrete = constants.%return.param_patt.489] -// CHECK:STDOUT: %return.patt: %pattern_type.3a0 = return_slot_pattern %return.param_patt, %array_type [concrete = constants.%return.patt.98a] +// CHECK:STDOUT: %return.param_patt: %pattern_type.a39 = out_param_pattern [concrete = constants.%return.param_patt.744] +// CHECK:STDOUT: %return.patt: %pattern_type.a39 = return_slot_pattern %return.param_patt, %Array [concrete = constants.%return.patt.074] // CHECK:STDOUT: } { // CHECK:STDOUT: %SelfNestedBadParam.ref.loc196_65: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [concrete = constants.%SelfNestedBadParam] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] -// CHECK:STDOUT: %array_type: type = array_type %int_4, %SelfNestedBadParam.ref.loc196_65 [concrete = constants.%array_type.291] -// CHECK:STDOUT: %.loc196_86: Core.Form = init_form %array_type [concrete = constants.%.cc2] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%SelfNestedBadParam, constants.%int_4) [concrete = constants.%Array.ae2] +// CHECK:STDOUT: %.loc196_86: Core.Form = init_form %Array [concrete = constants.%.556] // CHECK:STDOUT: %x.param: %tuple.type.e57 = value_param call_param0 // CHECK:STDOUT: %.loc196_53.1: type = splice_block %.loc196_53.3 [concrete = constants.%tuple.type.e57] { // CHECK:STDOUT: %SelfNestedBadParam.ref.loc196_14: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [concrete = constants.%SelfNestedBadParam] @@ -956,20 +960,20 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc196_53.3: type = converted %.loc196_53.2, constants.%tuple.type.e57 [concrete = constants.%tuple.type.e57] // CHECK:STDOUT: } // CHECK:STDOUT: %x: %tuple.type.e57 = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref %array_type.291 = out_param call_param1 -// CHECK:STDOUT: %return: ref %array_type.291 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %Array.ae2 = out_param call_param1 +// CHECK:STDOUT: %return: ref %Array.ae2 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc184_57.1: type = specific_constant @SelfNested.WithSelf.F.%array_type.loc184_57.2, @SelfNested.WithSelf.F(constants.%SelfNested.facet.d0d) [concrete = constants.%array_type.291] -// CHECK:STDOUT: %.loc184_57.2: Core.Form = specific_constant @SelfNested.WithSelf.F.%.loc184_57.2, @SelfNested.WithSelf.F(constants.%SelfNested.facet.d0d) [concrete = constants.%.cc2] +// CHECK:STDOUT: %.loc184_57.1: type = specific_constant @SelfNested.WithSelf.F.%Array.loc184_57.2, @SelfNested.WithSelf.F(constants.%SelfNested.facet.d0d) [concrete = constants.%Array.ae2] +// CHECK:STDOUT: %.loc184_57.2: Core.Form = specific_constant @SelfNested.WithSelf.F.%.loc184_57.2, @SelfNested.WithSelf.F(constants.%SelfNested.facet.d0d) [concrete = constants.%.556] // CHECK:STDOUT: %SelfNestedBadParam.as.SelfNested.impl.F.decl.loc196_87.2: %SelfNestedBadParam.as.SelfNested.impl.F.type.4325e7.2 = fn_decl @SelfNestedBadParam.as.SelfNested.impl.F.loc196_87.2 [concrete = constants.%SelfNestedBadParam.as.SelfNested.impl.F.5fd896.2] { // CHECK:STDOUT: %.1: %pattern_type.94f = specific_constant constants.%x.param_patt.7b9, @SelfNested.WithSelf.F(constants.%SelfNested.facet.d0d) [concrete = constants.%x.param_patt.7b9] // CHECK:STDOUT: %x.patt: %pattern_type.94f = wrapper_binding_pattern x, %.1 [concrete = constants.%x.patt.961] -// CHECK:STDOUT: %.2: %pattern_type.3a0 = specific_constant constants.%return.patt.98a, @SelfNested.WithSelf.F(constants.%SelfNested.facet.d0d) [concrete = constants.%return.patt.98a] +// CHECK:STDOUT: %.2: %pattern_type.a39 = specific_constant constants.%return.patt.074, @SelfNested.WithSelf.F(constants.%SelfNested.facet.d0d) [concrete = constants.%return.patt.074] // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: %tuple.type.9ab = value_param call_param0 // CHECK:STDOUT: %x: %tuple.type.9ab = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref %array_type.291 = out_param call_param1 -// CHECK:STDOUT: %return: ref %array_type.291 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %Array.ae2 = out_param call_param1 +// CHECK:STDOUT: %return: ref %Array.ae2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (%SelfNestedBadParam.as.SelfNested.impl.F.decl.loc196_87.2), @SelfNestedBadParam.as.SelfNested.impl [concrete] // CHECK:STDOUT: %SelfNested.impl_witness: = impl_witness %SelfNested.impl_witness_table [concrete = constants.%SelfNested.impl_witness.09d] @@ -985,13 +989,13 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc212_112.1: %SelfNestedBadReturnType.as.SelfNested.impl.F.type.1cbabe.1 = fn_decl @SelfNestedBadReturnType.as.SelfNested.impl.F.loc212_112.1 [concrete = constants.%SelfNestedBadReturnType.as.SelfNested.impl.F.5a7d54.1] { // CHECK:STDOUT: %x.param_patt: %pattern_type.5c2 = value_param_pattern [concrete = constants.%x.param_patt.7be] // CHECK:STDOUT: %x.patt: %pattern_type.5c2 = wrapper_binding_pattern x, %x.param_patt [concrete = constants.%x.patt.608] -// CHECK:STDOUT: %return.param_patt: %pattern_type.3a0 = out_param_pattern [concrete = constants.%return.param_patt.489] -// CHECK:STDOUT: %return.patt: %pattern_type.3a0 = return_slot_pattern %return.param_patt, %array_type [concrete = constants.%return.patt.98a] +// CHECK:STDOUT: %return.param_patt: %pattern_type.a39 = out_param_pattern [concrete = constants.%return.param_patt.744] +// CHECK:STDOUT: %return.patt: %pattern_type.a39 = return_slot_pattern %return.param_patt, %Array [concrete = constants.%return.patt.074] // CHECK:STDOUT: } { // CHECK:STDOUT: %SelfNestedBadParam.ref: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [concrete = constants.%SelfNestedBadParam] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] -// CHECK:STDOUT: %array_type: type = array_type %int_4, %SelfNestedBadParam.ref [concrete = constants.%array_type.291] -// CHECK:STDOUT: %.loc212_111: Core.Form = init_form %array_type [concrete = constants.%.cc2] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%SelfNestedBadParam, constants.%int_4) [concrete = constants.%Array.ae2] +// CHECK:STDOUT: %.loc212_111: Core.Form = init_form %Array [concrete = constants.%.556] // CHECK:STDOUT: %x.param: %tuple.type.829 = value_param call_param0 // CHECK:STDOUT: %.loc212_78.1: type = splice_block %.loc212_78.3 [concrete = constants.%tuple.type.829] { // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_14: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [concrete = constants.%SelfNestedBadReturnType] @@ -1003,20 +1007,20 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc212_78.3: type = converted %.loc212_78.2, constants.%tuple.type.829 [concrete = constants.%tuple.type.829] // CHECK:STDOUT: } // CHECK:STDOUT: %x: %tuple.type.829 = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref %array_type.291 = out_param call_param1 -// CHECK:STDOUT: %return: ref %array_type.291 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %Array.ae2 = out_param call_param1 +// CHECK:STDOUT: %return: ref %Array.ae2 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc184_57.1: type = specific_constant @SelfNested.WithSelf.F.%array_type.loc184_57.2, @SelfNested.WithSelf.F(constants.%SelfNested.facet.e71) [concrete = constants.%array_type.a08] -// CHECK:STDOUT: %.loc184_57.2: Core.Form = specific_constant @SelfNested.WithSelf.F.%.loc184_57.2, @SelfNested.WithSelf.F(constants.%SelfNested.facet.e71) [concrete = constants.%.442] +// CHECK:STDOUT: %.loc184_57.1: type = specific_constant @SelfNested.WithSelf.F.%Array.loc184_57.2, @SelfNested.WithSelf.F(constants.%SelfNested.facet.e71) [concrete = constants.%Array.bd1] +// CHECK:STDOUT: %.loc184_57.2: Core.Form = specific_constant @SelfNested.WithSelf.F.%.loc184_57.2, @SelfNested.WithSelf.F(constants.%SelfNested.facet.e71) [concrete = constants.%.916] // CHECK:STDOUT: %SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc212_112.2: %SelfNestedBadReturnType.as.SelfNested.impl.F.type.1cbabe.2 = fn_decl @SelfNestedBadReturnType.as.SelfNested.impl.F.loc212_112.2 [concrete = constants.%SelfNestedBadReturnType.as.SelfNested.impl.F.5a7d54.2] { // CHECK:STDOUT: %.1: %pattern_type.5c2 = specific_constant constants.%x.param_patt.7be, @SelfNested.WithSelf.F(constants.%SelfNested.facet.e71) [concrete = constants.%x.param_patt.7be] // CHECK:STDOUT: %x.patt: %pattern_type.5c2 = wrapper_binding_pattern x, %.1 [concrete = constants.%x.patt.608] -// CHECK:STDOUT: %.2: %pattern_type.f0d = specific_constant constants.%return.patt.3c4, @SelfNested.WithSelf.F(constants.%SelfNested.facet.e71) [concrete = constants.%return.patt.3c4] +// CHECK:STDOUT: %.2: %pattern_type.4db = specific_constant constants.%return.patt.57e, @SelfNested.WithSelf.F(constants.%SelfNested.facet.e71) [concrete = constants.%return.patt.57e] // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: %tuple.type.829 = value_param call_param0 // CHECK:STDOUT: %x: %tuple.type.829 = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref %array_type.a08 = out_param call_param1 -// CHECK:STDOUT: %return: ref %array_type.a08 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %Array.bd1 = out_param call_param1 +// CHECK:STDOUT: %return: ref %Array.bd1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (%SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc212_112.2), @SelfNestedBadReturnType.as.SelfNested.impl [concrete] // CHECK:STDOUT: %SelfNested.impl_witness: = impl_witness %SelfNested.impl_witness_table [concrete = constants.%SelfNested.impl_witness.849] @@ -1321,21 +1325,21 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %pattern_type.loc184_9: type = pattern_type %tuple.type [symbolic = %pattern_type.loc184_9 (constants.%pattern_type.60a)] // CHECK:STDOUT: %x.param_patt.loc184_9.2: @SelfNested.WithSelf.F.%pattern_type.loc184_9 (%pattern_type.60a) = value_param_pattern [symbolic = %x.param_patt.loc184_9.2 (constants.%x.param_patt.e85)] // CHECK:STDOUT: %x.patt.loc184_9.2: @SelfNested.WithSelf.F.%pattern_type.loc184_9 (%pattern_type.60a) = wrapper_binding_pattern x, %x.param_patt.loc184_9.2 [symbolic = %x.patt.loc184_9.2 (constants.%x.patt.6af)] -// CHECK:STDOUT: %array_type.loc184_57.1: type = array_type constants.%int_4, %Self.as_type.loc184_16.1 [symbolic = %array_type.loc184_57.1 (constants.%array_type.4e4)] -// CHECK:STDOUT: %.loc184_57.1: Core.Form = init_form %array_type.loc184_57.1 [symbolic = %.loc184_57.1 (constants.%.f45)] -// CHECK:STDOUT: %pattern_type.loc184_57: type = pattern_type %array_type.loc184_57.1 [symbolic = %pattern_type.loc184_57 (constants.%pattern_type.2ab)] -// CHECK:STDOUT: %return.param_patt.loc184_57.2: @SelfNested.WithSelf.F.%pattern_type.loc184_57 (%pattern_type.2ab) = out_param_pattern [symbolic = %return.param_patt.loc184_57.2 (constants.%return.param_patt.439)] -// CHECK:STDOUT: %return.patt.loc184_41.2: @SelfNested.WithSelf.F.%pattern_type.loc184_57 (%pattern_type.2ab) = return_slot_pattern %return.param_patt.loc184_57.2, %array_type.loc184_57.1 [symbolic = %return.patt.loc184_41.2 (constants.%return.patt.869)] +// CHECK:STDOUT: %Array.loc184_57.1: type = class_type @Array, @Array(%Self.as_type.loc184_16.1, constants.%int_4) [symbolic = %Array.loc184_57.1 (constants.%Array.afb)] +// CHECK:STDOUT: %.loc184_57.1: Core.Form = init_form %Array.loc184_57.1 [symbolic = %.loc184_57.1 (constants.%.4ee)] +// CHECK:STDOUT: %pattern_type.loc184_57: type = pattern_type %Array.loc184_57.1 [symbolic = %pattern_type.loc184_57 (constants.%pattern_type.659)] +// CHECK:STDOUT: %return.param_patt.loc184_57.2: @SelfNested.WithSelf.F.%pattern_type.loc184_57 (%pattern_type.659) = out_param_pattern [symbolic = %return.param_patt.loc184_57.2 (constants.%return.param_patt.feb)] +// CHECK:STDOUT: %return.patt.loc184_41.2: @SelfNested.WithSelf.F.%pattern_type.loc184_57 (%pattern_type.659) = return_slot_pattern %return.param_patt.loc184_57.2, %Array.loc184_57.1 [symbolic = %return.patt.loc184_41.2 (constants.%return.patt.3b9)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @SelfNested.WithSelf.F.%tuple.type (%tuple.type.c49)) -> out %return.param: @SelfNested.WithSelf.F.%array_type.loc184_57.1 (%array_type.4e4); +// CHECK:STDOUT: fn(%x.param: @SelfNested.WithSelf.F.%tuple.type (%tuple.type.c49)) -> out %return.param: @SelfNested.WithSelf.F.%Array.loc184_57.1 (%Array.afb); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @SelfNestedBadParam.as.SelfNested.impl.F.loc196_87.1(%x.param: %tuple.type.e57) -> out %return.param: %array_type.291; +// CHECK:STDOUT: fn @SelfNestedBadParam.as.SelfNested.impl.F.loc196_87.1(%x.param: %tuple.type.e57) -> out %return.param: %Array.ae2; // CHECK:STDOUT: -// CHECK:STDOUT: fn @SelfNestedBadParam.as.SelfNested.impl.F.loc196_87.2(%x.param: %tuple.type.9ab) -> out %return.param: %array_type.291 [thunk @SelfNestedBadParam.as.SelfNested.impl.%SelfNestedBadParam.as.SelfNested.impl.F.decl.loc196_87.1 for @SelfNested.WithSelf.%SelfNested.WithSelf.F.decl, @SelfNested.WithSelf.F(constants.%SelfNested.facet.d0d)] { +// CHECK:STDOUT: fn @SelfNestedBadParam.as.SelfNested.impl.F.loc196_87.2(%x.param: %tuple.type.9ab) -> out %return.param: %Array.ae2 [thunk @SelfNestedBadParam.as.SelfNested.impl.%SelfNestedBadParam.as.SelfNested.impl.F.decl.loc196_87.1 for @SelfNested.WithSelf.%SelfNested.WithSelf.F.decl, @SelfNested.WithSelf.F(constants.%SelfNested.facet.d0d)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %SelfNestedBadParam.as.SelfNested.impl.F.type.4325e7.1 = name_ref F, @SelfNestedBadParam.as.SelfNested.impl.%SelfNestedBadParam.as.SelfNested.impl.F.decl.loc196_87.1 [concrete = constants.%SelfNestedBadParam.as.SelfNested.impl.F.5fd896.1] -// CHECK:STDOUT: %.3: ref %array_type.291 = splice_block %return.param {} +// CHECK:STDOUT: %.3: ref %Array.ae2 = splice_block %return.param {} // CHECK:STDOUT: %tuple.elem0: %ptr.52e = tuple_access %x.param, element0 // CHECK:STDOUT: %tuple.elem1: %struct_type.x.y.da2 = tuple_access %x.param, element1 // CHECK:STDOUT: %.4: %SelfNestedBadParam = struct_access %tuple.elem1, element0 @@ -1343,18 +1347,18 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.5: %ImplicitAs.assoc_type.e23 = specific_constant imports.%Core.import_ref.484, @ImplicitAs.WithSelf(constants.%i32, constants.%Self.294) [concrete = constants.%assoc0.368] // CHECK:STDOUT: %Convert.ref: %ImplicitAs.assoc_type.e23 = name_ref Convert, %.5 [concrete = constants.%assoc0.368] // CHECK:STDOUT: %.6: %i32 = converted %.4, [concrete = ] -// CHECK:STDOUT: %SelfNestedBadParam.as.SelfNested.impl.F.call: init %array_type.291 to %.3 = call %F.ref() +// CHECK:STDOUT: %SelfNestedBadParam.as.SelfNested.impl.F.call: init %Array.ae2 to %.3 = call %F.ref() // CHECK:STDOUT: return %SelfNestedBadParam.as.SelfNested.impl.F.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @SelfNestedBadReturnType.as.SelfNested.impl.F.loc212_112.1(%x.param: %tuple.type.829) -> out %return.param: %array_type.291; +// CHECK:STDOUT: fn @SelfNestedBadReturnType.as.SelfNested.impl.F.loc212_112.1(%x.param: %tuple.type.829) -> out %return.param: %Array.ae2; // CHECK:STDOUT: -// CHECK:STDOUT: fn @SelfNestedBadReturnType.as.SelfNested.impl.F.loc212_112.2(%x.param: %tuple.type.829) -> out %return.param: %array_type.a08 [thunk @SelfNestedBadReturnType.as.SelfNested.impl.%SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc212_112.1 for @SelfNested.WithSelf.%SelfNested.WithSelf.F.decl, @SelfNested.WithSelf.F(constants.%SelfNested.facet.e71)] { +// CHECK:STDOUT: fn @SelfNestedBadReturnType.as.SelfNested.impl.F.loc212_112.2(%x.param: %tuple.type.829) -> out %return.param: %Array.bd1 [thunk @SelfNestedBadReturnType.as.SelfNested.impl.%SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc212_112.1 for @SelfNested.WithSelf.%SelfNested.WithSelf.F.decl, @SelfNested.WithSelf.F(constants.%SelfNested.facet.e71)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %SelfNestedBadReturnType.as.SelfNested.impl.F.type.1cbabe.1 = name_ref F, @SelfNestedBadReturnType.as.SelfNested.impl.%SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc212_112.1 [concrete = constants.%SelfNestedBadReturnType.as.SelfNested.impl.F.5a7d54.1] -// CHECK:STDOUT: %.loc212_112.1: ref %array_type.291 = temporary_storage -// CHECK:STDOUT: %SelfNestedBadReturnType.as.SelfNested.impl.F.call: init %array_type.291 to %.loc212_112.1 = call %F.ref(%x.param) -// CHECK:STDOUT: %.loc212_112.2: %array_type.a08 = converted %SelfNestedBadReturnType.as.SelfNested.impl.F.call, [concrete = ] +// CHECK:STDOUT: %.loc212_112.1: ref %Array.ae2 = temporary_storage +// CHECK:STDOUT: %SelfNestedBadReturnType.as.SelfNested.impl.F.call: init %Array.ae2 to %.loc212_112.1 = call %F.ref(%x.param) +// CHECK:STDOUT: %.loc212_112.2: %Array.bd1 = converted %SelfNestedBadReturnType.as.SelfNested.impl.F.call, [concrete = ] // CHECK:STDOUT: return to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1488,11 +1492,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %pattern_type.loc184_9 => constants.%pattern_type.60a // CHECK:STDOUT: %x.param_patt.loc184_9.2 => constants.%x.param_patt.e85 // CHECK:STDOUT: %x.patt.loc184_9.2 => constants.%x.patt.6af -// CHECK:STDOUT: %array_type.loc184_57.1 => constants.%array_type.4e4 -// CHECK:STDOUT: %.loc184_57.1 => constants.%.f45 -// CHECK:STDOUT: %pattern_type.loc184_57 => constants.%pattern_type.2ab -// CHECK:STDOUT: %return.param_patt.loc184_57.2 => constants.%return.param_patt.439 -// CHECK:STDOUT: %return.patt.loc184_41.2 => constants.%return.patt.869 +// CHECK:STDOUT: %Array.loc184_57.1 => constants.%Array.afb +// CHECK:STDOUT: %.loc184_57.1 => constants.%.4ee +// CHECK:STDOUT: %pattern_type.loc184_57 => constants.%pattern_type.659 +// CHECK:STDOUT: %return.param_patt.loc184_57.2 => constants.%return.param_patt.feb +// CHECK:STDOUT: %return.patt.loc184_41.2 => constants.%return.patt.3b9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @SelfNested.WithSelf(constants.%SelfNested.facet.d0d) { @@ -1512,11 +1516,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %pattern_type.loc184_9 => constants.%pattern_type.94f // CHECK:STDOUT: %x.param_patt.loc184_9.2 => constants.%x.param_patt.7b9 // CHECK:STDOUT: %x.patt.loc184_9.2 => constants.%x.patt.961 -// CHECK:STDOUT: %array_type.loc184_57.1 => constants.%array_type.291 -// CHECK:STDOUT: %.loc184_57.1 => constants.%.cc2 -// CHECK:STDOUT: %pattern_type.loc184_57 => constants.%pattern_type.3a0 -// CHECK:STDOUT: %return.param_patt.loc184_57.2 => constants.%return.param_patt.489 -// CHECK:STDOUT: %return.patt.loc184_41.2 => constants.%return.patt.98a +// CHECK:STDOUT: %Array.loc184_57.1 => constants.%Array.ae2 +// CHECK:STDOUT: %.loc184_57.1 => constants.%.556 +// CHECK:STDOUT: %pattern_type.loc184_57 => constants.%pattern_type.a39 +// CHECK:STDOUT: %return.param_patt.loc184_57.2 => constants.%return.param_patt.744 +// CHECK:STDOUT: %return.patt.loc184_41.2 => constants.%return.patt.074 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @SelfNested.WithSelf(constants.%SelfNested.facet.e71) { @@ -1536,10 +1540,10 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %pattern_type.loc184_9 => constants.%pattern_type.5c2 // CHECK:STDOUT: %x.param_patt.loc184_9.2 => constants.%x.param_patt.7be // CHECK:STDOUT: %x.patt.loc184_9.2 => constants.%x.patt.608 -// CHECK:STDOUT: %array_type.loc184_57.1 => constants.%array_type.a08 -// CHECK:STDOUT: %.loc184_57.1 => constants.%.442 -// CHECK:STDOUT: %pattern_type.loc184_57 => constants.%pattern_type.f0d -// CHECK:STDOUT: %return.param_patt.loc184_57.2 => constants.%return.param_patt.039 -// CHECK:STDOUT: %return.patt.loc184_41.2 => constants.%return.patt.3c4 +// CHECK:STDOUT: %Array.loc184_57.1 => constants.%Array.bd1 +// CHECK:STDOUT: %.loc184_57.1 => constants.%.916 +// CHECK:STDOUT: %pattern_type.loc184_57 => constants.%pattern_type.4db +// CHECK:STDOUT: %return.param_patt.loc184_57.2 => constants.%return.param_patt.46a +// CHECK:STDOUT: %return.patt.loc184_41.2 => constants.%return.patt.57e // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/require_satisified_in_interface.carbon b/toolchain/check/testdata/impl/require_satisified_in_interface.carbon index 43ef7ca8b84e..c3825b9fa80c 100644 --- a/toolchain/check/testdata/impl/require_satisified_in_interface.carbon +++ b/toolchain/check/testdata/impl/require_satisified_in_interface.carbon @@ -286,12 +286,15 @@ fn F(generic T: C) { // --- fail_impl_requires_itself_cycle_with_monomorphization_error.carbon library "[[@TEST_NAME]]"; +// Unlike `array(T, N)`, this fails eagerly on an invalid bound. +fn Array(T: type, N: Core.IntLiteral) -> type = "array.make_type"; + class W(T: type) { adapt {}; } interface A(N: Core.IntLiteral) { - fn AA() -> W(array((), N)); + fn AA() -> W(Array((), N)); } interface B(N: Core.IntLiteral) { require impls A(N); @@ -301,7 +304,7 @@ interface C(N: Core.IntLiteral) { } impl forall [N: Core.IntLiteral, T: B(N)] T as A(N) { - fn AA() -> W(array((), N)) { return {} as W(array((), N)); } + fn AA() -> W(Array((), N)) { return {} as W(Array((), N)); } } impl forall [N: Core.IntLiteral, T: C(N)] T as B(N) { @@ -319,7 +322,7 @@ fn F(generic T: C(-1)) { // CHECK:STDERR: T.(A(-1).AA)(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_requires_itself_cycle_with_monomorphization_error.carbon:[[@LINE-27]]:26: note: array bound of -1 is negative [ArrayBoundNegative] - // CHECK:STDERR: fn AA() -> W(array((), N)); + // CHECK:STDERR: fn AA() -> W(Array((), N)); // CHECK:STDERR: ^ // CHECK:STDERR: T.(A(-1).AA)(); diff --git a/toolchain/check/testdata/index/array_element_access.carbon b/toolchain/check/testdata/index/array_element_access.carbon index fe9eb7335424..0423f62cac5c 100644 --- a/toolchain/check/testdata/index/array_element_access.carbon +++ b/toolchain/check/testdata/index/array_element_access.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -24,13 +24,15 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.7b0: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.7b0 = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.7b0 = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.e69: type = class_type @Array, @Array(%i32, %int_2) [concrete] +// CHECK:STDOUT: %pattern_type.213: type = pattern_type %Array.e69 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.213 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.213 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %int_12.6a3: Core.IntLiteral = int_value 12 [concrete] // CHECK:STDOUT: %int_24.e3c: Core.IntLiteral = int_value 24 [concrete] // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] @@ -57,7 +59,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6cc: = bound_method %int_24.e3c, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] // CHECK:STDOUT: %bound_method.b67: = bound_method %int_24.e3c, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_24.130: %i32 = int_value 24 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.8c7, %int_24.130) [concrete] +// CHECK:STDOUT: %array: %Array.e69 = tuple_value (%int_12.8c7, %int_24.130) [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.6b6 = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.6b6 = var_pattern %b.patt [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.094: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] @@ -69,7 +71,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %bound_method.6e0: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.3c0: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.b51: = impl_witness imports.%Copy.impl_witness_table.8d2, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3f6: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] @@ -85,12 +87,14 @@ var d: i32 = a[b]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1aa = impl_witness_table (%Core.import_ref.edf), @Core.IntLiteral.as.ImplicitAs.impl [concrete] @@ -108,16 +112,16 @@ var d: i32 = a[b]; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt [concrete] -// CHECK:STDOUT: %.loc15: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %a.var: ref %Array.e69 = var_storage %a.var_patt [concrete] +// CHECK:STDOUT: %.loc15: type = splice_block %Array [concrete = constants.%Array.e69] { // CHECK:STDOUT: %i32.loc15: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] -// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32.loc15 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_2) [concrete = constants.%Array.e69] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var [concrete = %a.var] +// CHECK:STDOUT: %a: ref %Array.e69 = wrapper_binding a, %a.var [concrete = %a.var] // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.7b0 = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.7b0 = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.213 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.213 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref %i32 = var_storage %b.var_patt [concrete] // CHECK:STDOUT: %i32.loc16: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -165,8 +169,8 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc15_31.6: ref %i32 = array_index file.%a.var, %int_1.loc15 // CHECK:STDOUT: %.loc15_31.7: init %i32 to %.loc15_31.6 = in_place_init %.loc15_31.5 [concrete = constants.%int_24.130] -// CHECK:STDOUT: %.loc15_31.8: init %array_type to file.%a.var = array_init (%.loc15_31.4, %.loc15_31.7) [concrete = constants.%array] -// CHECK:STDOUT: %.loc15_1: init %array_type = converted %.loc15_31.1, %.loc15_31.8 [concrete = constants.%array] +// CHECK:STDOUT: %.loc15_31.8: init %Array.e69 to file.%a.var = array_init (%.loc15_31.4, %.loc15_31.7) [concrete = constants.%array] +// CHECK:STDOUT: %.loc15_1: init %Array.e69 = converted %.loc15_31.1, %.loc15_31.8 [concrete = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc15_1 // CHECK:STDOUT: %int_1.loc16: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc16: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] @@ -176,7 +180,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc16: init %i32 = call %bound_method.loc16_1.2(%int_1.loc16) [concrete = constants.%int_1.0c6] // CHECK:STDOUT: %.loc16: init %i32 = converted %int_1.loc16, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc16 [concrete = constants.%int_1.0c6] // CHECK:STDOUT: assign file.%b.var, %.loc16 -// CHECK:STDOUT: %a.ref.loc17: ref %array_type = name_ref a, file.%a [concrete = file.%a.var] +// CHECK:STDOUT: %a.ref.loc17: ref %Array.e69 = name_ref a, file.%a [concrete = file.%a.var] // CHECK:STDOUT: %int_0.loc17: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc17_16: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc17_16.1: = bound_method %int_0.loc17, %impl.elem0.loc17_16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4] @@ -193,7 +197,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %bound_method.loc17_17.2: = bound_method %.loc17_17.2, %specific_fn.loc17_17 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc17: init %i32 = call %bound_method.loc17_17.2(%.loc17_17.2) // CHECK:STDOUT: assign file.%c.var, %Int.as.Copy.impl.Op.call.loc17 -// CHECK:STDOUT: %a.ref.loc18: ref %array_type = name_ref a, file.%a [concrete = file.%a.var] +// CHECK:STDOUT: %a.ref.loc18: ref %Array.e69 = name_ref a, file.%a [concrete = file.%a.var] // CHECK:STDOUT: %b.ref: ref %i32 = name_ref b, file.%b [concrete = file.%b.var] // CHECK:STDOUT: %.loc18_16: %i32 = acquire_value %b.ref // CHECK:STDOUT: %.loc18_17.1: ref %i32 = array_index %a.ref.loc18, %.loc18_16 diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index 988fd5f198db..75d262f21720 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -42,19 +42,22 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete] -// CHECK:STDOUT: %.2b2: Core.Form = init_form %array_type [concrete] -// CHECK:STDOUT: %pattern_type.771: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %return.param_patt.8a2: %pattern_type.771 = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt.2f6: %pattern_type.771 = return_slot_pattern %return.param_patt.8a2, %array_type [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Array.b3a: type = class_type @Array, @Array(%i32, %int_3.1ba) [concrete] +// CHECK:STDOUT: %.047: Core.Form = init_form %Array.b3a [concrete] +// CHECK:STDOUT: %pattern_type.7a1: type = pattern_type %Array.b3a [concrete] +// CHECK:STDOUT: %return.param_patt.1df: %pattern_type.7a1 = out_param_pattern [concrete] +// CHECK:STDOUT: %return.patt.4a8: %pattern_type.7a1 = return_slot_pattern %return.param_patt.1df, %Array.b3a [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.771 = value_param_pattern [concrete] -// CHECK:STDOUT: %b.patt.911d20.1: %pattern_type.771 = wrapper_binding_pattern b, %b.param_patt [concrete] +// CHECK:STDOUT: %b.param_patt: %pattern_type.7a1 = value_param_pattern [concrete] +// CHECK:STDOUT: %b.patt.21715d.1: %pattern_type.7a1 = wrapper_binding_pattern b, %b.param_patt [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.771 = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.771 = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.7a1 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.7a1 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %tuple.type.37f: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] @@ -83,7 +86,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.485: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] // CHECK:STDOUT: %bound_method.763: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.410: %i32 = int_value 3 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.0c6, %int_2.295, %int_3.410) [concrete] +// CHECK:STDOUT: %array: %Array.b3a = tuple_value (%int_1.0c6, %int_2.295, %int_3.410) [concrete] // CHECK:STDOUT: %ptr.d08: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %pattern_type.f00: type = pattern_type %ptr.d08 [concrete] // CHECK:STDOUT: %pa.patt: %pattern_type.f00 = ref_binding_pattern pa [concrete] @@ -92,7 +95,6 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %bound_method.6e0: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.3c0: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.ff5: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.ce9: %ptr.as.Copy.impl.Op.type.ff5 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.5df: = impl_witness imports.%Copy.impl_witness_table.fb0, @ptr.as.Copy.impl(%i32) [concrete] @@ -123,15 +125,15 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c42: %pattern_type.771 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3bc: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt.c42 [concrete] +// CHECK:STDOUT: %self.param_patt.717: %pattern_type.7a1 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.cb9: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt.717 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc18_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %b.patt.911d20.2: %pattern_type.771 = wrapper_binding_pattern b, %b.param_patt [concrete] +// CHECK:STDOUT: %b.patt.21715d.2: %pattern_type.7a1 = wrapper_binding_pattern b, %b.param_patt [concrete] // CHECK:STDOUT: %ValueBinding.type: type = fn_type @ValueBinding [concrete] // CHECK:STDOUT: %ValueBinding: %ValueBinding.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -139,6 +141,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: .Destroy = %Core.Destroy @@ -146,6 +149,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1aa = impl_witness_table (%Core.import_ref.edf), @Core.IntLiteral.as.ImplicitAs.impl [concrete] @@ -185,18 +189,18 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.771 = ref_param_pattern [concrete = constants.%self.param_patt.c42] -// CHECK:STDOUT: %self.patt: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3bc] +// CHECK:STDOUT: %self.param_patt: %pattern_type.7a1 = ref_param_pattern [concrete = constants.%self.param_patt.717] +// CHECK:STDOUT: %self.patt: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb9] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.b3a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.b3a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc18_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.771 = ref_param_pattern [concrete = constants.%self.param_patt.c42] -// CHECK:STDOUT: %self.patt: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3bc] +// CHECK:STDOUT: %self.param_patt: %pattern_type.7a1 = ref_param_pattern [concrete = constants.%self.param_patt.717] +// CHECK:STDOUT: %self.patt: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb9] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.b3a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.b3a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -209,47 +213,47 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %return.param_patt: %pattern_type.771 = out_param_pattern [concrete = constants.%return.param_patt.8a2] -// CHECK:STDOUT: %return.patt: %pattern_type.771 = return_slot_pattern %return.param_patt, %array_type [concrete = constants.%return.patt.2f6] +// CHECK:STDOUT: %return.param_patt: %pattern_type.7a1 = out_param_pattern [concrete = constants.%return.param_patt.1df] +// CHECK:STDOUT: %return.patt: %pattern_type.7a1 = return_slot_pattern %return.param_patt, %Array [concrete = constants.%return.patt.4a8] // CHECK:STDOUT: } { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [concrete = constants.%array_type] -// CHECK:STDOUT: %.loc15: Core.Form = init_form %array_type [concrete = constants.%.2b2] -// CHECK:STDOUT: %return.param: ref %array_type = out_param call_param0 -// CHECK:STDOUT: %return: ref %array_type = return_slot %return.param +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_3.1ba) [concrete = constants.%Array.b3a] +// CHECK:STDOUT: %.loc15: Core.Form = init_form %Array [concrete = constants.%.047] +// CHECK:STDOUT: %return.param: ref %Array.b3a = out_param call_param0 +// CHECK:STDOUT: %return: ref %Array.b3a = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %b.param_patt: %pattern_type.771 = value_param_pattern [concrete = constants.%b.param_patt] -// CHECK:STDOUT: %b.patt: %pattern_type.771 = wrapper_binding_pattern b, %b.param_patt [concrete = constants.%b.patt.911d20.1] +// CHECK:STDOUT: %b.param_patt: %pattern_type.7a1 = value_param_pattern [concrete = constants.%b.param_patt] +// CHECK:STDOUT: %b.patt: %pattern_type.7a1 = wrapper_binding_pattern b, %b.param_patt [concrete = constants.%b.patt.21715d.1] // CHECK:STDOUT: } { -// CHECK:STDOUT: %b.param: %array_type = value_param call_param0 -// CHECK:STDOUT: %.loc17: type = splice_block %array_type.loc17 [concrete = constants.%array_type] { +// CHECK:STDOUT: %b.param: %Array.b3a = value_param call_param0 +// CHECK:STDOUT: %.loc17: type = splice_block %Array.loc17 [concrete = constants.%Array.b3a] { // CHECK:STDOUT: %i32.loc17: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_3.loc17: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type.loc17: type = array_type %int_3.loc17, %i32.loc17 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.loc17: type = class_type @Array, @Array(constants.%i32, constants.%int_3.1ba) [concrete = constants.%Array.b3a] // CHECK:STDOUT: } -// CHECK:STDOUT: %b: %array_type = wrapper_binding b, %b.param +// CHECK:STDOUT: %b: %Array.b3a = wrapper_binding b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: %ValueBinding.decl: %ValueBinding.type = fn_decl @ValueBinding [concrete = constants.%ValueBinding] { -// CHECK:STDOUT: %b.param_patt: %pattern_type.771 = value_param_pattern [concrete = constants.%b.param_patt] -// CHECK:STDOUT: %b.patt: %pattern_type.771 = wrapper_binding_pattern b, %b.param_patt [concrete = constants.%b.patt.911d20.2] +// CHECK:STDOUT: %b.param_patt: %pattern_type.7a1 = value_param_pattern [concrete = constants.%b.param_patt] +// CHECK:STDOUT: %b.patt: %pattern_type.7a1 = wrapper_binding_pattern b, %b.param_patt [concrete = constants.%b.patt.21715d.2] // CHECK:STDOUT: } { -// CHECK:STDOUT: %b.param: %array_type = value_param call_param0 -// CHECK:STDOUT: %.loc25: type = splice_block %array_type.loc25 [concrete = constants.%array_type] { +// CHECK:STDOUT: %b.param: %Array.b3a = value_param call_param0 +// CHECK:STDOUT: %.loc25: type = splice_block %Array.loc25 [concrete = constants.%Array.b3a] { // CHECK:STDOUT: %i32.loc25: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_3.loc25: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type.loc25: type = array_type %int_3.loc25, %i32.loc25 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.loc25: type = class_type @Array, @Array(constants.%i32, constants.%int_3.1ba) [concrete = constants.%Array.b3a] // CHECK:STDOUT: } -// CHECK:STDOUT: %b: %array_type = wrapper_binding b, %b.param +// CHECK:STDOUT: %b: %Array.b3a = wrapper_binding b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> out %return.param: %array_type; +// CHECK:STDOUT: fn @F() -> out %return.param: %Array.b3a; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%b.param: %array_type) { +// CHECK:STDOUT: fn @G(%b.param: %Array.b3a) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.b3a = var_storage %a.var_patt // CHECK:STDOUT: %int_1.loc18_27: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc18_30: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3.loc18_33: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] @@ -281,21 +285,21 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_2.loc18_34: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc18_34.9: ref %i32 = array_index %a.var, %int_2.loc18_34 // CHECK:STDOUT: %.loc18_34.10: init %i32 to %.loc18_34.9 = in_place_init %.loc18_34.8 [concrete = constants.%int_3.410] -// CHECK:STDOUT: %.loc18_34.11: init %array_type to %a.var = array_init (%.loc18_34.4, %.loc18_34.7, %.loc18_34.10) [concrete = constants.%array] -// CHECK:STDOUT: %.loc18_3: init %array_type = converted %.loc18_34.1, %.loc18_34.11 [concrete = constants.%array] +// CHECK:STDOUT: %.loc18_34.11: init %Array.b3a to %a.var = array_init (%.loc18_34.4, %.loc18_34.7, %.loc18_34.10) [concrete = constants.%array] +// CHECK:STDOUT: %.loc18_3: init %Array.b3a = converted %.loc18_34.1, %.loc18_34.11 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc18_3 -// CHECK:STDOUT: %.loc18_22: type = splice_block %array_type.loc18 [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc18_22: type = splice_block %Array.loc18 [concrete = constants.%Array.b3a] { // CHECK:STDOUT: %i32.loc18: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_3.loc18_21: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type.loc18: type = array_type %int_3.loc18_21, %i32.loc18 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.loc18: type = class_type @Array, @Array(constants.%i32, constants.%int_3.1ba) [concrete = constants.%Array.b3a] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.b3a = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.771 = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.771 = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.7a1 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.7a1 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %pa.var: ref %ptr.d08 = var_storage %pa.var_patt -// CHECK:STDOUT: %a.ref.loc21: ref %array_type = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc21: ref %Array.b3a = name_ref a, %a // CHECK:STDOUT: %int_0.loc21: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc21_28: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc21_28.1: = bound_method %int_0.loc21, %impl.elem0.loc21_28 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4] @@ -321,7 +325,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %pa.patt: %pattern_type.f00 = ref_binding_pattern pa [concrete = constants.%pa.patt] // CHECK:STDOUT: %pa.var_patt: %pattern_type.f00 = var_pattern %pa.patt [concrete = constants.%pa.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %a.ref.loc22: ref %array_type = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc22: ref %Array.b3a = name_ref a, %a // CHECK:STDOUT: %int_0.loc22: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc22_5: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc22_5.1: = bound_method %int_0.loc22, %impl.elem0.loc22_5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4] @@ -368,7 +372,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %Array.b3a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc18_3.1: ref %i32 = array_index %self.param, %int_2 @@ -385,18 +389,18 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.2(%self.param: ref %Array.b3a) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_3.2(%self.param: ref %Array.b3a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ValueBinding(%b.param: %array_type) { +// CHECK:STDOUT: fn @ValueBinding(%b.param: %Array.b3a) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.b3a = var_storage %a.var_patt // CHECK:STDOUT: %int_1.loc26_27: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc26_30: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3.loc26_33: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] @@ -428,20 +432,20 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_2.loc26_34: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc26_34.9: ref %i32 = array_index %a.var, %int_2.loc26_34 // CHECK:STDOUT: %.loc26_34.10: init %i32 to %.loc26_34.9 = in_place_init %.loc26_34.8 [concrete = constants.%int_3.410] -// CHECK:STDOUT: %.loc26_34.11: init %array_type to %a.var = array_init (%.loc26_34.4, %.loc26_34.7, %.loc26_34.10) [concrete = constants.%array] -// CHECK:STDOUT: %.loc26_3: init %array_type = converted %.loc26_34.1, %.loc26_34.11 [concrete = constants.%array] +// CHECK:STDOUT: %.loc26_34.11: init %Array.b3a to %a.var = array_init (%.loc26_34.4, %.loc26_34.7, %.loc26_34.10) [concrete = constants.%array] +// CHECK:STDOUT: %.loc26_3: init %Array.b3a = converted %.loc26_34.1, %.loc26_34.11 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc26_3 -// CHECK:STDOUT: %.loc26_22: type = splice_block %array_type.loc26 [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc26_22: type = splice_block %Array.loc26 [concrete = constants.%Array.b3a] { // CHECK:STDOUT: %i32.loc26: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_3.loc26_21: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type.loc26: type = array_type %int_3.loc26_21, %i32.loc26 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.loc26: type = class_type @Array, @Array(constants.%i32, constants.%int_3.1ba) [concrete = constants.%Array.b3a] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.b3a = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.771 = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.771 = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.7a1 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.7a1 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %Array.b3a = name_ref a, %a // CHECK:STDOUT: %int_0.loc30: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc30: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc30_5.1: = bound_method %int_0.loc30, %impl.elem0.loc30 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4] @@ -451,7 +455,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc30_5.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc30 [concrete = constants.%int_0.3c0] // CHECK:STDOUT: %.loc30_5.2: %i32 = converted %int_0.loc30, %.loc30_5.1 [concrete = constants.%int_0.3c0] // CHECK:STDOUT: %.loc30_6: ref %i32 = array_index %a.ref, %.loc30_5.2 -// CHECK:STDOUT: %b.ref: %array_type = name_ref b, %b +// CHECK:STDOUT: %b.ref: %Array.b3a = name_ref b, %b // CHECK:STDOUT: %int_0.loc31: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc31: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc31_5.1: = bound_method %int_0.loc31, %impl.elem0.loc31 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4] @@ -460,14 +464,14 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc31: init %i32 = call %bound_method.loc31_5.2(%int_0.loc31) [concrete = constants.%int_0.3c0] // CHECK:STDOUT: %.loc31_5.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc31 [concrete = constants.%int_0.3c0] // CHECK:STDOUT: %.loc31_5.2: %i32 = converted %int_0.loc31, %.loc31_5.1 [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc31_6.1: ref %array_type = value_as_ref %b.ref +// CHECK:STDOUT: %.loc31_6.1: ref %Array.b3a = value_as_ref %b.ref // CHECK:STDOUT: %.loc31_6.2: ref %i32 = array_index %.loc31_6.1, %.loc31_5.2 // CHECK:STDOUT: %.loc31_6.3: %i32 = acquire_value %.loc31_6.2 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %.loc32_5.1: ref %array_type = temporary_storage -// CHECK:STDOUT: %F.call: init %array_type to %.loc32_5.1 = call %F.ref() +// CHECK:STDOUT: %.loc32_5.1: ref %Array.b3a = temporary_storage +// CHECK:STDOUT: %F.call: init %Array.b3a to %.loc32_5.1 = call %F.ref() // CHECK:STDOUT: %int_0.loc32: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc32_5.2: ref %array_type = temporary %.loc32_5.1, %F.call +// CHECK:STDOUT: %.loc32_5.2: ref %Array.b3a = temporary %.loc32_5.1, %F.call // CHECK:STDOUT: %impl.elem0.loc32: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc32_7.1: = bound_method %int_0.loc32, %impl.elem0.loc32 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4] // CHECK:STDOUT: %specific_fn.loc32: = specific_function %impl.elem0.loc32, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] diff --git a/toolchain/check/testdata/index/fail_array_large_index.carbon b/toolchain/check/testdata/index/fail_array_large_index.carbon index 1d0d42cb6f14..e95693503ff5 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -33,13 +33,15 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.97e: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.97e = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.97e = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.096: type = class_type @Array, @Array(%i32, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.297: type = pattern_type %Array.096 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.297 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.297 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %int_12.6a3: Core.IntLiteral = int_value 12 [concrete] // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] // CHECK:STDOUT: %tuple.3bc: %tuple.type.985 = tuple_value (%int_12.6a3) [concrete] @@ -61,14 +63,14 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.46b: = bound_method %int_12.6a3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_12.8c7: %i32 = int_value 12 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.8c7) [concrete] +// CHECK:STDOUT: %array: %Array.096 = tuple_value (%int_12.8c7) [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.6b6 = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.6b6 = var_pattern %b.patt [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.094: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] // CHECK:STDOUT: %bound_method.953: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.0c6: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.b51: = impl_witness imports.%Copy.impl_witness_table.8d2, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3f6: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] @@ -88,12 +90,14 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1aa = impl_witness_table (%Core.import_ref.edf), @Core.IntLiteral.as.ImplicitAs.impl [concrete] @@ -110,16 +114,16 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt [concrete] -// CHECK:STDOUT: %.loc15: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %a.var: ref %Array.096 = var_storage %a.var_patt [concrete] +// CHECK:STDOUT: %.loc15: type = splice_block %Array [concrete = constants.%Array.096] { // CHECK:STDOUT: %i32.loc15: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32.loc15 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_1.5b8) [concrete = constants.%Array.096] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var [concrete = %a.var] +// CHECK:STDOUT: %a: ref %Array.096 = wrapper_binding a, %a.var [concrete = %a.var] // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.97e = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.97e = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.297 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.297 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref %i32 = var_storage %b.var_patt [concrete] // CHECK:STDOUT: %i32.loc21: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -150,10 +154,10 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc15_28.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc15_28.4: init %i32 to %.loc15_28.3 = in_place_init %.loc15_28.2 [concrete = constants.%int_12.8c7] -// CHECK:STDOUT: %.loc15_28.5: init %array_type to file.%a.var = array_init (%.loc15_28.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc15_1: init %array_type = converted %.loc15_28.1, %.loc15_28.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc15_28.5: init %Array.096 to file.%a.var = array_init (%.loc15_28.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc15_1: init %Array.096 = converted %.loc15_28.1, %.loc15_28.5 [concrete = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc15_1 -// CHECK:STDOUT: %a.ref.loc21: ref %array_type = name_ref a, file.%a [concrete = file.%a.var] +// CHECK:STDOUT: %a.ref.loc21: ref %Array.096 = name_ref a, file.%a [concrete = file.%a.var] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc21_16: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc21_16.1: = bound_method %int_1, %impl.elem0.loc21_16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.094] @@ -170,7 +174,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %bound_method.loc21_17.2: = bound_method %.loc21_17.2, %specific_fn.loc21_17 [concrete = ] // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc21: init %i32 = call %bound_method.loc21_17.2(%.loc21_17.2) [concrete = ] // CHECK:STDOUT: assign file.%b.var, %Int.as.Copy.impl.Op.call.loc21 -// CHECK:STDOUT: %a.ref.loc27: ref %array_type = name_ref a, file.%a [concrete = file.%a.var] +// CHECK:STDOUT: %a.ref.loc27: ref %Array.096 = name_ref a, file.%a [concrete = file.%a.var] // CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [concrete = constants.%int_2147483647.d89] // CHECK:STDOUT: %impl.elem0.loc27_16: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc27_16.1: = bound_method %int_2147483647, %impl.elem0.loc27_16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.91c] diff --git a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon index 8636e44c27ed..953e962c6f29 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -29,13 +29,15 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.97e: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.97e = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.97e = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.096: type = class_type @Array, @Array(%i32, %int_1) [concrete] +// CHECK:STDOUT: %pattern_type.297: type = pattern_type %Array.096 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.297 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.297 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %int_12.6a3: Core.IntLiteral = int_value 12 [concrete] // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] // CHECK:STDOUT: %tuple.3bc: %tuple.type.985 = tuple_value (%int_12.6a3) [concrete] @@ -57,12 +59,12 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_12.6a3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_12.8c7: %i32 = int_value 12 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.8c7) [concrete] +// CHECK:STDOUT: %array: %Array.096 = tuple_value (%int_12.8c7) [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.6b6 = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.6b6 = var_pattern %b.patt [concrete] // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 26e-1 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.b51: = impl_witness imports.%Copy.impl_witness_table.8d2, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3f6: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] @@ -76,12 +78,14 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1aa = impl_witness_table (%Core.import_ref.edf), @Core.IntLiteral.as.ImplicitAs.impl [concrete] @@ -97,16 +101,16 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt [concrete] -// CHECK:STDOUT: %.loc15: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %a.var: ref %Array.096 = var_storage %a.var_patt [concrete] +// CHECK:STDOUT: %.loc15: type = splice_block %Array [concrete = constants.%Array.096] { // CHECK:STDOUT: %i32.loc15: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32.loc15 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_1) [concrete = constants.%Array.096] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var [concrete = %a.var] +// CHECK:STDOUT: %a: ref %Array.096 = wrapper_binding a, %a.var [concrete = %a.var] // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.97e = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.97e = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.297 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.297 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref %i32 = var_storage %b.var_patt [concrete] // CHECK:STDOUT: %i32.loc23: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -130,10 +134,10 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc15_28.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc15_28.4: init %i32 to %.loc15_28.3 = in_place_init %.loc15_28.2 [concrete = constants.%int_12.8c7] -// CHECK:STDOUT: %.loc15_28.5: init %array_type to file.%a.var = array_init (%.loc15_28.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc15_1: init %array_type = converted %.loc15_28.1, %.loc15_28.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc15_28.5: init %Array.096 to file.%a.var = array_init (%.loc15_28.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc15_1: init %Array.096 = converted %.loc15_28.1, %.loc15_28.5 [concrete = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc15_1 -// CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, file.%a [concrete = file.%a.var] +// CHECK:STDOUT: %a.ref: ref %Array.096 = name_ref a, file.%a [concrete = file.%a.var] // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 26e-1 [concrete = constants.%float] // CHECK:STDOUT: %.loc23_16: %i32 = converted %float, [concrete = ] // CHECK:STDOUT: %.loc23_19.1: ref %i32 = array_index %a.ref, [concrete = ] diff --git a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon index 81e56b0b5615..b87cd4fc7cb8 100644 --- a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -26,13 +26,15 @@ var b: i32 = a[1]; // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.97e: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.97e = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.97e = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.096: type = class_type @Array, @Array(%i32, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.297: type = pattern_type %Array.096 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.297 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.297 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %int_12.6a3: Core.IntLiteral = int_value 12 [concrete] // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] // CHECK:STDOUT: %tuple.3bc: %tuple.type.985 = tuple_value (%int_12.6a3) [concrete] @@ -54,14 +56,14 @@ var b: i32 = a[1]; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.46b: = bound_method %int_12.6a3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_12.8c7: %i32 = int_value 12 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.8c7) [concrete] +// CHECK:STDOUT: %array: %Array.096 = tuple_value (%int_12.8c7) [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.6b6 = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.6b6 = var_pattern %b.patt [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.094: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] // CHECK:STDOUT: %bound_method.953: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.0c6: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.b51: = impl_witness imports.%Copy.impl_witness_table.8d2, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3f6: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] @@ -75,12 +77,14 @@ var b: i32 = a[1]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1aa = impl_witness_table (%Core.import_ref.edf), @Core.IntLiteral.as.ImplicitAs.impl [concrete] @@ -96,16 +100,16 @@ var b: i32 = a[1]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt [concrete] -// CHECK:STDOUT: %.loc15: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %a.var: ref %Array.096 = var_storage %a.var_patt [concrete] +// CHECK:STDOUT: %.loc15: type = splice_block %Array [concrete = constants.%Array.096] { // CHECK:STDOUT: %i32.loc15: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32.loc15 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_1.5b8) [concrete = constants.%Array.096] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var [concrete = %a.var] +// CHECK:STDOUT: %a: ref %Array.096 = wrapper_binding a, %a.var [concrete = %a.var] // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.97e = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.97e = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.297 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.297 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref %i32 = var_storage %b.var_patt [concrete] // CHECK:STDOUT: %i32.loc20: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -129,10 +133,10 @@ var b: i32 = a[1]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc15_28.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc15_28.4: init %i32 to %.loc15_28.3 = in_place_init %.loc15_28.2 [concrete = constants.%int_12.8c7] -// CHECK:STDOUT: %.loc15_28.5: init %array_type to file.%a.var = array_init (%.loc15_28.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc15_1: init %array_type = converted %.loc15_28.1, %.loc15_28.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc15_28.5: init %Array.096 to file.%a.var = array_init (%.loc15_28.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc15_1: init %Array.096 = converted %.loc15_28.1, %.loc15_28.5 [concrete = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc15_1 -// CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, file.%a [concrete = file.%a.var] +// CHECK:STDOUT: %a.ref: ref %Array.096 = name_ref a, file.%a [concrete = file.%a.var] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc20_16: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc20_16.1: = bound_method %int_1, %impl.elem0.loc20_16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.094] diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index 2fa431fcd37e..7b19d0d38a1d 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -51,15 +51,18 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [concrete] -// CHECK:STDOUT: %.2b2: Core.Form = init_form %array_type [concrete] -// CHECK:STDOUT: %pattern_type.771: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %return.param_patt.8a2: %pattern_type.771 = out_param_pattern [concrete] -// CHECK:STDOUT: %return.patt.2f6: %pattern_type.771 = return_slot_pattern %return.param_patt.8a2, %array_type [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Array.b3a: type = class_type @Array, @Array(%i32, %int_3) [concrete] +// CHECK:STDOUT: %.047: Core.Form = init_form %Array.b3a [concrete] +// CHECK:STDOUT: %pattern_type.7a1: type = pattern_type %Array.b3a [concrete] +// CHECK:STDOUT: %return.param_patt.1df: %pattern_type.7a1 = out_param_pattern [concrete] +// CHECK:STDOUT: %return.patt.4a8: %pattern_type.7a1 = return_slot_pattern %return.param_patt.1df, %Array.b3a [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.771 = value_param_pattern [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.771 = wrapper_binding_pattern b, %b.param_patt [concrete] +// CHECK:STDOUT: %b.param_patt: %pattern_type.7a1 = value_param_pattern [concrete] +// CHECK:STDOUT: %b.patt: %pattern_type.7a1 = wrapper_binding_pattern b, %b.param_patt [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.d08: type = ptr_type %i32 [concrete] @@ -85,7 +88,6 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %bound_method.6e0: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.3c0: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.ff5: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.ce9: %ptr.as.Copy.impl.Op.type.ff5 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.5df: = impl_witness imports.%Copy.impl_witness_table.fb0, @ptr.as.Copy.impl(%i32) [concrete] @@ -110,8 +112,8 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc41_5.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c42: %pattern_type.771 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3bc: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt.c42 [concrete] +// CHECK:STDOUT: %self.param_patt.717: %pattern_type.7a1 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.cb9: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt.717 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc41_5.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] @@ -133,6 +135,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: .Destroy = %Core.Destroy @@ -140,6 +143,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1aa = impl_witness_table (%Core.import_ref.edf), @Core.IntLiteral.as.ImplicitAs.impl [concrete] @@ -165,18 +169,18 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc41_5.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.771 = ref_param_pattern [concrete = constants.%self.param_patt.c42] -// CHECK:STDOUT: %self.patt: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3bc] +// CHECK:STDOUT: %self.param_patt: %pattern_type.7a1 = ref_param_pattern [concrete = constants.%self.param_patt.717] +// CHECK:STDOUT: %self.patt: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb9] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.b3a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.b3a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc41_5.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.771 = ref_param_pattern [concrete = constants.%self.param_patt.c42] -// CHECK:STDOUT: %self.patt: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3bc] +// CHECK:STDOUT: %self.param_patt: %pattern_type.7a1 = ref_param_pattern [concrete = constants.%self.param_patt.717] +// CHECK:STDOUT: %self.patt: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb9] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.b3a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.b3a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc36 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { // CHECK:STDOUT: %self.param_patt: %pattern_type.f00 = ref_param_pattern [concrete = constants.%self.param_patt.af0] @@ -202,36 +206,36 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %return.param_patt: %pattern_type.771 = out_param_pattern [concrete = constants.%return.param_patt.8a2] -// CHECK:STDOUT: %return.patt: %pattern_type.771 = return_slot_pattern %return.param_patt, %array_type [concrete = constants.%return.patt.2f6] +// CHECK:STDOUT: %return.param_patt: %pattern_type.7a1 = out_param_pattern [concrete = constants.%return.param_patt.1df] +// CHECK:STDOUT: %return.patt: %pattern_type.7a1 = return_slot_pattern %return.param_patt, %Array [concrete = constants.%return.patt.4a8] // CHECK:STDOUT: } { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [concrete = constants.%array_type] -// CHECK:STDOUT: %.loc15: Core.Form = init_form %array_type [concrete = constants.%.2b2] -// CHECK:STDOUT: %return.param: ref %array_type = out_param call_param0 -// CHECK:STDOUT: %return: ref %array_type = return_slot %return.param +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_3) [concrete = constants.%Array.b3a] +// CHECK:STDOUT: %.loc15: Core.Form = init_form %Array [concrete = constants.%.047] +// CHECK:STDOUT: %return.param: ref %Array.b3a = out_param call_param0 +// CHECK:STDOUT: %return: ref %Array.b3a = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %b.param_patt: %pattern_type.771 = value_param_pattern [concrete = constants.%b.param_patt] -// CHECK:STDOUT: %b.patt: %pattern_type.771 = wrapper_binding_pattern b, %b.param_patt [concrete = constants.%b.patt] +// CHECK:STDOUT: %b.param_patt: %pattern_type.7a1 = value_param_pattern [concrete = constants.%b.param_patt] +// CHECK:STDOUT: %b.patt: %pattern_type.7a1 = wrapper_binding_pattern b, %b.param_patt [concrete = constants.%b.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %b.param: %array_type = value_param call_param0 -// CHECK:STDOUT: %.loc17: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %b.param: %Array.b3a = value_param call_param0 +// CHECK:STDOUT: %.loc17: type = splice_block %Array [concrete = constants.%Array.b3a] { // CHECK:STDOUT: %i32.loc17: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32.loc17 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_3) [concrete = constants.%Array.b3a] // CHECK:STDOUT: } -// CHECK:STDOUT: %b: %array_type = wrapper_binding b, %b.param +// CHECK:STDOUT: %b: %Array.b3a = wrapper_binding b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> out %return.param: %array_type; +// CHECK:STDOUT: fn @F() -> out %return.param: %Array.b3a; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%b.param: %array_type) { +// CHECK:STDOUT: fn @G(%b.param: %Array.b3a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %pb.var: ref %ptr.d08 = var_storage %pb.var_patt -// CHECK:STDOUT: %b.ref.loc23: %array_type = name_ref b, %b +// CHECK:STDOUT: %b.ref.loc23: %Array.b3a = name_ref b, %b // CHECK:STDOUT: %int_0.loc23: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc23_28: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc23_28.1: = bound_method %int_0.loc23, %impl.elem0.loc23_28 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4] @@ -240,7 +244,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc23: init %i32 = call %bound_method.loc23_28.2(%int_0.loc23) [concrete = constants.%int_0.3c0] // CHECK:STDOUT: %.loc23_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc23 [concrete = constants.%int_0.3c0] // CHECK:STDOUT: %.loc23_28.2: %i32 = converted %int_0.loc23, %.loc23_28.1 [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc23_29.1: ref %array_type = value_as_ref %b.ref.loc23 +// CHECK:STDOUT: %.loc23_29.1: ref %Array.b3a = value_as_ref %b.ref.loc23 // CHECK:STDOUT: %.loc23_29.2: ref %i32 = array_index %.loc23_29.1, %.loc23_28.2 // CHECK:STDOUT: %.loc23_29.3: %i32 = acquire_value %.loc23_29.2 // CHECK:STDOUT: %addr.loc23: %ptr.d08 = addr_of [concrete = ] @@ -259,7 +263,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %pb.patt: %pattern_type.f00 = ref_binding_pattern pb [concrete = constants.%pb.patt] // CHECK:STDOUT: %pb.var_patt: %pattern_type.f00 = var_pattern %pb.patt [concrete = constants.%pb.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %b.ref.loc28: %array_type = name_ref b, %b +// CHECK:STDOUT: %b.ref.loc28: %Array.b3a = name_ref b, %b // CHECK:STDOUT: %int_0.loc28: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc28_5: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc28_5.1: = bound_method %int_0.loc28, %impl.elem0.loc28_5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4] @@ -268,7 +272,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc28_5: init %i32 = call %bound_method.loc28_5.2(%int_0.loc28) [concrete = constants.%int_0.3c0] // CHECK:STDOUT: %.loc28_5.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc28_5 [concrete = constants.%int_0.3c0] // CHECK:STDOUT: %.loc28_5.2: %i32 = converted %int_0.loc28, %.loc28_5.1 [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc28_6.1: ref %array_type = value_as_ref %b.ref.loc28 +// CHECK:STDOUT: %.loc28_6.1: ref %Array.b3a = value_as_ref %b.ref.loc28 // CHECK:STDOUT: %.loc28_6.2: ref %i32 = array_index %.loc28_6.1, %.loc28_5.2 // CHECK:STDOUT: %.loc28_6.3: %i32 = acquire_value %.loc28_6.2 // CHECK:STDOUT: %int_4.loc28: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] @@ -281,10 +285,10 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: assign %.loc28_6.3, %.loc28_8 // CHECK:STDOUT: %pf.var: ref %ptr.d08 = var_storage %pf.var_patt // CHECK:STDOUT: %F.ref.loc36: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %.loc36_28.1: ref %array_type = temporary_storage -// CHECK:STDOUT: %F.call.loc36: init %array_type to %.loc36_28.1 = call %F.ref.loc36() +// CHECK:STDOUT: %.loc36_28.1: ref %Array.b3a = temporary_storage +// CHECK:STDOUT: %F.call.loc36: init %Array.b3a to %.loc36_28.1 = call %F.ref.loc36() // CHECK:STDOUT: %int_0.loc36: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc36_28.2: ref %array_type = temporary %.loc36_28.1, %F.call.loc36 +// CHECK:STDOUT: %.loc36_28.2: ref %Array.b3a = temporary %.loc36_28.1, %F.call.loc36 // CHECK:STDOUT: %impl.elem0.loc36_30: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc36_30.1: = bound_method %int_0.loc36, %impl.elem0.loc36_30 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4] // CHECK:STDOUT: %specific_fn.loc36_30: = specific_function %impl.elem0.loc36_30, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] @@ -311,10 +315,10 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %pf.var_patt: %pattern_type.f00 = var_pattern %pf.patt [concrete = constants.%pf.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %F.ref.loc41: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %.loc41_5.1: ref %array_type = temporary_storage -// CHECK:STDOUT: %F.call.loc41: init %array_type to %.loc41_5.1 = call %F.ref.loc41() +// CHECK:STDOUT: %.loc41_5.1: ref %Array.b3a = temporary_storage +// CHECK:STDOUT: %F.call.loc41: init %Array.b3a to %.loc41_5.1 = call %F.ref.loc41() // CHECK:STDOUT: %int_0.loc41: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc41_5.2: ref %array_type = temporary %.loc41_5.1, %F.call.loc41 +// CHECK:STDOUT: %.loc41_5.2: ref %Array.b3a = temporary %.loc41_5.1, %F.call.loc41 // CHECK:STDOUT: %impl.elem0.loc41_7: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc41_7.1: = bound_method %int_0.loc41, %impl.elem0.loc41_7 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4] // CHECK:STDOUT: %specific_fn.loc41_7: = specific_function %impl.elem0.loc41_7, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] @@ -354,7 +358,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc41_5.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc41_5.2(%self.param: ref %Array.b3a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc41_5.1: ref %i32 = array_index %self.param, %int_2 @@ -371,9 +375,9 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc41_5.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc41_5.2(%self.param: ref %Array.b3a) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc41_5.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc41_5.2(%self.param: ref %Array.b3a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index 9d522d2be135..6ebc759ad358 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -27,13 +27,15 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.7b0: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %c.patt: %pattern_type.7b0 = ref_binding_pattern c [concrete] -// CHECK:STDOUT: %c.var_patt: %pattern_type.7b0 = var_pattern %c.patt [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.e69: type = class_type @Array, @Array(%i32, %int_2) [concrete] +// CHECK:STDOUT: %pattern_type.213: type = pattern_type %Array.e69 [concrete] +// CHECK:STDOUT: %c.patt: %pattern_type.213 = ref_binding_pattern c [concrete] +// CHECK:STDOUT: %c.var_patt: %pattern_type.213 = var_pattern %c.patt [concrete] // CHECK:STDOUT: %int_42.20e: Core.IntLiteral = int_value 42 [concrete] // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %tuple.df5: %tuple.type.f94 = tuple_value (%int_42.20e, %int_42.20e) [concrete] @@ -56,7 +58,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %bound_method.098: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_42.ac4: %i32 = int_value 42 [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%int_42.ac4, %int_42.ac4) [concrete] +// CHECK:STDOUT: %array: %Array.e69 = tuple_value (%int_42.ac4, %int_42.ac4) [concrete] // CHECK:STDOUT: %d.patt: %pattern_type.6b6 = ref_binding_pattern d [concrete] // CHECK:STDOUT: %d.var_patt: %pattern_type.6b6 = var_pattern %d.patt [concrete] // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete] @@ -73,7 +75,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %bound_method.27d: = bound_method %int_-10.06d, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_-10.642: %i32 = int_value -10 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.b51: = impl_witness imports.%Copy.impl_witness_table.8d2, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3f6: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] @@ -87,6 +89,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Negate = %Core.Negate // CHECK:STDOUT: .Copy = %Core.Copy @@ -94,6 +97,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1aa = impl_witness_table (%Core.import_ref.edf), @Core.IntLiteral.as.ImplicitAs.impl [concrete] @@ -113,16 +117,16 @@ var d: i32 = c[-10]; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %c.var: ref %array_type = var_storage %c.var_patt [concrete] -// CHECK:STDOUT: %.loc15: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %c.var: ref %Array.e69 = var_storage %c.var_patt [concrete] +// CHECK:STDOUT: %.loc15: type = splice_block %Array [concrete = constants.%Array.e69] { // CHECK:STDOUT: %i32.loc15: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] -// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32.loc15 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_2) [concrete = constants.%Array.e69] // CHECK:STDOUT: } -// CHECK:STDOUT: %c: ref %array_type = wrapper_binding c, %c.var [concrete = %c.var] +// CHECK:STDOUT: %c: ref %Array.e69 = wrapper_binding c, %c.var [concrete = %c.var] // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %c.patt: %pattern_type.7b0 = ref_binding_pattern c [concrete = constants.%c.patt] -// CHECK:STDOUT: %c.var_patt: %pattern_type.7b0 = var_pattern %c.patt [concrete = constants.%c.var_patt] +// CHECK:STDOUT: %c.patt: %pattern_type.213 = ref_binding_pattern c [concrete = constants.%c.patt] +// CHECK:STDOUT: %c.var_patt: %pattern_type.213 = var_pattern %c.patt [concrete = constants.%c.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %d.var: ref %i32 = var_storage %d.var_patt [concrete] // CHECK:STDOUT: %i32.loc20: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -156,10 +160,10 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %.loc15_31.6: ref %i32 = array_index file.%c.var, %int_1 // CHECK:STDOUT: %.loc15_31.7: init %i32 to %.loc15_31.6 = in_place_init %.loc15_31.5 [concrete = constants.%int_42.ac4] -// CHECK:STDOUT: %.loc15_31.8: init %array_type to file.%c.var = array_init (%.loc15_31.4, %.loc15_31.7) [concrete = constants.%array] -// CHECK:STDOUT: %.loc15_1: init %array_type = converted %.loc15_31.1, %.loc15_31.8 [concrete = constants.%array] +// CHECK:STDOUT: %.loc15_31.8: init %Array.e69 to file.%c.var = array_init (%.loc15_31.4, %.loc15_31.7) [concrete = constants.%array] +// CHECK:STDOUT: %.loc15_1: init %Array.e69 = converted %.loc15_31.1, %.loc15_31.8 [concrete = constants.%array] // CHECK:STDOUT: assign file.%c.var, %.loc15_1 -// CHECK:STDOUT: %c.ref: ref %array_type = name_ref c, file.%c [concrete = file.%c.var] +// CHECK:STDOUT: %c.ref: ref %Array.e69 = name_ref c, file.%c [concrete = file.%c.var] // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10] // CHECK:STDOUT: %impl.elem1: %.758 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] // CHECK:STDOUT: %bound_method.loc20_16.1: = bound_method %int_10, %impl.elem1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op.bound] diff --git a/toolchain/check/testdata/interop/cpp/class/export/class.carbon b/toolchain/check/testdata/interop/cpp/class/export/class.carbon index fc3cf7a89d5c..59344d74ebc7 100644 --- a/toolchain/check/testdata/interop/cpp/class/export/class.carbon +++ b/toolchain/check/testdata/interop/cpp/class/export/class.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/interop/cpp/function/export/array.carbon b/toolchain/check/testdata/interop/cpp/function/export/array.carbon index c6634349ec93..b69f3ceb77bc 100644 --- a/toolchain/check/testdata/interop/cpp/function/export/array.carbon +++ b/toolchain/check/testdata/interop/cpp/function/export/array.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/interop/cpp/function/import/decayed_param.carbon b/toolchain/check/testdata/interop/cpp/function/import/decayed_param.carbon index dcc1b95fe719..e3509fa50418 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/decayed_param.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/decayed_param.carbon @@ -89,23 +89,23 @@ fn F() { // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete] -// CHECK:STDOUT: %array_type.d58: type = array_type %int_42, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.c07: type = pattern_type %array_type.d58 [concrete] -// CHECK:STDOUT: %n.patt.dac: %pattern_type.c07 = ref_binding_pattern n [concrete] -// CHECK:STDOUT: %n.var_patt: %pattern_type.c07 = var_pattern %n.patt.dac [concrete] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Array.db6: type = class_type @Array, @Array(%i32, %int_42) [concrete] +// CHECK:STDOUT: %pattern_type.b4a: type = pattern_type %Array.db6 [concrete] +// CHECK:STDOUT: %n.patt.b66: %pattern_type.b4a = ref_binding_pattern n [concrete] +// CHECK:STDOUT: %n.var_patt: %pattern_type.b4a = var_pattern %n.patt.b66 [concrete] // CHECK:STDOUT: %DefaultOrUnformed.type: type = facet_type <@DefaultOrUnformed> [concrete] // CHECK:STDOUT: %UnformedInit.type: type = facet_type <@UnformedInit> [concrete] // CHECK:STDOUT: %T.fef: %UnformedInit.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.type.215: type = fn_type @T.as_type.as.DefaultOrUnformed.impl.Op.2, @T.as_type.as.DefaultOrUnformed.impl.52f(%T.fef) [symbolic] // CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.f65: %T.as_type.as.DefaultOrUnformed.impl.Op.type.215 = struct_value () [symbolic] -// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] // CHECK:STDOUT: %UnformedInit.impl_witness.0a2: = impl_witness imports.%UnformedInit.impl_witness_table.9b9, @Int.as.UnformedInit.impl(%int_32) [concrete] // CHECK:STDOUT: %UnformedInit.facet.cac: %UnformedInit.type = facet_value %i32, (%UnformedInit.impl_witness.0a2) [concrete] -// CHECK:STDOUT: %UnformedInit.impl_witness.768: = impl_witness imports.%UnformedInit.impl_witness_table.96b, @array_type.as.UnformedInit.impl(%UnformedInit.facet.cac, %int_42) [concrete] -// CHECK:STDOUT: %UnformedInit.facet.033: %UnformedInit.type = facet_value %array_type.d58, (%UnformedInit.impl_witness.768) [concrete] -// CHECK:STDOUT: %DefaultOrUnformed.impl_witness.06a: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.8f5, @T.as_type.as.DefaultOrUnformed.impl.52f(%UnformedInit.facet.033) [concrete] -// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %array_type.d58, (%DefaultOrUnformed.impl_witness.06a) [concrete] +// CHECK:STDOUT: %UnformedInit.impl_witness.4e2: = impl_witness imports.%UnformedInit.impl_witness_table.76f, @Array.as.UnformedInit.impl(%UnformedInit.facet.cac, %int_42) [concrete] +// CHECK:STDOUT: %UnformedInit.facet.3bd: %UnformedInit.type = facet_value %Array.db6, (%UnformedInit.impl_witness.4e2) [concrete] +// CHECK:STDOUT: %DefaultOrUnformed.impl_witness.a28: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.8f5, @T.as_type.as.DefaultOrUnformed.impl.52f(%UnformedInit.facet.3bd) [concrete] +// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %Array.db6, (%DefaultOrUnformed.impl_witness.a28) [concrete] // CHECK:STDOUT: %TakesArray.cpp_overload_set.type: type = cpp_overload_set_type @TakesArray.cpp_overload_set [concrete] // CHECK:STDOUT: %TakesArray.cpp_overload_set.value: %TakesArray.cpp_overload_set.type = cpp_overload_set_value @TakesArray.cpp_overload_set [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] @@ -204,7 +204,7 @@ fn F() { // CHECK:STDOUT: %bound_method.518: = bound_method %uninit, %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %TakesFunction.cpp_overload_set.type: type = cpp_overload_set_type @TakesFunction.cpp_overload_set [concrete] // CHECK:STDOUT: %TakesFunction.cpp_overload_set.value: %TakesFunction.cpp_overload_set.type = cpp_overload_set_value @TakesFunction.cpp_overload_set [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type7E000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type41000000 [concrete] // CHECK:STDOUT: %TakesFunction.type: type = fn_type @TakesFunction [concrete] // CHECK:STDOUT: %TakesFunction: %TakesFunction.type = struct_value () [concrete] // CHECK:STDOUT: %.266: %.659 = cpp_addr_of_fn %G, @G [concrete] @@ -216,8 +216,8 @@ fn F() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.6: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.087: %pattern_type.c07 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b22: %pattern_type.c07 = wrapper_binding_pattern self, %self.param_patt.087 [concrete] +// CHECK:STDOUT: %self.param_patt.d6f: %pattern_type.b4a = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.365: %pattern_type.b4a = wrapper_binding_pattern self, %self.param_patt.d6f [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] // CHECK:STDOUT: %int_41: Core.IntLiteral = int_value 41 [concrete] @@ -275,7 +275,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.083: @T.as_type.as.DefaultOrUnformed.impl.52f.%T.as_type.as.DefaultOrUnformed.impl.Op.type (%T.as_type.as.DefaultOrUnformed.impl.Op.type.215) = import_ref Core//prelude/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DefaultOrUnformed.impl.52f.%T.as_type.as.DefaultOrUnformed.impl.Op (constants.%T.as_type.as.DefaultOrUnformed.impl.Op.f65)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.8f5 = impl_witness_table (%Core.import_ref.083), @T.as_type.as.DefaultOrUnformed.impl.52f [concrete] -// CHECK:STDOUT: %UnformedInit.impl_witness_table.96b = impl_witness_table (), @array_type.as.UnformedInit.impl [concrete] +// CHECK:STDOUT: %UnformedInit.impl_witness_table.76f = impl_witness_table (), @Array.as.UnformedInit.impl [concrete] // CHECK:STDOUT: %UnformedInit.impl_witness_table.9b9 = impl_witness_table (), @Int.as.UnformedInit.impl [concrete] // CHECK:STDOUT: %TakesArray.cpp_overload_set.value: %TakesArray.cpp_overload_set.type = cpp_overload_set_value @TakesArray.cpp_overload_set [concrete = constants.%TakesArray.cpp_overload_set.value] // CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.0e9.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.0e9.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] @@ -371,45 +371,45 @@ fn F() { // CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c07 = ref_param_pattern [concrete = constants.%self.param_patt.087] -// CHECK:STDOUT: %self.patt: %pattern_type.c07 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b22] +// CHECK:STDOUT: %self.param_patt: %pattern_type.b4a = ref_param_pattern [concrete = constants.%self.param_patt.d6f] +// CHECK:STDOUT: %self.patt: %pattern_type.b4a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.365] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.d58 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.d58 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.db6 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.db6 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc10_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c07 = ref_param_pattern [concrete = constants.%self.param_patt.087] -// CHECK:STDOUT: %self.patt: %pattern_type.c07 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b22] +// CHECK:STDOUT: %self.param_patt: %pattern_type.b4a = ref_param_pattern [concrete = constants.%self.param_patt.d6f] +// CHECK:STDOUT: %self.patt: %pattern_type.b4a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.365] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.d58 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.d58 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.db6 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.db6 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.var: ref %array_type.d58 = var_storage %n.var_patt -// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value constants.%array_type.d58, (constants.%DefaultOrUnformed.impl_witness.06a) [concrete = constants.%DefaultOrUnformed.facet] -// CHECK:STDOUT: %.loc10_24.1: %DefaultOrUnformed.type = converted constants.%array_type.d58, %DefaultOrUnformed.facet [concrete = constants.%DefaultOrUnformed.facet] -// CHECK:STDOUT: %as_type: type = facet_access_type %.loc10_24.1 [concrete = constants.%array_type.d58] -// CHECK:STDOUT: %.loc10_24.2: type = converted %.loc10_24.1, %as_type [concrete = constants.%array_type.d58] +// CHECK:STDOUT: %n.var: ref %Array.db6 = var_storage %n.var_patt +// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value constants.%Array.db6, (constants.%DefaultOrUnformed.impl_witness.a28) [concrete = constants.%DefaultOrUnformed.facet] +// CHECK:STDOUT: %.loc10_24.1: %DefaultOrUnformed.type = converted constants.%Array.db6, %DefaultOrUnformed.facet [concrete = constants.%DefaultOrUnformed.facet] +// CHECK:STDOUT: %as_type: type = facet_access_type %.loc10_24.1 [concrete = constants.%Array.db6] +// CHECK:STDOUT: %.loc10_24.2: type = converted %.loc10_24.1, %as_type [concrete = constants.%Array.db6] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc10_3: ref %array_type.d58 = splice_block %n.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %array_type.d58 to %.loc10_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc10_3: ref %Array.db6 = splice_block %n.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %Array.db6 to %.loc10_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %n.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call -// CHECK:STDOUT: %.loc10_23: type = splice_block %array_type [concrete = constants.%array_type.d58] { +// CHECK:STDOUT: %.loc10_23: type = splice_block %Array [concrete = constants.%Array.db6] { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42] -// CHECK:STDOUT: %array_type: type = array_type %int_42, %i32 [concrete = constants.%array_type.d58] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_42) [concrete = constants.%Array.db6] // CHECK:STDOUT: } -// CHECK:STDOUT: %n: ref %array_type.d58 = wrapper_binding n, %n.var +// CHECK:STDOUT: %n: ref %Array.db6 = wrapper_binding n, %n.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %n.patt: %pattern_type.c07 = ref_binding_pattern n [concrete = constants.%n.patt.dac] -// CHECK:STDOUT: %n.var_patt: %pattern_type.c07 = var_pattern %n.patt [concrete = constants.%n.var_patt] +// CHECK:STDOUT: %n.patt: %pattern_type.b4a = ref_binding_pattern n [concrete = constants.%n.patt.b66] +// CHECK:STDOUT: %n.var_patt: %pattern_type.b4a = var_pattern %n.patt [concrete = constants.%n.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %TakesArray.ref.loc11: %TakesArray.cpp_overload_set.type = name_ref TakesArray, imports.%TakesArray.cpp_overload_set.value [concrete = constants.%TakesArray.cpp_overload_set.value] -// CHECK:STDOUT: %n.ref: ref %array_type.d58 = name_ref n, %n +// CHECK:STDOUT: %n.ref: ref %Array.db6 = name_ref n, %n // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc11_21: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc11_21.1: = bound_method %int_0, %impl.elem0.loc11_21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] @@ -504,7 +504,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %array_type.d58) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %Array.db6) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_41: Core.IntLiteral = int_value 41 [concrete = constants.%int_41] // CHECK:STDOUT: %.loc10_3.1: ref %i32 = array_index %self.param, %int_41 @@ -677,9 +677,9 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.2(%self.param: ref %array_type.d58) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.2(%self.param: ref %Array.db6) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.2(%self.param: ref %array_type.d58) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.2(%self.param: ref %Array.db6) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) @@ -699,10 +699,10 @@ fn F() { // CHECK:STDOUT: %Function.cpp_overload_set.type: type = cpp_overload_set_type @Function.cpp_overload_set [concrete] // CHECK:STDOUT: %Function.cpp_overload_set.value: %Function.cpp_overload_set.type = cpp_overload_set_value @Function.cpp_overload_set [concrete] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete] -// CHECK:STDOUT: %array_type.d58: type = array_type %int_42, %i32 [concrete] -// CHECK:STDOUT: %pattern_type.c07: type = pattern_type %array_type.d58 [concrete] -// CHECK:STDOUT: %n.patt.dac: %pattern_type.c07 = ref_binding_pattern n [concrete] -// CHECK:STDOUT: %n.var_patt: %pattern_type.c07 = var_pattern %n.patt.dac [concrete] +// CHECK:STDOUT: %Array.db6: type = class_type @Array, @Array(%i32, %int_42) [concrete] +// CHECK:STDOUT: %pattern_type.b4a: type = pattern_type %Array.db6 [concrete] +// CHECK:STDOUT: %n.patt.b66: %pattern_type.b4a = ref_binding_pattern n [concrete] +// CHECK:STDOUT: %n.var_patt: %pattern_type.b4a = var_pattern %n.patt.b66 [concrete] // CHECK:STDOUT: %DefaultOrUnformed.type: type = facet_type <@DefaultOrUnformed> [concrete] // CHECK:STDOUT: %UnformedInit.type: type = facet_type <@UnformedInit> [concrete] // CHECK:STDOUT: %T.fef: %UnformedInit.type = symbolic_binding T, 0 [symbolic] @@ -710,10 +710,10 @@ fn F() { // CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.f65: %T.as_type.as.DefaultOrUnformed.impl.Op.type.215 = struct_value () [symbolic] // CHECK:STDOUT: %UnformedInit.impl_witness.0a2: = impl_witness imports.%UnformedInit.impl_witness_table.9b9, @Int.as.UnformedInit.impl(%int_32) [concrete] // CHECK:STDOUT: %UnformedInit.facet.cac: %UnformedInit.type = facet_value %i32, (%UnformedInit.impl_witness.0a2) [concrete] -// CHECK:STDOUT: %UnformedInit.impl_witness.768: = impl_witness imports.%UnformedInit.impl_witness_table.96b, @array_type.as.UnformedInit.impl(%UnformedInit.facet.cac, %int_42) [concrete] -// CHECK:STDOUT: %UnformedInit.facet.033: %UnformedInit.type = facet_value %array_type.d58, (%UnformedInit.impl_witness.768) [concrete] -// CHECK:STDOUT: %DefaultOrUnformed.impl_witness.06a: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.8f5, @T.as_type.as.DefaultOrUnformed.impl.52f(%UnformedInit.facet.033) [concrete] -// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %array_type.d58, (%DefaultOrUnformed.impl_witness.06a) [concrete] +// CHECK:STDOUT: %UnformedInit.impl_witness.4e2: = impl_witness imports.%UnformedInit.impl_witness_table.76f, @Array.as.UnformedInit.impl(%UnformedInit.facet.cac, %int_42) [concrete] +// CHECK:STDOUT: %UnformedInit.facet.3bd: %UnformedInit.type = facet_value %Array.db6, (%UnformedInit.impl_witness.4e2) [concrete] +// CHECK:STDOUT: %DefaultOrUnformed.impl_witness.a28: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.8f5, @T.as_type.as.DefaultOrUnformed.impl.52f(%UnformedInit.facet.3bd) [concrete] +// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %Array.db6, (%DefaultOrUnformed.impl_witness.a28) [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.914: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] @@ -732,7 +732,7 @@ fn F() { // CHECK:STDOUT: %ptr.d08: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %Cpp.nullptr_t: type = class_type @NullptrT [concrete] // CHECK:STDOUT: %uninit: %Cpp.nullptr_t = uninitialized_value [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type41000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type61000000 [concrete] // CHECK:STDOUT: %TakesFunction.type: type = fn_type @TakesFunction [concrete] // CHECK:STDOUT: %TakesFunction: %TakesFunction.type = struct_value () [concrete] // CHECK:STDOUT: %self.param_patt.705: %pattern_type.6b6 = ref_param_pattern [concrete] @@ -743,8 +743,8 @@ fn F() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.087: %pattern_type.c07 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b22: %pattern_type.c07 = wrapper_binding_pattern self, %self.param_patt.087 [concrete] +// CHECK:STDOUT: %self.param_patt.d6f: %pattern_type.b4a = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.365: %pattern_type.b4a = wrapper_binding_pattern self, %self.param_patt.d6f [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] // CHECK:STDOUT: %int_41: Core.IntLiteral = int_value 41 [concrete] @@ -804,7 +804,7 @@ fn F() { // CHECK:STDOUT: %Function.cpp_overload_set.value: %Function.cpp_overload_set.type = cpp_overload_set_value @Function.cpp_overload_set [concrete = constants.%Function.cpp_overload_set.value] // CHECK:STDOUT: %Core.import_ref.083: @T.as_type.as.DefaultOrUnformed.impl.52f.%T.as_type.as.DefaultOrUnformed.impl.Op.type (%T.as_type.as.DefaultOrUnformed.impl.Op.type.215) = import_ref Core//prelude/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DefaultOrUnformed.impl.52f.%T.as_type.as.DefaultOrUnformed.impl.Op (constants.%T.as_type.as.DefaultOrUnformed.impl.Op.f65)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.8f5 = impl_witness_table (%Core.import_ref.083), @T.as_type.as.DefaultOrUnformed.impl.52f [concrete] -// CHECK:STDOUT: %UnformedInit.impl_witness_table.96b = impl_witness_table (), @array_type.as.UnformedInit.impl [concrete] +// CHECK:STDOUT: %UnformedInit.impl_witness_table.76f = impl_witness_table (), @Array.as.UnformedInit.impl [concrete] // CHECK:STDOUT: %UnformedInit.impl_witness_table.9b9 = impl_witness_table (), @Int.as.UnformedInit.impl [concrete] // CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.0e9.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.0e9.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1aa = impl_witness_table (%Core.import_ref.edf), @Core.IntLiteral.as.ImplicitAs.impl.0e9 [concrete] @@ -831,18 +831,18 @@ fn F() { // CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c07 = ref_param_pattern [concrete = constants.%self.param_patt.087] -// CHECK:STDOUT: %self.patt: %pattern_type.c07 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b22] +// CHECK:STDOUT: %self.param_patt: %pattern_type.b4a = ref_param_pattern [concrete = constants.%self.param_patt.d6f] +// CHECK:STDOUT: %self.patt: %pattern_type.b4a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.365] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.d58 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.d58 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.db6 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.db6 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc16_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c07 = ref_param_pattern [concrete = constants.%self.param_patt.087] -// CHECK:STDOUT: %self.patt: %pattern_type.c07 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b22] +// CHECK:STDOUT: %self.param_patt: %pattern_type.b4a = ref_param_pattern [concrete = constants.%self.param_patt.d6f] +// CHECK:STDOUT: %self.patt: %pattern_type.b4a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.365] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type.d58 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type.d58 = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.db6 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.db6 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -852,28 +852,28 @@ fn F() { // CHECK:STDOUT: %TakesFunction.ref.loc14: %TakesFunction.cpp_overload_set.type = name_ref TakesFunction, imports.%TakesFunction.cpp_overload_set.value [concrete = constants.%TakesFunction.cpp_overload_set.value] // CHECK:STDOUT: %Cpp.ref.loc14_21: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %Function.ref: %Function.cpp_overload_set.type = name_ref Function, imports.%Function.cpp_overload_set.value [concrete = constants.%Function.cpp_overload_set.value] -// CHECK:STDOUT: %n.var: ref %array_type.d58 = var_storage %n.var_patt -// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value constants.%array_type.d58, (constants.%DefaultOrUnformed.impl_witness.06a) [concrete = constants.%DefaultOrUnformed.facet] -// CHECK:STDOUT: %.loc16_24.1: %DefaultOrUnformed.type = converted constants.%array_type.d58, %DefaultOrUnformed.facet [concrete = constants.%DefaultOrUnformed.facet] -// CHECK:STDOUT: %as_type: type = facet_access_type %.loc16_24.1 [concrete = constants.%array_type.d58] -// CHECK:STDOUT: %.loc16_24.2: type = converted %.loc16_24.1, %as_type [concrete = constants.%array_type.d58] +// CHECK:STDOUT: %n.var: ref %Array.db6 = var_storage %n.var_patt +// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value constants.%Array.db6, (constants.%DefaultOrUnformed.impl_witness.a28) [concrete = constants.%DefaultOrUnformed.facet] +// CHECK:STDOUT: %.loc16_24.1: %DefaultOrUnformed.type = converted constants.%Array.db6, %DefaultOrUnformed.facet [concrete = constants.%DefaultOrUnformed.facet] +// CHECK:STDOUT: %as_type: type = facet_access_type %.loc16_24.1 [concrete = constants.%Array.db6] +// CHECK:STDOUT: %.loc16_24.2: type = converted %.loc16_24.1, %as_type [concrete = constants.%Array.db6] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc16_3: ref %array_type.d58 = splice_block %n.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %array_type.d58 to %.loc16_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc16_3: ref %Array.db6 = splice_block %n.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %Array.db6 to %.loc16_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %n.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call -// CHECK:STDOUT: %.loc16_23: type = splice_block %array_type [concrete = constants.%array_type.d58] { +// CHECK:STDOUT: %.loc16_23: type = splice_block %Array [concrete = constants.%Array.db6] { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42] -// CHECK:STDOUT: %array_type: type = array_type %int_42, %i32 [concrete = constants.%array_type.d58] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_42) [concrete = constants.%Array.db6] // CHECK:STDOUT: } -// CHECK:STDOUT: %n: ref %array_type.d58 = wrapper_binding n, %n.var +// CHECK:STDOUT: %n: ref %Array.db6 = wrapper_binding n, %n.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %n.patt: %pattern_type.c07 = ref_binding_pattern n [concrete = constants.%n.patt.dac] -// CHECK:STDOUT: %n.var_patt: %pattern_type.c07 = var_pattern %n.patt [concrete = constants.%n.var_patt] +// CHECK:STDOUT: %n.patt: %pattern_type.b4a = ref_binding_pattern n [concrete = constants.%n.patt.b66] +// CHECK:STDOUT: %n.var_patt: %pattern_type.b4a = var_pattern %n.patt [concrete = constants.%n.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Cpp.ref.loc25: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %TakesFunction.ref.loc25: %TakesFunction.cpp_overload_set.type = name_ref TakesFunction, imports.%TakesFunction.cpp_overload_set.value [concrete = constants.%TakesFunction.cpp_overload_set.value] -// CHECK:STDOUT: %n.ref: ref %array_type.d58 = name_ref n, %n +// CHECK:STDOUT: %n.ref: ref %Array.db6 = name_ref n, %n // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc25_24.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] @@ -907,7 +907,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %array_type.d58) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %Array.db6) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_41: Core.IntLiteral = int_value 41 [concrete = constants.%int_41] // CHECK:STDOUT: %.loc16_3.1: ref %i32 = array_index %self.param, %int_41 @@ -1080,9 +1080,9 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.2(%self.param: ref %array_type.d58) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.2(%self.param: ref %Array.db6) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_3.2(%self.param: ref %array_type.d58) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_3.2(%self.param: ref %Array.db6) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) diff --git a/toolchain/check/testdata/interop/cpp/function/import/function_ptr.carbon b/toolchain/check/testdata/interop/cpp/function/import/function_ptr.carbon index 328ec0e9765e..5c6423223e56 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/function_ptr.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/function_ptr.carbon @@ -229,7 +229,7 @@ fn F() { // CHECK:STDOUT: %TakeCallback.cpp_overload_set.value: %TakeCallback.cpp_overload_set.type = cpp_overload_set_value @TakeCallback.cpp_overload_set [concrete] // CHECK:STDOUT: %GetCallback.cpp_overload_set.type: type = cpp_overload_set_type @GetCallback.cpp_overload_set [concrete] // CHECK:STDOUT: %GetCallback.cpp_overload_set.value: %GetCallback.cpp_overload_set.type = cpp_overload_set_value @GetCallback.cpp_overload_set [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type7E000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type41000000 [concrete] // CHECK:STDOUT: %GetCallback.type: type = fn_type @GetCallback [concrete] // CHECK:STDOUT: %GetCallback: %GetCallback.type = struct_value () [concrete] // CHECK:STDOUT: %TakeCallback.type: type = fn_type @TakeCallback [concrete] @@ -279,7 +279,7 @@ fn F() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %MyCallback.type: type = fn_type @MyCallback [concrete] // CHECK:STDOUT: %MyCallback: %MyCallback.type = struct_value () [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type41000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type61000000 [concrete] // CHECK:STDOUT: %pattern_type.4b7: type = pattern_type %.659 [concrete] // CHECK:STDOUT: %fn_ptr.patt: %pattern_type.4b7 = ref_binding_pattern fn_ptr [concrete] // CHECK:STDOUT: %fn_ptr.var_patt: %pattern_type.4b7 = var_pattern %fn_ptr.patt [concrete] @@ -380,7 +380,7 @@ fn F() { // CHECK:STDOUT: %MyCallback: %MyCallback.type = struct_value () [concrete] // CHECK:STDOUT: %TakeCallback.cpp_overload_set.type: type = cpp_overload_set_type @TakeCallback.cpp_overload_set [concrete] // CHECK:STDOUT: %TakeCallback.cpp_overload_set.value: %TakeCallback.cpp_overload_set.type = cpp_overload_set_value @TakeCallback.cpp_overload_set [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type61000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type51000000 [concrete] // CHECK:STDOUT: %TakeCallback.type: type = fn_type @TakeCallback [concrete] // CHECK:STDOUT: %TakeCallback: %TakeCallback.type = struct_value () [concrete] // CHECK:STDOUT: %.fc9: %.659 = cpp_addr_of_fn %MyCallback, @MyCallback [concrete] @@ -423,7 +423,7 @@ fn F() { // CHECK:STDOUT: %x.var_patt: %pattern_type.6b6 = var_pattern %x.patt [concrete] // CHECK:STDOUT: %GetCallback.cpp_overload_set.type: type = cpp_overload_set_type @GetCallback.cpp_overload_set [concrete] // CHECK:STDOUT: %GetCallback.cpp_overload_set.value: %GetCallback.cpp_overload_set.type = cpp_overload_set_value @GetCallback.cpp_overload_set [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type51000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type71000000 [concrete] // CHECK:STDOUT: %GetCallback.type: type = fn_type @GetCallback [concrete] // CHECK:STDOUT: %GetCallback: %GetCallback.type = struct_value () [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] @@ -600,7 +600,7 @@ fn F() { // CHECK:STDOUT: %TakeComplexCallback.cpp_overload_set.value: %TakeComplexCallback.cpp_overload_set.type = cpp_overload_set_value @TakeComplexCallback.cpp_overload_set [concrete] // CHECK:STDOUT: %GetComplexCallback.cpp_overload_set.type: type = cpp_overload_set_type @GetComplexCallback.cpp_overload_set [concrete] // CHECK:STDOUT: %GetComplexCallback.cpp_overload_set.value: %GetComplexCallback.cpp_overload_set.type = cpp_overload_set_value @GetComplexCallback.cpp_overload_set [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type71000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type49000000 [concrete] // CHECK:STDOUT: %GetComplexCallback.type: type = fn_type @GetComplexCallback [concrete] // CHECK:STDOUT: %GetComplexCallback: %GetComplexCallback.type = struct_value () [concrete] // CHECK:STDOUT: %TakeComplexCallback.type: type = fn_type @TakeComplexCallback [concrete] @@ -648,7 +648,7 @@ fn F() { // CHECK:STDOUT: %MyCallback.type: type = fn_type @MyCallback [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %MyCallback: %MyCallback.type = struct_value () [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type49000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type69000000 [concrete] // CHECK:STDOUT: %pattern_type.4b7: type = pattern_type %.659 [concrete] // CHECK:STDOUT: %fn_ptr.patt: %pattern_type.4b7 = ref_binding_pattern fn_ptr [concrete] // CHECK:STDOUT: %fn_ptr.var_patt: %pattern_type.4b7 = var_pattern %fn_ptr.patt [concrete] @@ -753,7 +753,7 @@ fn F() { // CHECK:STDOUT: %MyCallback: %MyCallback.type = struct_value () [concrete] // CHECK:STDOUT: %TakeComplexCallback.cpp_overload_set.type: type = cpp_overload_set_type @TakeComplexCallback.cpp_overload_set [concrete] // CHECK:STDOUT: %TakeComplexCallback.cpp_overload_set.value: %TakeComplexCallback.cpp_overload_set.type = cpp_overload_set_value @TakeComplexCallback.cpp_overload_set [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type69000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type59000000 [concrete] // CHECK:STDOUT: %TakeComplexCallback.type: type = fn_type @TakeComplexCallback [concrete] // CHECK:STDOUT: %TakeComplexCallback: %TakeComplexCallback.type = struct_value () [concrete] // CHECK:STDOUT: %.fc9: %.659 = cpp_addr_of_fn %MyCallback, @MyCallback [concrete] @@ -796,7 +796,7 @@ fn F() { // CHECK:STDOUT: %x.var_patt: %pattern_type.bbc = var_pattern %x.patt [concrete] // CHECK:STDOUT: %GetComplexCallback.cpp_overload_set.type: type = cpp_overload_set_type @GetComplexCallback.cpp_overload_set [concrete] // CHECK:STDOUT: %GetComplexCallback.cpp_overload_set.value: %GetComplexCallback.cpp_overload_set.type = cpp_overload_set_value @GetComplexCallback.cpp_overload_set [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type59000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type79000000 [concrete] // CHECK:STDOUT: %GetComplexCallback.type: type = fn_type @GetComplexCallback [concrete] // CHECK:STDOUT: %GetComplexCallback: %GetComplexCallback.type = struct_value () [concrete] // CHECK:STDOUT: %C.C.cpp_overload_set.type: type = cpp_overload_set_type @C.C.cpp_overload_set [concrete] @@ -911,7 +911,7 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type79000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type45000000 [concrete] // CHECK:STDOUT: %pattern_type.4b7: type = pattern_type %.659 [concrete] // CHECK:STDOUT: %callback.patt: %pattern_type.4b7 = ref_binding_pattern callback [concrete] // CHECK:STDOUT: %callback.var_patt: %pattern_type.4b7 = var_pattern %callback.patt [concrete] diff --git a/toolchain/check/testdata/interop/cpp/function/import/method_ptr.carbon b/toolchain/check/testdata/interop/cpp/function/import/method_ptr.carbon index 145b2337f2f6..70921494eea1 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/method_ptr.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/method_ptr.carbon @@ -169,7 +169,7 @@ fn G() { // CHECK:STDOUT: %TakeMethodPtr.cpp_overload_set.value: %TakeMethodPtr.cpp_overload_set.type = cpp_overload_set_value @TakeMethodPtr.cpp_overload_set [concrete] // CHECK:STDOUT: %GetMethodPtr.cpp_overload_set.type: type = cpp_overload_set_type @GetMethodPtr.cpp_overload_set [concrete] // CHECK:STDOUT: %GetMethodPtr.cpp_overload_set.value: %GetMethodPtr.cpp_overload_set.type = cpp_overload_set_value @GetMethodPtr.cpp_overload_set [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type7E000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type41000000 [concrete] // CHECK:STDOUT: %pattern_type.4b7: type = pattern_type %.659 [concrete] // CHECK:STDOUT: %ptr.796: type = ptr_type %.659 [concrete] // CHECK:STDOUT: %GetMethodPtr__carbon_thunk.type: type = fn_type @GetMethodPtr__carbon_thunk [concrete] @@ -276,7 +276,7 @@ fn G() { // CHECK:STDOUT: %C.Method.type: type = fn_type @C.Method [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %C.Method: %C.Method.type = struct_value () [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type41000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type61000000 [concrete] // CHECK:STDOUT: %pattern_type.4b7: type = pattern_type %.659 [concrete] // CHECK:STDOUT: %ptr.patt: %pattern_type.4b7 = ref_binding_pattern ptr [concrete] // CHECK:STDOUT: %ptr.var_patt: %pattern_type.4b7 = var_pattern %ptr.patt [concrete] @@ -377,7 +377,7 @@ fn G() { // CHECK:STDOUT: %C.Method: %C.Method.type = struct_value () [concrete] // CHECK:STDOUT: %TakeGenericMethodPtr.cpp_overload_set.type: type = cpp_overload_set_type @TakeGenericMethodPtr.cpp_overload_set [concrete] // CHECK:STDOUT: %TakeGenericMethodPtr.cpp_overload_set.value: %TakeGenericMethodPtr.cpp_overload_set.type = cpp_overload_set_value @TakeGenericMethodPtr.cpp_overload_set [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type61000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type51000000 [concrete] // CHECK:STDOUT: %pattern_type.4b7: type = pattern_type %.659 [concrete] // CHECK:STDOUT: %ptr.796: type = ptr_type %.659 [concrete] // CHECK:STDOUT: %TakeGenericMethodPtr__carbon_thunk.type: type = fn_type @TakeGenericMethodPtr__carbon_thunk [concrete] @@ -475,7 +475,7 @@ fn G() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %C.Method.type: type = fn_type @C.Method [concrete] // CHECK:STDOUT: %C.Method: %C.Method.type = struct_value () [concrete] -// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type69000000 [concrete] +// CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type59000000 [concrete] // CHECK:STDOUT: %pattern_type.4b7: type = pattern_type %.659 [concrete] // CHECK:STDOUT: %ptr.patt: %pattern_type.4b7 = ref_binding_pattern ptr [concrete] // CHECK:STDOUT: %ptr.var_patt: %pattern_type.4b7 = var_pattern %ptr.patt [concrete] diff --git a/toolchain/check/testdata/interop/cpp/macros/macros.carbon b/toolchain/check/testdata/interop/cpp/macros/macros.carbon index 5a7b1c2198c5..0adcc686338b 100644 --- a/toolchain/check/testdata/interop/cpp/macros/macros.carbon +++ b/toolchain/check/testdata/interop/cpp/macros/macros.carbon @@ -1086,7 +1086,7 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %f32.c73: type = class_type @Float, @Float(%int_32) [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_1.0c6: %i32 = int_value 1 [concrete] @@ -1104,16 +1104,16 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.69e, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f53: = bound_method %int_1.0c6, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.c73 [concrete] -// CHECK:STDOUT: %pattern_type.18b: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.0a4: type = class_type @Array, @Array(%f32.c73, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.c23: type = pattern_type %Array.0a4 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.6da) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.ed3: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.c73)> [concrete] -// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] +// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.2fa: = impl_witness imports.%ImplicitAs.impl_witness_table.1e0, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.a62: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] @@ -1126,7 +1126,7 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3e4: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.943: %f32.c73 = float_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%float.943) [concrete] +// CHECK:STDOUT: %array: %Array.0a4 = tuple_value (%float.943) [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.240 = value_binding_pattern b [concrete] // CHECK:STDOUT: %n.patt: %pattern_type.240 = ref_binding_pattern n [concrete] // CHECK:STDOUT: %n.var_patt: %pattern_type.240 = var_pattern %n.patt [concrete] @@ -1138,8 +1138,8 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c06: %pattern_type.18b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a67: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt.c06 [concrete] +// CHECK:STDOUT: %self.param_patt.bc8: %pattern_type.c23 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.5b5: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt.bc8 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_3.2 [concrete] @@ -1183,24 +1183,24 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: %self: ref %f32.c73 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.0a4 = var_storage %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da] // CHECK:STDOUT: %.loc10_42.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] // CHECK:STDOUT: %impl.elem0.loc10_42: %.7fe = impl_witness_access constants.%ImplicitAs.impl_witness.2fa, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37] @@ -1212,10 +1212,10 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc10_42.3: ref %f32.c73 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc10_42.4: init %f32.c73 to %.loc10_42.3 = in_place_init %.loc10_42.2 [concrete = constants.%float.943] -// CHECK:STDOUT: %.loc10_42.5: init %array_type to %a.var = array_init (%.loc10_42.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc10_3: init %array_type = converted %.loc10_42.1, %.loc10_42.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc10_42.5: init %Array.0a4 to %a.var = array_init (%.loc10_42.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc10_3: init %Array.0a4 = converted %.loc10_42.1, %.loc10_42.5 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc10_3 -// CHECK:STDOUT: %.loc10_33: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc10_33: type = splice_block %Array [concrete = constants.%Array.0a4] { // CHECK:STDOUT: %f32.loc10: type = type_literal constants.%f32.c73 [concrete = constants.%f32.c73] // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: @@ -1227,12 +1227,12 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc10_31.2(%n.ref.loc10) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc10_31.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc10_31.2: Core.IntLiteral = converted %n.ref.loc10, %.loc10_31.1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %.loc10_31.2, %f32.loc10 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%f32.c73, constants.%int_1.5b8) [concrete = constants.%Array.0a4] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.0a4 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Cpp.ref.loc12: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %X.ref: = name_ref X, imports.%X [concrete = imports.%X] @@ -1260,7 +1260,7 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc10: ref %f32.c73 = array_index %self.param, %int_0 @@ -1269,9 +1269,9 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.2(%self.param: ref %Array.0a4) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) diff --git a/toolchain/check/testdata/interop/cpp/primitive_types/array.carbon b/toolchain/check/testdata/interop/cpp/primitive_types/array.carbon index fdb278911736..9d21e6e7b956 100644 --- a/toolchain/check/testdata/interop/cpp/primitive_types/array.carbon +++ b/toolchain/check/testdata/interop/cpp/primitive_types/array.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.darwin.carbon b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.darwin.carbon index e39cfb63b904..88e1a9645688 100644 --- a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.darwin.carbon +++ b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.darwin.carbon @@ -630,7 +630,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Cpp.long: type = class_type @Long64 [concrete] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.ada: type = pattern_type %Cpp.long [concrete] // CHECK:STDOUT: %cpp_long.patt: %pattern_type.ada = value_binding_pattern cpp_long [concrete] @@ -671,16 +671,16 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.type.ae6f4c.2: type = fn_type @Cpp.long.as.ImplicitAs.impl.Convert.2 [concrete] // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.3cefb0.2: %Cpp.long.as.ImplicitAs.impl.Convert.type.ae6f4c.2 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.33f, %Cpp.long.as.ImplicitAs.impl.Convert.3cefb0.2 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.c73 [concrete] -// CHECK:STDOUT: %pattern_type.18b: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.0a4: type = class_type @Array, @Array(%f32.c73, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.c23: type = pattern_type %Array.0a4 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.6da) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.ed3: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.c73)> [concrete] -// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] +// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.2fa: = impl_witness imports.%ImplicitAs.impl_witness_table.1e0, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.a62: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] @@ -693,7 +693,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.943: %f32.c73 = float_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%float.943) [concrete] +// CHECK:STDOUT: %array: %Array.0a4 = tuple_value (%float.943) [concrete] // CHECK:STDOUT: %self.param_patt.c62: %pattern_type.240 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.ed0: %pattern_type.240 = wrapper_binding_pattern self, %self.param_patt.c62 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] @@ -702,8 +702,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c06: %pattern_type.18b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a67: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt.c06 [concrete] +// CHECK:STDOUT: %self.param_patt.bc8: %pattern_type.c23 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.5b5: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt.bc8 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] @@ -745,18 +745,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %self: ref %f32.c73 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -787,7 +787,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %carbon_long.patt: %pattern_type.f57 = value_binding_pattern carbon_long [concrete = constants.%carbon_long.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.0a4 = var_storage %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da] // CHECK:STDOUT: %.loc11_50.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] // CHECK:STDOUT: %impl.elem0.loc11_50: %.7fe = impl_witness_access constants.%ImplicitAs.impl_witness.2fa, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37] @@ -799,10 +799,10 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11_50.3: ref %f32.c73 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc11_50.4: init %f32.c73 to %.loc11_50.3 = in_place_init %.loc11_50.2 [concrete = constants.%float.943] -// CHECK:STDOUT: %.loc11_50.5: init %array_type to %a.var = array_init (%.loc11_50.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_50.1, %.loc11_50.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_50.5: init %Array.0a4 to %a.var = array_init (%.loc11_50.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_3: init %Array.0a4 = converted %.loc11_50.1, %.loc11_50.5 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc11_3 -// CHECK:STDOUT: %.loc11_41: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc11_41: type = splice_block %Array [concrete = constants.%Array.0a4] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.c73 [concrete = constants.%f32.c73] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -817,12 +817,12 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.call.loc11: init Core.IntLiteral = call %bound_method.loc11_30.2(%.loc11_30.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_30.3: Core.IntLiteral = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc11 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_30.4: Core.IntLiteral = converted %.loc11_30.2, %.loc11_30.3 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %.loc11_30.4, %f32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%f32.c73, constants.%int_1.5b8) [concrete = constants.%Array.0a4] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.0a4 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) @@ -840,7 +840,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11: ref %f32.c73 = array_index %self.param, %int_0 @@ -849,9 +849,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.0a4) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) @@ -865,7 +865,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Cpp.unsigned_long: type = class_type @ULong64 [concrete] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.172: type = pattern_type %Cpp.unsigned_long [concrete] // CHECK:STDOUT: %cpp_unsigned_long.patt: %pattern_type.172 = value_binding_pattern cpp_unsigned_long [concrete] @@ -906,16 +906,16 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.ae6f4c.2: type = fn_type @Cpp.unsigned_long.as.ImplicitAs.impl.Convert.2 [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.3cefb0.2: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.ae6f4c.2 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.9e8, %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.3cefb0.2 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.c73 [concrete] -// CHECK:STDOUT: %pattern_type.18b: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.0a4: type = class_type @Array, @Array(%f32.c73, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.c23: type = pattern_type %Array.0a4 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.6da) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.ed3: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.c73)> [concrete] -// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] +// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.2fa: = impl_witness imports.%ImplicitAs.impl_witness_table.1e0, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.a62: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] @@ -928,7 +928,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.943: %f32.c73 = float_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%float.943) [concrete] +// CHECK:STDOUT: %array: %Array.0a4 = tuple_value (%float.943) [concrete] // CHECK:STDOUT: %self.param_patt.c62: %pattern_type.240 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.ed0: %pattern_type.240 = wrapper_binding_pattern self, %self.param_patt.c62 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] @@ -937,8 +937,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c06: %pattern_type.18b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a67: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt.c06 [concrete] +// CHECK:STDOUT: %self.param_patt.bc8: %pattern_type.c23 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.5b5: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt.bc8 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] @@ -980,18 +980,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %self: ref %f32.c73 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1022,7 +1022,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %carbon_unsigned_long.patt: %pattern_type.b35 = value_binding_pattern carbon_unsigned_long [concrete = constants.%carbon_unsigned_long.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.0a4 = var_storage %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da] // CHECK:STDOUT: %.loc11_59.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] // CHECK:STDOUT: %impl.elem0.loc11_59: %.7fe = impl_witness_access constants.%ImplicitAs.impl_witness.2fa, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37] @@ -1034,10 +1034,10 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11_59.3: ref %f32.c73 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc11_59.4: init %f32.c73 to %.loc11_59.3 = in_place_init %.loc11_59.2 [concrete = constants.%float.943] -// CHECK:STDOUT: %.loc11_59.5: init %array_type to %a.var = array_init (%.loc11_59.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_59.1, %.loc11_59.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_59.5: init %Array.0a4 to %a.var = array_init (%.loc11_59.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_3: init %Array.0a4 = converted %.loc11_59.1, %.loc11_59.5 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc11_3 -// CHECK:STDOUT: %.loc11_50: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc11_50: type = splice_block %Array [concrete = constants.%Array.0a4] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.c73 [concrete = constants.%f32.c73] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1052,12 +1052,12 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc11: init Core.IntLiteral = call %bound_method.loc11_30.2(%.loc11_30.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_30.3: Core.IntLiteral = value_of_initializer %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc11 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_30.4: Core.IntLiteral = converted %.loc11_30.2, %.loc11_30.3 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %.loc11_30.4, %f32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%f32.c73, constants.%int_1.5b8) [concrete = constants.%Array.0a4] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.0a4 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) @@ -1075,7 +1075,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11: ref %f32.c73 = array_index %self.param, %int_0 @@ -1084,9 +1084,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.0a4) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) @@ -1099,7 +1099,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.f57: type = pattern_type %i64 [concrete] // CHECK:STDOUT: %cpp_long_long.patt: %pattern_type.f57 = value_binding_pattern cpp_long_long [concrete] @@ -1173,16 +1173,16 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.d98, %Int.as.ImplicitAs.impl.Convert.be5 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.be5, @Int.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.e21: = bound_method %int_1.d98, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.c73 [concrete] -// CHECK:STDOUT: %pattern_type.18b: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.0a4: type = class_type @Array, @Array(%f32.c73, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.c23: type = pattern_type %Array.0a4 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.6da) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.ed3: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.c73)> [concrete] -// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] +// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.2fa: = impl_witness imports.%ImplicitAs.impl_witness_table.1e0, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.a62: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] @@ -1195,7 +1195,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3e4: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.943: %f32.c73 = float_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%float.943) [concrete] +// CHECK:STDOUT: %array: %Array.0a4 = tuple_value (%float.943) [concrete] // CHECK:STDOUT: %self.param_patt.c62: %pattern_type.240 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.ed0: %pattern_type.240 = wrapper_binding_pattern self, %self.param_patt.c62 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete] @@ -1204,8 +1204,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c06: %pattern_type.18b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a67: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt.c06 [concrete] +// CHECK:STDOUT: %self.param_patt.bc8: %pattern_type.c23 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.5b5: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt.bc8 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc24_3.2 [concrete] @@ -1290,18 +1290,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %self: ref %f32.c73 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { // CHECK:STDOUT: %self.param_patt: %pattern_type.357 = ref_param_pattern [concrete = constants.%self.param_patt.98a] @@ -1409,7 +1409,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %carbon_i64_result.patt: %pattern_type.357 = value_binding_pattern carbon_i64_result [concrete = constants.%carbon_i64_result.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.0a4 = var_storage %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da] // CHECK:STDOUT: %.loc24_55.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] // CHECK:STDOUT: %impl.elem0.loc24_55: %.7fe = impl_witness_access constants.%ImplicitAs.impl_witness.2fa, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37] @@ -1421,10 +1421,10 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc24_55.3: ref %f32.c73 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc24_55.4: init %f32.c73 to %.loc24_55.3 = in_place_init %.loc24_55.2 [concrete = constants.%float.943] -// CHECK:STDOUT: %.loc24_55.5: init %array_type to %a.var = array_init (%.loc24_55.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_55.1, %.loc24_55.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc24_55.5: init %Array.0a4 to %a.var = array_init (%.loc24_55.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc24_3: init %Array.0a4 = converted %.loc24_55.1, %.loc24_55.5 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc24_3 -// CHECK:STDOUT: %.loc24_46: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc24_46: type = splice_block %Array [concrete = constants.%Array.0a4] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.c73 [concrete = constants.%f32.c73] // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc24: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1443,12 +1443,12 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc24_30.4(%.loc24_30.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc24_30.3: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc24_30.4: Core.IntLiteral = converted %.loc24_30.2, %.loc24_30.3 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %.loc24_30.4, %f32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%f32.c73, constants.%int_1.5b8) [concrete = constants.%Array.0a4] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.0a4 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%a.var) @@ -1472,7 +1472,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc24: ref %f32.c73 = array_index %self.param, %int_0 @@ -1481,9 +1481,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.0a4) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) @@ -4173,7 +4173,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.b35: type = pattern_type %u64 [concrete] // CHECK:STDOUT: %cpp_unsigned_long_long.patt: %pattern_type.b35 = value_binding_pattern cpp_unsigned_long_long [concrete] @@ -4238,16 +4238,16 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type: type = fn_type @Cpp.unsigned_long.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.9e8, %Cpp.unsigned_long.as.ImplicitAs.impl.Convert [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.c73 [concrete] -// CHECK:STDOUT: %pattern_type.18b: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.0a4: type = class_type @Array, @Array(%f32.c73, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.c23: type = pattern_type %Array.0a4 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.6da) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.ed3: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.c73)> [concrete] -// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] +// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.2fa: = impl_witness imports.%ImplicitAs.impl_witness_table.1e0, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.a62: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] @@ -4260,7 +4260,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3e4: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.943: %f32.c73 = float_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%float.943) [concrete] +// CHECK:STDOUT: %array: %Array.0a4 = tuple_value (%float.943) [concrete] // CHECK:STDOUT: %self.param_patt.c62: %pattern_type.240 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.ed0: %pattern_type.240 = wrapper_binding_pattern self, %self.param_patt.c62 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete] @@ -4269,8 +4269,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c06: %pattern_type.18b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a67: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt.c06 [concrete] +// CHECK:STDOUT: %self.param_patt.bc8: %pattern_type.c23 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.5b5: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt.bc8 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc24_3.2 [concrete] @@ -4355,18 +4355,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %self: ref %f32.c73 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { // CHECK:STDOUT: %self.param_patt: %pattern_type.97e = ref_param_pattern [concrete = constants.%self.param_patt.2ef] @@ -4481,7 +4481,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %carbon_u64_result.patt: %pattern_type.97e = value_binding_pattern carbon_u64_result [concrete = constants.%carbon_u64_result.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.0a4 = var_storage %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da] // CHECK:STDOUT: %.loc24_59.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] // CHECK:STDOUT: %impl.elem0.loc24_59: %.7fe = impl_witness_access constants.%ImplicitAs.impl_witness.2fa, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37] @@ -4493,10 +4493,10 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc24_59.3: ref %f32.c73 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc24_59.4: init %f32.c73 to %.loc24_59.3 = in_place_init %.loc24_59.2 [concrete = constants.%float.943] -// CHECK:STDOUT: %.loc24_59.5: init %array_type to %a.var = array_init (%.loc24_59.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_59.1, %.loc24_59.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc24_59.5: init %Array.0a4 to %a.var = array_init (%.loc24_59.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc24_3: init %Array.0a4 = converted %.loc24_59.1, %.loc24_59.5 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc24_3 -// CHECK:STDOUT: %.loc24_50: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc24_50: type = splice_block %Array [concrete = constants.%Array.0a4] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.c73 [concrete = constants.%f32.c73] // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc24: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -4511,12 +4511,12 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc24_30.2(%.loc24_30.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc24_30.3: Core.IntLiteral = value_of_initializer %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc24_30.4: Core.IntLiteral = converted %.loc24_30.2, %.loc24_30.3 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %.loc24_30.4, %f32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%f32.c73, constants.%int_1.5b8) [concrete = constants.%Array.0a4] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.0a4 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%a.var) @@ -4540,7 +4540,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc24: ref %f32.c73 = array_index %self.param, %int_0 @@ -4549,9 +4549,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.0a4) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) diff --git a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon index fceb660c3a6e..8a0682cffe30 100644 --- a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon +++ b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon @@ -690,7 +690,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.f57: type = pattern_type %i64 [concrete] // CHECK:STDOUT: %cpp_long_long.patt: %pattern_type.f57 = value_binding_pattern cpp_long_long [concrete] @@ -737,16 +737,16 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.d98, %Int.as.ImplicitAs.impl.Convert.be5 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.be5, @Int.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.e21: = bound_method %int_1.d98, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.c73 [concrete] -// CHECK:STDOUT: %pattern_type.18b: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.0a4: type = class_type @Array, @Array(%f32.c73, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.c23: type = pattern_type %Array.0a4 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.6da) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.ed3: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.c73)> [concrete] -// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] +// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.2fa: = impl_witness imports.%ImplicitAs.impl_witness_table.1e0, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.a62: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] @@ -759,7 +759,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3e4: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.943: %f32.c73 = float_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%float.943) [concrete] +// CHECK:STDOUT: %array: %Array.0a4 = tuple_value (%float.943) [concrete] // CHECK:STDOUT: %self.param_patt.c62: %pattern_type.240 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.ed0: %pattern_type.240 = wrapper_binding_pattern self, %self.param_patt.c62 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] @@ -768,8 +768,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c06: %pattern_type.18b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a67: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt.c06 [concrete] +// CHECK:STDOUT: %self.param_patt.bc8: %pattern_type.c23 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.5b5: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt.bc8 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] @@ -809,18 +809,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %self: ref %f32.c73 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -849,7 +849,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %carbon_long_long.patt: %pattern_type.f57 = value_binding_pattern carbon_long_long [concrete = constants.%carbon_long_long.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.0a4 = var_storage %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da] // CHECK:STDOUT: %.loc11_55.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] // CHECK:STDOUT: %impl.elem0.loc11_55: %.7fe = impl_witness_access constants.%ImplicitAs.impl_witness.2fa, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37] @@ -861,10 +861,10 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11_55.3: ref %f32.c73 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc11_55.4: init %f32.c73 to %.loc11_55.3 = in_place_init %.loc11_55.2 [concrete = constants.%float.943] -// CHECK:STDOUT: %.loc11_55.5: init %array_type to %a.var = array_init (%.loc11_55.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_55.1, %.loc11_55.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_55.5: init %Array.0a4 to %a.var = array_init (%.loc11_55.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_3: init %Array.0a4 = converted %.loc11_55.1, %.loc11_55.5 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc11_3 -// CHECK:STDOUT: %.loc11_46: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc11_46: type = splice_block %Array [concrete = constants.%Array.0a4] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.c73 [concrete = constants.%f32.c73] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -883,12 +883,12 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_30.4(%.loc11_30.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_30.3: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_30.4: Core.IntLiteral = converted %.loc11_30.2, %.loc11_30.3 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %.loc11_30.4, %f32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%f32.c73, constants.%int_1.5b8) [concrete = constants.%Array.0a4] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.0a4 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) @@ -906,7 +906,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11: ref %f32.c73 = array_index %self.param, %int_0 @@ -915,9 +915,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.0a4) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) @@ -930,7 +930,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.b35: type = pattern_type %u64 [concrete] // CHECK:STDOUT: %cpp_unsigned_long_long.patt: %pattern_type.b35 = value_binding_pattern cpp_unsigned_long_long [concrete] @@ -977,16 +977,16 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.01f, %UInt.as.ImplicitAs.impl.Convert.7d0 [concrete] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %UInt.as.ImplicitAs.impl.Convert.7d0, @UInt.as.ImplicitAs.impl.Convert.1(%int_64) [concrete] // CHECK:STDOUT: %bound_method.b37: = bound_method %int_1.01f, %UInt.as.ImplicitAs.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.c73 [concrete] -// CHECK:STDOUT: %pattern_type.18b: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.0a4: type = class_type @Array, @Array(%f32.c73, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.c23: type = pattern_type %Array.0a4 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.6da) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.ed3: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.c73)> [concrete] -// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] +// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.2fa: = impl_witness imports.%ImplicitAs.impl_witness_table.1e0, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.a62: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] @@ -999,7 +999,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3e4: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.943: %f32.c73 = float_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%float.943) [concrete] +// CHECK:STDOUT: %array: %Array.0a4 = tuple_value (%float.943) [concrete] // CHECK:STDOUT: %self.param_patt.c62: %pattern_type.240 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.ed0: %pattern_type.240 = wrapper_binding_pattern self, %self.param_patt.c62 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] @@ -1008,8 +1008,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c06: %pattern_type.18b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a67: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt.c06 [concrete] +// CHECK:STDOUT: %self.param_patt.bc8: %pattern_type.c23 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.5b5: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt.bc8 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] @@ -1049,18 +1049,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %self: ref %f32.c73 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1089,7 +1089,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %carbon_unsigned_long_long.patt: %pattern_type.b35 = value_binding_pattern carbon_unsigned_long_long [concrete = constants.%carbon_unsigned_long_long.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.0a4 = var_storage %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da] // CHECK:STDOUT: %.loc11_64.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] // CHECK:STDOUT: %impl.elem0.loc11_64: %.7fe = impl_witness_access constants.%ImplicitAs.impl_witness.2fa, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37] @@ -1101,10 +1101,10 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11_64.3: ref %f32.c73 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc11_64.4: init %f32.c73 to %.loc11_64.3 = in_place_init %.loc11_64.2 [concrete = constants.%float.943] -// CHECK:STDOUT: %.loc11_64.5: init %array_type to %a.var = array_init (%.loc11_64.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_64.1, %.loc11_64.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_64.5: init %Array.0a4 to %a.var = array_init (%.loc11_64.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_3: init %Array.0a4 = converted %.loc11_64.1, %.loc11_64.5 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc11_3 -// CHECK:STDOUT: %.loc11_55: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc11_55: type = splice_block %Array [concrete = constants.%Array.0a4] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.c73 [concrete = constants.%f32.c73] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1123,12 +1123,12 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_30.4(%.loc11_30.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_30.3: Core.IntLiteral = value_of_initializer %UInt.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_30.4: Core.IntLiteral = converted %.loc11_30.2, %.loc11_30.3 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %.loc11_30.4, %f32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%f32.c73, constants.%int_1.5b8) [concrete = constants.%Array.0a4] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.0a4 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) @@ -1146,7 +1146,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11: ref %f32.c73 = array_index %self.param, %int_0 @@ -1155,9 +1155,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.0a4) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) @@ -1173,7 +1173,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.25e: type = pattern_type %Cpp.long [concrete] // CHECK:STDOUT: %cpp_long.patt: %pattern_type.25e = value_binding_pattern cpp_long [concrete] @@ -1239,16 +1239,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.type.ae6f4c.2: type = fn_type @Cpp.long.as.ImplicitAs.impl.Convert.2 [concrete] // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.3cefb0.2: %Cpp.long.as.ImplicitAs.impl.Convert.type.ae6f4c.2 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.9ce, %Cpp.long.as.ImplicitAs.impl.Convert.3cefb0.2 [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.c73 [concrete] -// CHECK:STDOUT: %pattern_type.18b: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.0a4: type = class_type @Array, @Array(%f32.c73, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.c23: type = pattern_type %Array.0a4 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.6da) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.ed3: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.c73)> [concrete] -// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] +// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.2fa: = impl_witness imports.%ImplicitAs.impl_witness_table.1e0, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.a62: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] @@ -1261,7 +1263,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.943: %f32.c73 = float_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%float.943) [concrete] +// CHECK:STDOUT: %array: %Array.0a4 = tuple_value (%float.943) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %self.param_patt.c62: %pattern_type.240 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.ed0: %pattern_type.240 = wrapper_binding_pattern self, %self.param_patt.c62 [concrete] @@ -1271,8 +1273,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc26_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c06: %pattern_type.18b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a67: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt.c06 [concrete] +// CHECK:STDOUT: %self.param_patt.bc8: %pattern_type.c23 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.5b5: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt.bc8 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc26_3.2 [concrete] @@ -1304,6 +1306,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .Float = %Core.Float // CHECK:STDOUT: .As = %Core.As +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -1347,6 +1350,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %As.impl_witness_table.5ef = impl_witness_table (%Core.import_ref.06c923.3), @Core.IntLiteral.as.As.impl.f1e [concrete] // CHECK:STDOUT: %Core.import_ref.06c923.4: %Cpp.long.as.ImplicitAs.impl.Convert.type.ae6f4c.2 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.3cefb0.2] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2c = impl_witness_table (%Core.import_ref.06c923.4), @Cpp.long.as.ImplicitAs.impl.886 [concrete] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/types/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.import_ref.c4c: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1e0 = impl_witness_table (%Core.import_ref.c4c), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] @@ -1378,18 +1382,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %self: ref %f32.c73 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc26_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { // CHECK:STDOUT: %self.param_patt: %pattern_type.596 = ref_param_pattern [concrete = constants.%self.param_patt.123] @@ -1504,7 +1508,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %carbon_i64.patt: %pattern_type.f57 = value_binding_pattern carbon_i64 [concrete = constants.%carbon_i64.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.0a4 = var_storage %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da] // CHECK:STDOUT: %.loc26_50.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] // CHECK:STDOUT: %impl.elem0.loc26_50: %.7fe = impl_witness_access constants.%ImplicitAs.impl_witness.2fa, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37] @@ -1516,10 +1520,10 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc26_50.3: ref %f32.c73 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc26_50.4: init %f32.c73 to %.loc26_50.3 = in_place_init %.loc26_50.2 [concrete = constants.%float.943] -// CHECK:STDOUT: %.loc26_50.5: init %array_type to %a.var = array_init (%.loc26_50.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc26_3: init %array_type = converted %.loc26_50.1, %.loc26_50.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc26_50.5: init %Array.0a4 to %a.var = array_init (%.loc26_50.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc26_3: init %Array.0a4 = converted %.loc26_50.1, %.loc26_50.5 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc26_3 -// CHECK:STDOUT: %.loc26_41: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc26_41: type = splice_block %Array [concrete = constants.%Array.0a4] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.c73 [concrete = constants.%f32.c73] // CHECK:STDOUT: %int_1.loc26: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc26: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1534,12 +1538,12 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.call.loc26: init Core.IntLiteral = call %bound_method.loc26_30.2(%.loc26_30.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc26_30.3: Core.IntLiteral = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc26 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc26_30.4: Core.IntLiteral = converted %.loc26_30.2, %.loc26_30.3 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %.loc26_30.4, %f32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%f32.c73, constants.%int_1.5b8) [concrete = constants.%Array.0a4] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.0a4 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc26: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc26: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc26(%a.var) @@ -1563,7 +1567,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc26: ref %f32.c73 = array_index %self.param, %int_0 @@ -1572,9 +1576,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_3.2(%self.param: ref %Array.0a4) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) @@ -4587,7 +4591,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %UInt.type: type = generic_class_type @UInt [concrete] // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.1a0: type = pattern_type %Cpp.unsigned_long [concrete] // CHECK:STDOUT: %cpp_unsigned_long.patt: %pattern_type.1a0 = value_binding_pattern cpp_unsigned_long [concrete] @@ -4656,16 +4660,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type: type = fn_type @Cpp.unsigned_long.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.0e4, %Cpp.unsigned_long.as.ImplicitAs.impl.Convert [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.c73 [concrete] -// CHECK:STDOUT: %pattern_type.18b: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.0a4: type = class_type @Array, @Array(%f32.c73, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.c23: type = pattern_type %Array.0a4 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.6da) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.ed3: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.c73)> [concrete] -// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] +// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.2fa: = impl_witness imports.%ImplicitAs.impl_witness_table.1e0, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.a62: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] @@ -4678,7 +4684,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3e4: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.943: %f32.c73 = float_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%float.943) [concrete] +// CHECK:STDOUT: %array: %Array.0a4 = tuple_value (%float.943) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %self.param_patt.c62: %pattern_type.240 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.ed0: %pattern_type.240 = wrapper_binding_pattern self, %self.param_patt.c62 [concrete] @@ -4688,8 +4694,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c06: %pattern_type.18b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a67: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt.c06 [concrete] +// CHECK:STDOUT: %self.param_patt.bc8: %pattern_type.c23 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.5b5: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt.bc8 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc24_3.2 [concrete] @@ -4721,6 +4727,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: .UInt = %Core.UInt // CHECK:STDOUT: .Float = %Core.Float // CHECK:STDOUT: .As = %Core.As +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -4764,6 +4771,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %As.impl_witness_table.e87 = impl_witness_table (%Core.import_ref.06c923.2), @Core.IntLiteral.as.As.impl.4bc [concrete] // CHECK:STDOUT: %Core.import_ref.06c923.3: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.4d8 = impl_witness_table (%Core.import_ref.06c923.3), @Cpp.unsigned_long.as.ImplicitAs.impl.b57 [concrete] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/types/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.import_ref.c4c: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1e0 = impl_witness_table (%Core.import_ref.c4c), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] @@ -4795,18 +4803,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %self: ref %f32.c73 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { // CHECK:STDOUT: %self.param_patt: %pattern_type.116 = ref_param_pattern [concrete = constants.%self.param_patt.adc] @@ -4914,7 +4922,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %carbon_u32_result.patt: %pattern_type.116 = value_binding_pattern carbon_u32_result [concrete = constants.%carbon_u32_result.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.0a4 = var_storage %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da] // CHECK:STDOUT: %.loc24_59.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] // CHECK:STDOUT: %impl.elem0.loc24_59: %.7fe = impl_witness_access constants.%ImplicitAs.impl_witness.2fa, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37] @@ -4926,10 +4934,10 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc24_59.3: ref %f32.c73 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc24_59.4: init %f32.c73 to %.loc24_59.3 = in_place_init %.loc24_59.2 [concrete = constants.%float.943] -// CHECK:STDOUT: %.loc24_59.5: init %array_type to %a.var = array_init (%.loc24_59.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_59.1, %.loc24_59.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc24_59.5: init %Array.0a4 to %a.var = array_init (%.loc24_59.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc24_3: init %Array.0a4 = converted %.loc24_59.1, %.loc24_59.5 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc24_3 -// CHECK:STDOUT: %.loc24_50: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc24_50: type = splice_block %Array [concrete = constants.%Array.0a4] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.c73 [concrete = constants.%f32.c73] // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc24: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -4944,12 +4952,12 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc24_30.2(%.loc24_30.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc24_30.3: Core.IntLiteral = value_of_initializer %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc24_30.4: Core.IntLiteral = converted %.loc24_30.2, %.loc24_30.3 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %.loc24_30.4, %f32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%f32.c73, constants.%int_1.5b8) [concrete = constants.%Array.0a4] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.0a4 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%a.var) @@ -4973,7 +4981,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc24: ref %f32.c73 = array_index %self.param, %int_0 @@ -4982,9 +4990,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.0a4) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) diff --git a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon index 6362145dee7c..908d89d63f59 100644 --- a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon +++ b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon @@ -638,7 +638,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.f57: type = pattern_type %i64 [concrete] // CHECK:STDOUT: %cpp_long.patt: %pattern_type.f57 = value_binding_pattern cpp_long [concrete] @@ -685,16 +685,16 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.d98, %Int.as.ImplicitAs.impl.Convert.be5 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.be5, @Int.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.e21: = bound_method %int_1.d98, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.c73 [concrete] -// CHECK:STDOUT: %pattern_type.18b: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.0a4: type = class_type @Array, @Array(%f32.c73, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.c23: type = pattern_type %Array.0a4 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.6da) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.ed3: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.c73)> [concrete] -// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] +// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.2fa: = impl_witness imports.%ImplicitAs.impl_witness_table.1e0, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.a62: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] @@ -707,7 +707,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3e4: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.943: %f32.c73 = float_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%float.943) [concrete] +// CHECK:STDOUT: %array: %Array.0a4 = tuple_value (%float.943) [concrete] // CHECK:STDOUT: %self.param_patt.c62: %pattern_type.240 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.ed0: %pattern_type.240 = wrapper_binding_pattern self, %self.param_patt.c62 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] @@ -716,8 +716,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c06: %pattern_type.18b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a67: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt.c06 [concrete] +// CHECK:STDOUT: %self.param_patt.bc8: %pattern_type.c23 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.5b5: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt.bc8 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] @@ -757,18 +757,18 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %self: ref %f32.c73 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -797,7 +797,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %carbon_long.patt: %pattern_type.f57 = value_binding_pattern carbon_long [concrete = constants.%carbon_long.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.0a4 = var_storage %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da] // CHECK:STDOUT: %.loc11_50.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] // CHECK:STDOUT: %impl.elem0.loc11_50: %.7fe = impl_witness_access constants.%ImplicitAs.impl_witness.2fa, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37] @@ -809,10 +809,10 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11_50.3: ref %f32.c73 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc11_50.4: init %f32.c73 to %.loc11_50.3 = in_place_init %.loc11_50.2 [concrete = constants.%float.943] -// CHECK:STDOUT: %.loc11_50.5: init %array_type to %a.var = array_init (%.loc11_50.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_50.1, %.loc11_50.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_50.5: init %Array.0a4 to %a.var = array_init (%.loc11_50.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_3: init %Array.0a4 = converted %.loc11_50.1, %.loc11_50.5 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc11_3 -// CHECK:STDOUT: %.loc11_41: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc11_41: type = splice_block %Array [concrete = constants.%Array.0a4] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.c73 [concrete = constants.%f32.c73] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -831,12 +831,12 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_30.4(%.loc11_30.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_30.3: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_30.4: Core.IntLiteral = converted %.loc11_30.2, %.loc11_30.3 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %.loc11_30.4, %f32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%f32.c73, constants.%int_1.5b8) [concrete = constants.%Array.0a4] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.0a4 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) @@ -854,7 +854,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11: ref %f32.c73 = array_index %self.param, %int_0 @@ -863,9 +863,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.0a4) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) @@ -878,7 +878,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.b35: type = pattern_type %u64 [concrete] // CHECK:STDOUT: %cpp_unsigned_long.patt: %pattern_type.b35 = value_binding_pattern cpp_unsigned_long [concrete] @@ -925,16 +925,16 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.01f, %UInt.as.ImplicitAs.impl.Convert.7d0 [concrete] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %UInt.as.ImplicitAs.impl.Convert.7d0, @UInt.as.ImplicitAs.impl.Convert.1(%int_64) [concrete] // CHECK:STDOUT: %bound_method.b37: = bound_method %int_1.01f, %UInt.as.ImplicitAs.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.c73 [concrete] -// CHECK:STDOUT: %pattern_type.18b: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.0a4: type = class_type @Array, @Array(%f32.c73, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.c23: type = pattern_type %Array.0a4 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.6da) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.ed3: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.c73)> [concrete] -// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] +// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.2fa: = impl_witness imports.%ImplicitAs.impl_witness_table.1e0, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.a62: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] @@ -947,7 +947,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3e4: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.943: %f32.c73 = float_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%float.943) [concrete] +// CHECK:STDOUT: %array: %Array.0a4 = tuple_value (%float.943) [concrete] // CHECK:STDOUT: %self.param_patt.c62: %pattern_type.240 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.ed0: %pattern_type.240 = wrapper_binding_pattern self, %self.param_patt.c62 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] @@ -956,8 +956,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c06: %pattern_type.18b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a67: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt.c06 [concrete] +// CHECK:STDOUT: %self.param_patt.bc8: %pattern_type.c23 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.5b5: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt.bc8 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] @@ -997,18 +997,18 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %self: ref %f32.c73 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1037,7 +1037,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %carbon_unsigned_long.patt: %pattern_type.b35 = value_binding_pattern carbon_unsigned_long [concrete = constants.%carbon_unsigned_long.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.0a4 = var_storage %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da] // CHECK:STDOUT: %.loc11_59.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] // CHECK:STDOUT: %impl.elem0.loc11_59: %.7fe = impl_witness_access constants.%ImplicitAs.impl_witness.2fa, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37] @@ -1049,10 +1049,10 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11_59.3: ref %f32.c73 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc11_59.4: init %f32.c73 to %.loc11_59.3 = in_place_init %.loc11_59.2 [concrete = constants.%float.943] -// CHECK:STDOUT: %.loc11_59.5: init %array_type to %a.var = array_init (%.loc11_59.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_59.1, %.loc11_59.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_59.5: init %Array.0a4 to %a.var = array_init (%.loc11_59.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc11_3: init %Array.0a4 = converted %.loc11_59.1, %.loc11_59.5 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc11_3 -// CHECK:STDOUT: %.loc11_50: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc11_50: type = splice_block %Array [concrete = constants.%Array.0a4] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.c73 [concrete = constants.%f32.c73] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1071,12 +1071,12 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_30.4(%.loc11_30.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_30.3: Core.IntLiteral = value_of_initializer %UInt.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_30.4: Core.IntLiteral = converted %.loc11_30.2, %.loc11_30.3 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %.loc11_30.4, %f32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%f32.c73, constants.%int_1.5b8) [concrete = constants.%Array.0a4] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.0a4 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) @@ -1094,7 +1094,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11: ref %f32.c73 = array_index %self.param, %int_0 @@ -1103,9 +1103,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.0a4) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) @@ -1121,7 +1121,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.d58: type = pattern_type %Cpp.long_long [concrete] // CHECK:STDOUT: %cpp_long_long.patt: %pattern_type.d58 = value_binding_pattern cpp_long_long [concrete] @@ -1177,16 +1177,18 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.type: type = fn_type @Cpp.long_long.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert: %Cpp.long_long.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.b19, %Cpp.long_long.as.ImplicitAs.impl.Convert [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.c73 [concrete] -// CHECK:STDOUT: %pattern_type.18b: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.0a4: type = class_type @Array, @Array(%f32.c73, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.c23: type = pattern_type %Array.0a4 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.6da) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.ed3: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.c73)> [concrete] -// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] +// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.2fa: = impl_witness imports.%ImplicitAs.impl_witness_table.1e0, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.a62: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] @@ -1199,7 +1201,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.943: %f32.c73 = float_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%float.943) [concrete] +// CHECK:STDOUT: %array: %Array.0a4 = tuple_value (%float.943) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %self.param_patt.c62: %pattern_type.240 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.ed0: %pattern_type.240 = wrapper_binding_pattern self, %self.param_patt.c62 [concrete] @@ -1209,8 +1211,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c06: %pattern_type.18b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a67: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt.c06 [concrete] +// CHECK:STDOUT: %self.param_patt.bc8: %pattern_type.c23 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.5b5: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt.bc8 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc24_3.2 [concrete] @@ -1242,6 +1244,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .Float = %Core.Float // CHECK:STDOUT: .As = %Core.As +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -1283,6 +1286,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %As.impl_witness_table.27c = impl_witness_table (%Core.import_ref.06c923.2), @Core.IntLiteral.as.As.impl.084 [concrete] // CHECK:STDOUT: %Core.import_ref.06c923.3: %Cpp.long_long.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.859 = impl_witness_table (%Core.import_ref.06c923.3), @Cpp.long_long.as.ImplicitAs.impl.c90 [concrete] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/types/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.import_ref.c4c: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1e0 = impl_witness_table (%Core.import_ref.c4c), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] @@ -1314,18 +1318,18 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %self: ref %f32.c73 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { // CHECK:STDOUT: %self.param_patt: %pattern_type.ae7 = ref_param_pattern [concrete = constants.%self.param_patt.b62] @@ -1429,7 +1433,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %carbon_i64_result.patt: %pattern_type.ae7 = value_binding_pattern carbon_i64_result [concrete = constants.%carbon_i64_result.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.0a4 = var_storage %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da] // CHECK:STDOUT: %.loc24_55.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] // CHECK:STDOUT: %impl.elem0.loc24_55: %.7fe = impl_witness_access constants.%ImplicitAs.impl_witness.2fa, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37] @@ -1441,10 +1445,10 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc24_55.3: ref %f32.c73 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc24_55.4: init %f32.c73 to %.loc24_55.3 = in_place_init %.loc24_55.2 [concrete = constants.%float.943] -// CHECK:STDOUT: %.loc24_55.5: init %array_type to %a.var = array_init (%.loc24_55.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_55.1, %.loc24_55.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc24_55.5: init %Array.0a4 to %a.var = array_init (%.loc24_55.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc24_3: init %Array.0a4 = converted %.loc24_55.1, %.loc24_55.5 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc24_3 -// CHECK:STDOUT: %.loc24_46: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc24_46: type = splice_block %Array [concrete = constants.%Array.0a4] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.c73 [concrete = constants.%f32.c73] // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc24: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1459,12 +1463,12 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc24_30.2(%.loc24_30.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc24_30.3: Core.IntLiteral = value_of_initializer %Cpp.long_long.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc24_30.4: Core.IntLiteral = converted %.loc24_30.2, %.loc24_30.3 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %.loc24_30.4, %f32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%f32.c73, constants.%int_1.5b8) [concrete = constants.%Array.0a4] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.0a4 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%a.var) @@ -1488,7 +1492,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc24: ref %f32.c73 = array_index %self.param, %int_0 @@ -1497,9 +1501,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.0a4) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) @@ -4295,7 +4299,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %UInt.type: type = generic_class_type @UInt [concrete] // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] +// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.4cd: type = pattern_type %Cpp.unsigned_long_long [concrete] // CHECK:STDOUT: %cpp_unsigned_long_long.patt: %pattern_type.4cd = value_binding_pattern cpp_unsigned_long_long [concrete] @@ -4365,16 +4369,18 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type: type = fn_type @Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.877, %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.c73 [concrete] -// CHECK:STDOUT: %pattern_type.18b: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %Array.type: type = generic_class_type @Array [concrete] +// CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] +// CHECK:STDOUT: %Array.0a4: type = class_type @Array, @Array(%f32.c73, %int_1.5b8) [concrete] +// CHECK:STDOUT: %pattern_type.c23: type = pattern_type %Array.0a4 [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.6da) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.ed3: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.c73)> [concrete] -// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] +// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.2fa: = impl_witness imports.%ImplicitAs.impl_witness_table.1e0, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.a62: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] @@ -4387,7 +4393,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3e4: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.943: %f32.c73 = float_value 1 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%float.943) [concrete] +// CHECK:STDOUT: %array: %Array.0a4 = tuple_value (%float.943) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %self.param_patt.c62: %pattern_type.240 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.ed0: %pattern_type.240 = wrapper_binding_pattern self, %self.param_patt.c62 [concrete] @@ -4397,8 +4403,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.1 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c06: %pattern_type.18b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a67: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt.c06 [concrete] +// CHECK:STDOUT: %self.param_patt.bc8: %pattern_type.c23 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.5b5: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt.bc8 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc24_3.2 [concrete] @@ -4430,6 +4436,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: .UInt = %Core.UInt // CHECK:STDOUT: .Float = %Core.Float // CHECK:STDOUT: .As = %Core.As +// CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -4473,6 +4480,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %As.impl_witness_table.701 = impl_witness_table (%Core.import_ref.06c923.2), @Core.IntLiteral.as.As.impl.f3d [concrete] // CHECK:STDOUT: %Core.import_ref.06c923.3: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.faa = impl_witness_table (%Core.import_ref.06c923.3), @Cpp.unsigned_long_long.as.ImplicitAs.impl.437 [concrete] +// CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/types/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.import_ref.c4c: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.063) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.d4f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1e0 = impl_witness_table (%Core.import_ref.c4c), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] @@ -4504,18 +4512,18 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %self: ref %f32.c73 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.18b = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.18b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] +// CHECK:STDOUT: %self.param_patt: %pattern_type.c23 = ref_param_pattern [concrete = constants.%self.param_patt.bc8] +// CHECK:STDOUT: %self.patt: %pattern_type.c23 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b5] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.0a4 = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.0a4 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { // CHECK:STDOUT: %self.param_patt: %pattern_type.97f = ref_param_pattern [concrete = constants.%self.param_patt.116] @@ -4623,7 +4631,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %carbon_u64_result.patt: %pattern_type.97f = value_binding_pattern carbon_u64_result [concrete = constants.%carbon_u64_result.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %a.var: ref %array_type = var_storage %a.var_patt +// CHECK:STDOUT: %a.var: ref %Array.0a4 = var_storage %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da] // CHECK:STDOUT: %.loc24_64.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] // CHECK:STDOUT: %impl.elem0.loc24_64: %.7fe = impl_witness_access constants.%ImplicitAs.impl_witness.2fa, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.b37] @@ -4635,10 +4643,10 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc24_64.3: ref %f32.c73 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc24_64.4: init %f32.c73 to %.loc24_64.3 = in_place_init %.loc24_64.2 [concrete = constants.%float.943] -// CHECK:STDOUT: %.loc24_64.5: init %array_type to %a.var = array_init (%.loc24_64.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_64.1, %.loc24_64.5 [concrete = constants.%array] +// CHECK:STDOUT: %.loc24_64.5: init %Array.0a4 to %a.var = array_init (%.loc24_64.4) [concrete = constants.%array] +// CHECK:STDOUT: %.loc24_3: init %Array.0a4 = converted %.loc24_64.1, %.loc24_64.5 [concrete = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc24_3 -// CHECK:STDOUT: %.loc24_55: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc24_55: type = splice_block %Array [concrete = constants.%Array.0a4] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.c73 [concrete = constants.%f32.c73] // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc24: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -4653,12 +4661,12 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc24_30.2(%.loc24_30.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc24_30.3: Core.IntLiteral = value_of_initializer %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc24_30.4: Core.IntLiteral = converted %.loc24_30.2, %.loc24_30.3 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %.loc24_30.4, %f32 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%f32.c73, constants.%int_1.5b8) [concrete = constants.%Array.0a4] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: ref %array_type = wrapper_binding a, %a.var +// CHECK:STDOUT: %a: ref %Array.0a4 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.18b = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.18b = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.c23 = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.c23 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%a.var) @@ -4682,7 +4690,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc24: ref %f32.c73 = array_index %self.param, %int_0 @@ -4691,9 +4699,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.0a4) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %Array.0a4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) diff --git a/toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon b/toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon index 6df9af7d0509..8b5c57f07c6c 100644 --- a/toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon +++ b/toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon @@ -69,11 +69,11 @@ fn F() { // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%int_1.5b8, %int_2.ecc, %int_3.1ba) [concrete] -// CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete] +// CHECK:STDOUT: %Array.b3a: type = class_type @Array, @Array(%i32, %int_3.1ba) [concrete] // CHECK:STDOUT: %.0ee: Core.Form = init_form %initializer_list [concrete] -// CHECK:STDOUT: %pattern_type.771: type = pattern_type %array_type [concrete] -// CHECK:STDOUT: %_.param_patt: %pattern_type.771 = value_param_pattern [concrete] -// CHECK:STDOUT: %_.patt.03c: %pattern_type.771 = wrapper_binding_pattern _, %_.param_patt [concrete] +// CHECK:STDOUT: %pattern_type.7a1: type = pattern_type %Array.b3a [concrete] +// CHECK:STDOUT: %_.param_patt: %pattern_type.7a1 = value_param_pattern [concrete] +// CHECK:STDOUT: %_.patt.c43: %pattern_type.7a1 = wrapper_binding_pattern _, %_.param_patt [concrete] // CHECK:STDOUT: %return.param_patt.199: %pattern_type.7fc = out_param_pattern [concrete] // CHECK:STDOUT: %return.patt.07e: %pattern_type.7fc = return_slot_pattern %return.param_patt.199, %initializer_list [concrete] // CHECK:STDOUT: %initializer_list.initializer_list.type.0fbcd7.1: type = fn_type @initializer_list.initializer_list.loc8 [concrete] @@ -100,8 +100,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.485: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete] // CHECK:STDOUT: %bound_method.763: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.410: %i32 = int_value 3 [concrete] -// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.0c6, %int_2.295, %int_3.410) [concrete] -// CHECK:STDOUT: %.981: ref %array_type = temporary invalid, %array [concrete] +// CHECK:STDOUT: %array: %Array.b3a = tuple_value (%int_1.0c6, %int_2.295, %int_3.410) [concrete] +// CHECK:STDOUT: %.293: ref %Array.b3a = temporary invalid, %array [concrete] // CHECK:STDOUT: %Consume.cpp_overload_set.type: type = cpp_overload_set_type @Consume.cpp_overload_set [concrete] // CHECK:STDOUT: %Consume.cpp_overload_set.value: %Consume.cpp_overload_set.type = cpp_overload_set_value @Consume.cpp_overload_set [concrete] // CHECK:STDOUT: %ptr.fac: type = ptr_type %initializer_list [concrete] @@ -125,15 +125,15 @@ fn F() { // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_23.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c42: %pattern_type.771 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3bc: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt.c42 [concrete] +// CHECK:STDOUT: %self.param_patt.717: %pattern_type.7a1 = ref_param_pattern [concrete] +// CHECK:STDOUT: %self.patt.cb9: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt.717 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_23.2 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10_23.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_23.3 [concrete] // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.981, %Destroy.WithSelf.SelfDestruct.db3fdb.4 [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.293, %Destroy.WithSelf.SelfDestruct.db3fdb.4 [concrete] // CHECK:STDOUT: %InitListConstructor: type = class_type @InitListConstructor [concrete] // CHECK:STDOUT: %pattern_type.ed6: type = pattern_type %InitListConstructor [concrete] // CHECK:STDOUT: %_.patt.100: %pattern_type.ed6 = value_binding_pattern _ [concrete] @@ -193,24 +193,24 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: generated { // CHECK:STDOUT: %initializer_list.initializer_list.decl.f8e97d.1: %initializer_list.initializer_list.type.0fbcd7.1 = fn_decl @initializer_list.initializer_list.loc8 [concrete = constants.%initializer_list.initializer_list.0db5f6.1] { -// CHECK:STDOUT: %_.param_patt: %pattern_type.771 = value_param_pattern [concrete = constants.%_.param_patt] -// CHECK:STDOUT: %_.patt: %pattern_type.771 = wrapper_binding_pattern _, %_.param_patt [concrete = constants.%_.patt.03c] +// CHECK:STDOUT: %_.param_patt: %pattern_type.7a1 = value_param_pattern [concrete = constants.%_.param_patt] +// CHECK:STDOUT: %_.patt: %pattern_type.7a1 = wrapper_binding_pattern _, %_.param_patt [concrete = constants.%_.patt.c43] // CHECK:STDOUT: %return.param_patt: %pattern_type.7fc = out_param_pattern [concrete = constants.%return.param_patt.199] // CHECK:STDOUT: %return.patt: %pattern_type.7fc = return_slot_pattern %return.param_patt, imports.%initializer_list.decl [concrete = constants.%return.patt.07e] // CHECK:STDOUT: } { -// CHECK:STDOUT: %_.param: %array_type = value_param call_param0 -// CHECK:STDOUT: %_: %array_type = wrapper_binding _, %_.param +// CHECK:STDOUT: %_.param: %Array.b3a = value_param call_param0 +// CHECK:STDOUT: %_: %Array.b3a = wrapper_binding _, %_.param // CHECK:STDOUT: %return.param: ref %initializer_list = out_param call_param1 // CHECK:STDOUT: %return: ref %initializer_list = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %initializer_list.initializer_list.decl.f8e97d.2: %initializer_list.initializer_list.type.0fbcd7.2 = fn_decl @initializer_list.initializer_list.loc10 [concrete = constants.%initializer_list.initializer_list.0db5f6.2] { -// CHECK:STDOUT: %_.param_patt: %pattern_type.771 = value_param_pattern [concrete = constants.%_.param_patt] -// CHECK:STDOUT: %_.patt: %pattern_type.771 = wrapper_binding_pattern _, %_.param_patt [concrete = constants.%_.patt.03c] +// CHECK:STDOUT: %_.param_patt: %pattern_type.7a1 = value_param_pattern [concrete = constants.%_.param_patt] +// CHECK:STDOUT: %_.patt: %pattern_type.7a1 = wrapper_binding_pattern _, %_.param_patt [concrete = constants.%_.patt.c43] // CHECK:STDOUT: %return.param_patt: %pattern_type.7fc = out_param_pattern [concrete = constants.%return.param_patt.199] // CHECK:STDOUT: %return.patt: %pattern_type.7fc = return_slot_pattern %return.param_patt, imports.%initializer_list.decl [concrete = constants.%return.patt.07e] // CHECK:STDOUT: } { -// CHECK:STDOUT: %_.param: %array_type = value_param call_param0 -// CHECK:STDOUT: %_: %array_type = wrapper_binding _, %_.param +// CHECK:STDOUT: %_.param: %Array.b3a = value_param call_param0 +// CHECK:STDOUT: %_: %Array.b3a = wrapper_binding _, %_.param // CHECK:STDOUT: %return.param: ref %initializer_list = out_param call_param1 // CHECK:STDOUT: %return: ref %initializer_list = return_slot %return.param // CHECK:STDOUT: } @@ -236,27 +236,27 @@ fn F() { // CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_23.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.771 = ref_param_pattern [concrete = constants.%self.param_patt.c42] -// CHECK:STDOUT: %self.patt: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3bc] +// CHECK:STDOUT: %self.param_patt: %pattern_type.7a1 = ref_param_pattern [concrete = constants.%self.param_patt.717] +// CHECK:STDOUT: %self.patt: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb9] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.b3a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.b3a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10_23.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.771 = ref_param_pattern [concrete = constants.%self.param_patt.c42] -// CHECK:STDOUT: %self.patt: %pattern_type.771 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3bc] +// CHECK:STDOUT: %self.param_patt: %pattern_type.7a1 = ref_param_pattern [concrete = constants.%self.param_patt.717] +// CHECK:STDOUT: %self.patt: %pattern_type.7a1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb9] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %array_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %array_type = wrapper_binding self, %self.param +// CHECK:STDOUT: %self.param: ref %Array.b3a = ref_param call_param0 +// CHECK:STDOUT: %self: ref %Array.b3a = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %initializer_list.initializer_list.decl.f8e97d.3: %initializer_list.initializer_list.type.0fbcd7.3 = fn_decl @initializer_list.initializer_list.loc12 [concrete = constants.%initializer_list.initializer_list.0db5f6.3] { -// CHECK:STDOUT: %_.param_patt: %pattern_type.771 = value_param_pattern [concrete = constants.%_.param_patt] -// CHECK:STDOUT: %_.patt: %pattern_type.771 = wrapper_binding_pattern _, %_.param_patt [concrete = constants.%_.patt.03c] +// CHECK:STDOUT: %_.param_patt: %pattern_type.7a1 = value_param_pattern [concrete = constants.%_.param_patt] +// CHECK:STDOUT: %_.patt: %pattern_type.7a1 = wrapper_binding_pattern _, %_.param_patt [concrete = constants.%_.patt.c43] // CHECK:STDOUT: %return.param_patt: %pattern_type.7fc = out_param_pattern [concrete = constants.%return.param_patt.199] // CHECK:STDOUT: %return.patt: %pattern_type.7fc = return_slot_pattern %return.param_patt, imports.%initializer_list.decl [concrete = constants.%return.patt.07e] // CHECK:STDOUT: } { -// CHECK:STDOUT: %_.param: %array_type = value_param call_param0 -// CHECK:STDOUT: %_: %array_type = wrapper_binding _, %_.param +// CHECK:STDOUT: %_.param: %Array.b3a = value_param call_param0 +// CHECK:STDOUT: %_: %Array.b3a = wrapper_binding _, %_.param // CHECK:STDOUT: %return.param: ref %initializer_list = out_param call_param1 // CHECK:STDOUT: %return: ref %initializer_list = return_slot %return.param // CHECK:STDOUT: } @@ -281,7 +281,7 @@ fn F() { // CHECK:STDOUT: %.loc8_50.1: %tuple.type = tuple_literal (%int_1.loc8_43, %int_2.loc8_46, %int_3.loc8_49) [concrete = constants.%tuple] // CHECK:STDOUT: // CHECK:STDOUT: %int_3.loc8_50: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type.loc8: type = array_type %int_3.loc8_50, %i32.2 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.loc8: type = class_type @Array, @Array(constants.%i32, constants.%int_3.1ba) [concrete = constants.%Array.b3a] // CHECK:STDOUT: %.loc8_50.2: Core.Form = init_form imports.%initializer_list.decl [concrete = constants.%.0ee] // CHECK:STDOUT: %.loc8_50.3: ref %initializer_list = temporary_storage // CHECK:STDOUT: %impl.elem0.loc8_50.1: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] @@ -290,7 +290,7 @@ fn F() { // CHECK:STDOUT: %bound_method.loc8_50.2: = bound_method %int_1.loc8_43, %specific_fn.loc8_50.1 [concrete = constants.%bound_method.953] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_50.1: init %i32 = call %bound_method.loc8_50.2(%int_1.loc8_43) [concrete = constants.%int_1.0c6] // CHECK:STDOUT: %.loc8_50.4: init %i32 = converted %int_1.loc8_43, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_50.1 [concrete = constants.%int_1.0c6] -// CHECK:STDOUT: %.loc8_50.5: ref %array_type = temporary_storage +// CHECK:STDOUT: %.loc8_50.5: ref %Array.b3a = temporary_storage // CHECK:STDOUT: %int_0.loc8: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc8_50.6: ref %i32 = array_index %.loc8_50.5, %int_0.loc8 // CHECK:STDOUT: %.loc8_50.7: init %i32 to %.loc8_50.6 = in_place_init %.loc8_50.4 [concrete = constants.%int_1.0c6] @@ -312,10 +312,10 @@ fn F() { // CHECK:STDOUT: %int_2.loc8_50: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc8_50.12: ref %i32 = array_index %.loc8_50.5, %int_2.loc8_50 // CHECK:STDOUT: %.loc8_50.13: init %i32 to %.loc8_50.12 = in_place_init %.loc8_50.11 [concrete = constants.%int_3.410] -// CHECK:STDOUT: %.loc8_50.14: init %array_type to %.loc8_50.5 = array_init (%.loc8_50.7, %.loc8_50.10, %.loc8_50.13) [concrete = constants.%array] -// CHECK:STDOUT: %.loc8_50.15: init %array_type = converted %.loc8_50.1, %.loc8_50.14 [concrete = constants.%array] -// CHECK:STDOUT: %.loc8_50.16: ref %array_type = temporary %.loc8_50.5, %.loc8_50.15 [concrete = constants.%.981] -// CHECK:STDOUT: %.loc8_50.17: %array_type = acquire_value %.loc8_50.16 [concrete = constants.%array] +// CHECK:STDOUT: %.loc8_50.14: init %Array.b3a to %.loc8_50.5 = array_init (%.loc8_50.7, %.loc8_50.10, %.loc8_50.13) [concrete = constants.%array] +// CHECK:STDOUT: %.loc8_50.15: init %Array.b3a = converted %.loc8_50.1, %.loc8_50.14 [concrete = constants.%array] +// CHECK:STDOUT: %.loc8_50.16: ref %Array.b3a = temporary %.loc8_50.5, %.loc8_50.15 [concrete = constants.%.293] +// CHECK:STDOUT: %.loc8_50.17: %Array.b3a = acquire_value %.loc8_50.16 [concrete = constants.%array] // CHECK:STDOUT: %initializer_list.initializer_list.call.loc8: init %initializer_list to %.loc8_50.3 = call generated.%initializer_list.initializer_list.decl.f8e97d.1(%.loc8_50.17) // CHECK:STDOUT: %.loc8_50.18: init %initializer_list = converted %.loc8_50.1, %initializer_list.initializer_list.call.loc8 // CHECK:STDOUT: %.loc8_50.19: ref %initializer_list = temporary %.loc8_50.3, %.loc8_50.18 @@ -333,7 +333,7 @@ fn F() { // CHECK:STDOUT: %.loc10_23.1: %tuple.type = tuple_literal (%int_1.loc10_16, %int_2.loc10_19, %int_3.loc10_22) [concrete = constants.%tuple] // CHECK:STDOUT: // CHECK:STDOUT: %int_3.loc10_23: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type.loc10: type = array_type %int_3.loc10_23, %i32.4 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.loc10: type = class_type @Array, @Array(constants.%i32, constants.%int_3.1ba) [concrete = constants.%Array.b3a] // CHECK:STDOUT: %.loc10_23.2: Core.Form = init_form imports.%initializer_list.decl [concrete = constants.%.0ee] // CHECK:STDOUT: %.loc10_23.3: ref %initializer_list = temporary_storage // CHECK:STDOUT: %impl.elem0.loc10_23.1: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] @@ -342,7 +342,7 @@ fn F() { // CHECK:STDOUT: %bound_method.loc10_23.2: = bound_method %int_1.loc10_16, %specific_fn.loc10_23.1 [concrete = constants.%bound_method.953] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_23.1: init %i32 = call %bound_method.loc10_23.2(%int_1.loc10_16) [concrete = constants.%int_1.0c6] // CHECK:STDOUT: %.loc10_23.4: init %i32 = converted %int_1.loc10_16, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_23.1 [concrete = constants.%int_1.0c6] -// CHECK:STDOUT: %.loc10_23.5: ref %array_type = temporary_storage +// CHECK:STDOUT: %.loc10_23.5: ref %Array.b3a = temporary_storage // CHECK:STDOUT: %int_0.loc10: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc10_23.6: ref %i32 = array_index %.loc10_23.5, %int_0.loc10 // CHECK:STDOUT: %.loc10_23.7: init %i32 to %.loc10_23.6 = in_place_init %.loc10_23.4 [concrete = constants.%int_1.0c6] @@ -364,10 +364,10 @@ fn F() { // CHECK:STDOUT: %int_2.loc10_23: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc10_23.12: ref %i32 = array_index %.loc10_23.5, %int_2.loc10_23 // CHECK:STDOUT: %.loc10_23.13: init %i32 to %.loc10_23.12 = in_place_init %.loc10_23.11 [concrete = constants.%int_3.410] -// CHECK:STDOUT: %.loc10_23.14: init %array_type to %.loc10_23.5 = array_init (%.loc10_23.7, %.loc10_23.10, %.loc10_23.13) [concrete = constants.%array] -// CHECK:STDOUT: %.loc10_23.15: init %array_type = converted %.loc10_23.1, %.loc10_23.14 [concrete = constants.%array] -// CHECK:STDOUT: %.loc10_23.16: ref %array_type = temporary %.loc10_23.5, %.loc10_23.15 [concrete = constants.%.981] -// CHECK:STDOUT: %.loc10_23.17: %array_type = acquire_value %.loc10_23.16 [concrete = constants.%array] +// CHECK:STDOUT: %.loc10_23.14: init %Array.b3a to %.loc10_23.5 = array_init (%.loc10_23.7, %.loc10_23.10, %.loc10_23.13) [concrete = constants.%array] +// CHECK:STDOUT: %.loc10_23.15: init %Array.b3a = converted %.loc10_23.1, %.loc10_23.14 [concrete = constants.%array] +// CHECK:STDOUT: %.loc10_23.16: ref %Array.b3a = temporary %.loc10_23.5, %.loc10_23.15 [concrete = constants.%.293] +// CHECK:STDOUT: %.loc10_23.17: %Array.b3a = acquire_value %.loc10_23.16 [concrete = constants.%array] // CHECK:STDOUT: %initializer_list.initializer_list.call.loc10: init %initializer_list to %.loc10_23.3 = call generated.%initializer_list.initializer_list.decl.f8e97d.2(%.loc10_23.17) // CHECK:STDOUT: %.loc10_23.18: init %initializer_list = converted %.loc10_23.1, %initializer_list.initializer_list.call.loc10 // CHECK:STDOUT: %.loc10_23.19: ref %initializer_list = temporary %.loc10_23.3, %.loc10_23.18 @@ -377,7 +377,7 @@ fn F() { // CHECK:STDOUT: %Consume__carbon_thunk.call: init %empty_tuple.type = call imports.%Consume__carbon_thunk.decl(%addr.loc10) // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %.loc10_23.19, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_23.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%.loc10_23.19) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_23.2: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.981) +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_23.2: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.293) // CHECK:STDOUT: %int_1.loc12_37: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc12_40: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3.loc12_43: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] @@ -385,7 +385,7 @@ fn F() { // CHECK:STDOUT: %.loc12_44.2: ref %InitListConstructor = temporary_storage // CHECK:STDOUT: // CHECK:STDOUT: %int_3.loc12_44: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %array_type.loc12: type = array_type %int_3.loc12_44, %i32.6 [concrete = constants.%array_type] +// CHECK:STDOUT: %Array.loc12: type = class_type @Array, @Array(constants.%i32, constants.%int_3.1ba) [concrete = constants.%Array.b3a] // CHECK:STDOUT: %.loc12_44.3: Core.Form = init_form imports.%initializer_list.decl [concrete = constants.%.0ee] // CHECK:STDOUT: %.loc12_44.4: ref %initializer_list = temporary_storage // CHECK:STDOUT: %impl.elem0.loc12_44.1: %.b7a = impl_witness_access constants.%ImplicitAs.impl_witness.a2a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] @@ -394,7 +394,7 @@ fn F() { // CHECK:STDOUT: %bound_method.loc12_44.2: = bound_method %int_1.loc12_37, %specific_fn.loc12_44.1 [concrete = constants.%bound_method.953] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_44.1: init %i32 = call %bound_method.loc12_44.2(%int_1.loc12_37) [concrete = constants.%int_1.0c6] // CHECK:STDOUT: %.loc12_44.5: init %i32 = converted %int_1.loc12_37, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_44.1 [concrete = constants.%int_1.0c6] -// CHECK:STDOUT: %.loc12_44.6: ref %array_type = temporary_storage +// CHECK:STDOUT: %.loc12_44.6: ref %Array.b3a = temporary_storage // CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc12_44.7: ref %i32 = array_index %.loc12_44.6, %int_0.loc12 // CHECK:STDOUT: %.loc12_44.8: init %i32 to %.loc12_44.7 = in_place_init %.loc12_44.5 [concrete = constants.%int_1.0c6] @@ -416,10 +416,10 @@ fn F() { // CHECK:STDOUT: %int_2.loc12_44: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc12_44.13: ref %i32 = array_index %.loc12_44.6, %int_2.loc12_44 // CHECK:STDOUT: %.loc12_44.14: init %i32 to %.loc12_44.13 = in_place_init %.loc12_44.12 [concrete = constants.%int_3.410] -// CHECK:STDOUT: %.loc12_44.15: init %array_type to %.loc12_44.6 = array_init (%.loc12_44.8, %.loc12_44.11, %.loc12_44.14) [concrete = constants.%array] -// CHECK:STDOUT: %.loc12_44.16: init %array_type = converted %.loc12_44.1, %.loc12_44.15 [concrete = constants.%array] -// CHECK:STDOUT: %.loc12_44.17: ref %array_type = temporary %.loc12_44.6, %.loc12_44.16 [concrete = constants.%.981] -// CHECK:STDOUT: %.loc12_44.18: %array_type = acquire_value %.loc12_44.17 [concrete = constants.%array] +// CHECK:STDOUT: %.loc12_44.15: init %Array.b3a to %.loc12_44.6 = array_init (%.loc12_44.8, %.loc12_44.11, %.loc12_44.14) [concrete = constants.%array] +// CHECK:STDOUT: %.loc12_44.16: init %Array.b3a = converted %.loc12_44.1, %.loc12_44.15 [concrete = constants.%array] +// CHECK:STDOUT: %.loc12_44.17: ref %Array.b3a = temporary %.loc12_44.6, %.loc12_44.16 [concrete = constants.%.293] +// CHECK:STDOUT: %.loc12_44.18: %Array.b3a = acquire_value %.loc12_44.17 [concrete = constants.%array] // CHECK:STDOUT: %initializer_list.initializer_list.call.loc12: init %initializer_list to %.loc12_44.4 = call generated.%initializer_list.initializer_list.decl.f8e97d.3(%.loc12_44.18) // CHECK:STDOUT: %.loc12_44.19: init %initializer_list = converted %.loc12_44.1, %initializer_list.initializer_list.call.loc12 // CHECK:STDOUT: %.loc12_44.20: ref %initializer_list = temporary %.loc12_44.4, %.loc12_44.19 @@ -444,16 +444,16 @@ fn F() { // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12_44.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12_44.1(%.loc12_44.25) // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12_44.2: = bound_method %.loc12_44.20, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12_44.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12_44.2(%.loc12_44.20) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12_44.3: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.981) +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12_44.3: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.293) // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_50.19, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 // CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_50.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_50.19) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_50.2: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.981) +// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_50.2: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.293) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @initializer_list.initializer_list.loc8(%_.param: %array_type) -> out %return.param: %initializer_list = "cpp.std.initializer_list.make"; +// CHECK:STDOUT: fn @initializer_list.initializer_list.loc8(%_.param: %Array.b3a) -> out %return.param: %initializer_list = "cpp.std.initializer_list.make"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @initializer_list.initializer_list.loc10(%_.param: %array_type) -> out %return.param: %initializer_list = "cpp.std.initializer_list.make"; +// CHECK:STDOUT: fn @initializer_list.initializer_list.loc10(%_.param: %Array.b3a) -> out %return.param: %initializer_list = "cpp.std.initializer_list.make"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_23.1(%self.param: ref %initializer_list) = "no_op"; // CHECK:STDOUT: @@ -475,7 +475,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_23.2(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_23.2(%self.param: ref %Array.b3a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc10_23.1: ref %i32 = array_index %self.param, %int_2 @@ -492,16 +492,16 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_23.3(%self.param: ref %array_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_23.3(%self.param: ref %Array.b3a) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_23.3(%self.param: ref %array_type) { +// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_23.3(%self.param: ref %Array.b3a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) // CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @initializer_list.initializer_list.loc12(%_.param: %array_type) -> out %return.param: %initializer_list = "cpp.std.initializer_list.make"; +// CHECK:STDOUT: fn @initializer_list.initializer_list.loc12(%_.param: %Array.b3a) -> out %return.param: %initializer_list = "cpp.std.initializer_list.make"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12(%self.param: ref %InitListConstructor) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/element_access.carbon b/toolchain/check/testdata/tuple/element_access.carbon index f89eeb830b23..9918ff7a6993 100644 --- a/toolchain/check/testdata/tuple/element_access.carbon +++ b/toolchain/check/testdata/tuple/element_access.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/type.cpp b/toolchain/check/type.cpp index 6dec14e82317..61450067b711 100644 --- a/toolchain/check/type.cpp +++ b/toolchain/check/type.cpp @@ -7,10 +7,12 @@ #include "toolchain/check/control_flow.h" #include "toolchain/check/eval.h" #include "toolchain/check/facet_type.h" +#include "toolchain/check/generic.h" #include "toolchain/check/inst.h" #include "toolchain/check/type_completion.h" #include "toolchain/sem_ir/declared_facet_type.h" #include "toolchain/sem_ir/ids.h" +#include "toolchain/sem_ir/type_info.h" #include "toolchain/sem_ir/typed_insts.h" namespace Carbon::Check { @@ -47,6 +49,36 @@ auto ValidateIntType(Context& context, SemIR::LocId loc_id, return true; } +auto ValidateArrayType(Context& context, SemIR::LocId loc_id, + SemIR::ArrayType result) -> bool { + auto int_bound = context.insts().TryGetAs(result.bound_id); + if (!int_bound) { + // Symbolic or erroneous bound. + return result.bound_id != SemIR::ErrorInst::InstId; + } + + // TODO: We should check that the size of the resulting array type + // fits in 64 bits, not just that the bound does. Should we use a + // 32-bit limit for 32-bit targets? + const auto& bound_val = context.ints().Get(int_bound->int_id); + if (context.types().IsSignedInt(int_bound->type_id) && + bound_val.isNegative()) { + CARBON_DIAGNOSTIC(ArrayBoundNegative, Error, + "array bound of {0} is negative", TypedInt); + context.emitter().Emit(loc_id, ArrayBoundNegative, + {.type = int_bound->type_id, .value = bound_val}); + return false; + } + if (bound_val.getActiveBits() > 64) { + CARBON_DIAGNOSTIC(ArrayBoundTooLarge, Error, + "array bound of {0} is too large", TypedInt); + context.emitter().Emit(loc_id, ArrayBoundTooLarge, + {.type = int_bound->type_id, .value = bound_val}); + return false; + } + return true; +} + auto ValidateFloatTypeAndSetKind(Context& context, SemIR::LocId loc_id, SemIR::FloatType& result) -> bool { // Get the bit width value. @@ -264,13 +296,19 @@ auto GetPointerType(Context& context, SemIR::TypeInstId pointee_type_id) return GetCompleteTypeImpl(context, pointee_type_id); } -auto GetArrayType(Context& context, SemIR::InstId bound_id, - SemIR::TypeInstId element_type_inst_id) -> SemIR::TypeId { - SemIR::ArrayType inst = {.type_id = SemIR::TypeType::TypeId, - .bound_id = bound_id, - .element_type_inst_id = element_type_inst_id}; - return context.types().GetTypeIdForTypeConstantId( - EvalOrAddInst(context, SemIR::LocIdAndInst::NoLoc(inst))); +auto TryGetAsArrayType(Context& context, SemIR::LocId loc_id, + SemIR::TypeId type_id) + -> std::optional { + if (auto class_type = context.types().TryGetAs(type_id); + class_type && + SemIR::RecognizedTypeInfo::ForType(context.sem_ir(), *class_type).kind == + SemIR::RecognizedTypeInfo::Array) { + // Resolve the definition of the specific class so we can determine which + // type is being adapted. + ResolveSpecificDefinition(context, loc_id, class_type->specific_id); + type_id = context.types().GetAdaptedType(type_id); + } + return context.types().TryGetAs(type_id); } auto GetPatternType(Context& context, SemIR::TypeId scrutinee_type_id) diff --git a/toolchain/check/type.h b/toolchain/check/type.h index fd9cf4db9a95..ae3228cc5c45 100644 --- a/toolchain/check/type.h +++ b/toolchain/check/type.h @@ -15,6 +15,11 @@ namespace Carbon::Check { auto ValidateIntType(Context& context, SemIR::LocId loc_id, SemIR::IntType result) -> bool; +// Enforces that an array type has a valid bound. Diagnostics are emitted at +// `loc_id`. +auto ValidateArrayType(Context& context, SemIR::LocId loc_id, + SemIR::ArrayType result) -> bool; + // Enforces that a float type has a valid bit width. If the `float_kind` field // is `None`, sets it to a suitable kind for the bit width. auto ValidateFloatTypeAndSetKind(Context& context, SemIR::LocId loc_id, @@ -119,9 +124,11 @@ auto GetFacetAccessType(Context& context, SemIR::InstId facet_value_inst_id) auto GetPointerType(Context& context, SemIR::TypeInstId pointee_type_id) -> SemIR::TypeId; -// Returns an array type with the given `bound_id` and `element_type_inst_id`. -auto GetArrayType(Context& context, SemIR::InstId bound_id, - SemIR::TypeInstId element_type_inst_id) -> SemIR::TypeId; +// If `type_id` is `Core.Array(T, N)` or a primitive array type, returns the +// primitive array type that it is or adapts. Otherwise, returns `std::nullopt`. +auto TryGetAsArrayType(Context& context, SemIR::LocId loc_id, + SemIR::TypeId type_id) + -> std::optional; // Returns a struct type with the given fields. auto GetStructType(Context& context, SemIR::StructTypeFieldsId fields_id) diff --git a/toolchain/lower/constant.cpp b/toolchain/lower/constant.cpp index 7704756c8988..d68ffcd12125 100644 --- a/toolchain/lower/constant.cpp +++ b/toolchain/lower/constant.cpp @@ -182,15 +182,14 @@ static auto EmitAsConstant(ConstantContext& context, SemIR::TupleValue inst) -> llvm::Constant* { // TODO: Add an ArrayValue instruction and stop using TupleValues to represent // array constants. - if (context.sem_ir().types().Is(inst.type_id)) { - return EmitAggregateConstant( - context, inst.elements_id, - cast(context.GetType(inst.type_id))); + auto* llvm_type = context.GetType(inst.type_id); + if (auto* array_type = dyn_cast(llvm_type)) { + return EmitAggregateConstant(context, inst.elements_id, + array_type); } return EmitAggregateConstant( - context, inst.elements_id, - cast(context.GetType(inst.type_id))); + context, inst.elements_id, cast(llvm_type)); } static auto EmitAsConstant(ConstantContext& context, SemIR::AddrOf inst) diff --git a/toolchain/lower/handle_call.cpp b/toolchain/lower/handle_call.cpp index 3299146fdcc0..cc618a1f3c8a 100644 --- a/toolchain/lower/handle_call.cpp +++ b/toolchain/lower/handle_call.cpp @@ -411,6 +411,7 @@ static auto HandleBuiltinCall(FunctionContext& context, SemIR::InstId inst_id, return; } + case SemIR::BuiltinFunctionKind::ArrayMakeType: case SemIR::BuiltinFunctionKind::BoolMakeType: case SemIR::BuiltinFunctionKind::CharLiteralMakeType: case SemIR::BuiltinFunctionKind::FloatLiteralMakeType: diff --git a/toolchain/lower/testdata/array/array_in_place.carbon b/toolchain/lower/testdata/array/array_in_place.carbon index 7e5f72ff88bc..c3d8f155ea6d 100644 --- a/toolchain/lower/testdata/array/array_in_place.carbon +++ b/toolchain/lower/testdata/array/array_in_place.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -23,58 +23,58 @@ fn G() { // CHECK:STDOUT: declare void @_CF.Main(ptr sret({ i32, i32, i32 })) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !30 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !32 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [2 x { i32, i32, i32 }], align 4, !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !31 -// CHECK:STDOUT: %.loc16_47.6.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %_.var, i32 0, i64 0, !dbg !32 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_47.6.array.index), !dbg !33 -// CHECK:STDOUT: %.loc16_47.5.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %_.var, i32 0, i64 1, !dbg !32 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_47.5.array.index), !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.133da171e935f2c5:core.Destroy.Core"(ptr %_.var), !dbg !31 -// CHECK:STDOUT: ret void, !dbg !36 +// CHECK:STDOUT: %_.var = alloca [2 x { i32, i32, i32 }], align 4, !dbg !33 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !33 +// CHECK:STDOUT: %.loc16_47.6.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %_.var, i32 0, i64 0, !dbg !34 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_47.6.array.index), !dbg !35 +// CHECK:STDOUT: %.loc16_47.5.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %_.var, i32 0, i64 1, !dbg !34 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_47.5.array.index), !dbg !36 +// CHECK:STDOUT: call void @"_CSelfDestruct.b828f68ad876bf09:core.Destroy.Core"(ptr %_.var), !dbg !33 +// CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !37 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !39 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !39 +// CHECK:STDOUT: ret void, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !43 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !43 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !43 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !43 -// CHECK:STDOUT: ret void, !dbg !43 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !45 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !45 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !45 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !45 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !45 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !45 +// CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !45 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !47 -// CHECK:STDOUT: ret void, !dbg !47 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !49 +// CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.133da171e935f2c5:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b828f68ad876bf09:core.Destroy.Core"(ptr %self) #0 !dbg !51 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %self, i32 0, i64 1, !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %.loc16_3.1.array.index), !dbg !51 -// CHECK:STDOUT: %.loc16_3.2.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %self, i32 0, i64 0, !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %.loc16_3.2.array.index), !dbg !51 -// CHECK:STDOUT: ret void, !dbg !51 +// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %self, i32 0, i64 1, !dbg !53 +// CHECK:STDOUT: call void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %.loc16_3.1.array.index), !dbg !53 +// CHECK:STDOUT: %.loc16_3.2.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %self, i32 0, i64 0, !dbg !53 +// CHECK:STDOUT: call void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %.loc16_3.2.array.index), !dbg !53 +// CHECK:STDOUT: ret void, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.133da171e935f2c5:core.Destroy.Core"(ptr %self) #0 !dbg !53 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b828f68ad876bf09:core.Destroy.Core"(ptr %self) #0 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.133da171e935f2c5:core.Destroy.Core"(ptr %self), !dbg !55 -// CHECK:STDOUT: ret void, !dbg !55 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b828f68ad876bf09:core.Destroy.Core"(ptr %self), !dbg !57 +// CHECK:STDOUT: ret void, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -83,45 +83,45 @@ fn G() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!19} +// CHECK:STDOUT: !llvm.dbg.cu = !{!21} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !18 = !DIFile(filename: "array_in_place.carbon", directory: "") -// CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !24 = !{null} -// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} +// CHECK:STDOUT: !20 = !DIFile(filename: "array_in_place.carbon", directory: "") +// CHECK:STDOUT: !21 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !20, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !22 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !26 = !{null} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !21} +// CHECK:STDOUT: !28 = !{null, !22} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !31 = !DILocation(line: 16, column: 3, scope: !30) -// CHECK:STDOUT: !32 = !DILocation(line: 16, column: 38, scope: !30) -// CHECK:STDOUT: !33 = !DILocation(line: 16, column: 39, scope: !30) -// CHECK:STDOUT: !34 = !DILocation(line: 16, column: 44, scope: !30) -// CHECK:STDOUT: !36 = !DILocation(line: 15, column: 1, scope: !30) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !40) -// CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !20) -// CHECK:STDOUT: !39 = !DILocation(line: 16, column: 3, scope: !37) -// CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) -// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !21) -// CHECK:STDOUT: !43 = !DILocation(line: 16, column: 3, scope: !41) -// CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !21) -// CHECK:STDOUT: !47 = !DILocation(line: 16, column: 3, scope: !45) -// CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.133da171e935f2c5:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) -// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !21) -// CHECK:STDOUT: !51 = !DILocation(line: 16, column: 3, scope: !49) -// CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.133da171e935f2c5:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !21) -// CHECK:STDOUT: !55 = !DILocation(line: 16, column: 3, scope: !53) -// CHECK:STDOUT: !56 = !{!54} +// CHECK:STDOUT: !30 = !{null, !23} +// CHECK:STDOUT: !31 = !DISubroutineType(types: !30) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !20, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !33 = !DILocation(line: 16, column: 3, scope: !32) +// CHECK:STDOUT: !34 = !DILocation(line: 16, column: 38, scope: !32) +// CHECK:STDOUT: !35 = !DILocation(line: 16, column: 39, scope: !32) +// CHECK:STDOUT: !36 = !DILocation(line: 16, column: 44, scope: !32) +// CHECK:STDOUT: !38 = !DILocation(line: 15, column: 1, scope: !32) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !20, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !42) +// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !22) +// CHECK:STDOUT: !41 = !DILocation(line: 16, column: 3, scope: !39) +// CHECK:STDOUT: !42 = !{!40} +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !46) +// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !23) +// CHECK:STDOUT: !45 = !DILocation(line: 16, column: 3, scope: !43) +// CHECK:STDOUT: !46 = !{!44} +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !50) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !23) +// CHECK:STDOUT: !49 = !DILocation(line: 16, column: 3, scope: !47) +// CHECK:STDOUT: !50 = !{!48} +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b828f68ad876bf09:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !54) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !23) +// CHECK:STDOUT: !53 = !DILocation(line: 16, column: 3, scope: !51) +// CHECK:STDOUT: !54 = !{!52} +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b828f68ad876bf09:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !58) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !23) +// CHECK:STDOUT: !57 = !DILocation(line: 16, column: 3, scope: !55) +// CHECK:STDOUT: !58 = !{!56} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/assign_return_value.carbon b/toolchain/lower/testdata/array/assign_return_value.carbon index d2ea78ba3b87..e3482c6dd57c 100644 --- a/toolchain/lower/testdata/array/assign_return_value.carbon +++ b/toolchain/lower/testdata/array/assign_return_value.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -23,73 +23,73 @@ fn Run() { // CHECK:STDOUT: @tuple.1cd.loc13_39 = internal constant { i32, i32 } { i32 12, i32 24 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !30 { +// CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !32 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !33 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !33 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.1cd.loc13_39, i64 8, i1 false), !dbg !34 -// CHECK:STDOUT: ret void, !dbg !34 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !35 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !35 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.1cd.loc13_39, i64 8, i1 false), !dbg !36 +// CHECK:STDOUT: ret void, !dbg !36 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !35 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !37 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [2 x i32], align 4, !dbg !36 -// CHECK:STDOUT: %.loc16_28.1.temp = alloca { i32, i32 }, align 4, !dbg !37 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !36 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc16_28.1.temp), !dbg !37 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_28.1.temp), !dbg !37 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc16_28.1.temp, i32 0, i32 0, !dbg !37 -// CHECK:STDOUT: %.loc16_28.3 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !37 -// CHECK:STDOUT: %.loc16_28.4.array.index = getelementptr inbounds [2 x i32], ptr %_.var, i32 0, i64 0, !dbg !37 -// CHECK:STDOUT: store i32 %.loc16_28.3, ptr %.loc16_28.4.array.index, align 4, !dbg !37 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc16_28.1.temp, i32 0, i32 1, !dbg !37 -// CHECK:STDOUT: %.loc16_28.6 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !37 -// CHECK:STDOUT: %.loc16_28.7.array.index = getelementptr inbounds [2 x i32], ptr %_.var, i32 0, i64 1, !dbg !37 -// CHECK:STDOUT: store i32 %.loc16_28.6, ptr %.loc16_28.7.array.index, align 4, !dbg !37 -// CHECK:STDOUT: call void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %.loc16_28.1.temp), !dbg !37 -// CHECK:STDOUT: call void @"_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core"(ptr %_.var), !dbg !36 -// CHECK:STDOUT: ret i32 0, !dbg !39 +// CHECK:STDOUT: %_.var = alloca [2 x i32], align 4, !dbg !38 +// CHECK:STDOUT: %.loc16_28.1.temp = alloca { i32, i32 }, align 4, !dbg !39 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !38 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc16_28.1.temp), !dbg !39 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_28.1.temp), !dbg !39 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc16_28.1.temp, i32 0, i32 0, !dbg !39 +// CHECK:STDOUT: %.loc16_28.3 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !39 +// CHECK:STDOUT: %.loc16_28.4.array.index = getelementptr inbounds [2 x i32], ptr %_.var, i32 0, i64 0, !dbg !39 +// CHECK:STDOUT: store i32 %.loc16_28.3, ptr %.loc16_28.4.array.index, align 4, !dbg !39 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc16_28.1.temp, i32 0, i32 1, !dbg !39 +// CHECK:STDOUT: %.loc16_28.6 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !39 +// CHECK:STDOUT: %.loc16_28.7.array.index = getelementptr inbounds [2 x i32], ptr %_.var, i32 0, i64 1, !dbg !39 +// CHECK:STDOUT: store i32 %.loc16_28.6, ptr %.loc16_28.7.array.index, align 4, !dbg !39 +// CHECK:STDOUT: call void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %.loc16_28.1.temp), !dbg !39 +// CHECK:STDOUT: call void @"_CSelfDestruct.e690471ed5f74dcb:core.Destroy.Core"(ptr %_.var), !dbg !38 +// CHECK:STDOUT: ret i32 0, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !40 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !42 +// CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !46 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !46 -// CHECK:STDOUT: ret void, !dbg !46 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !48 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !48 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !48 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !48 +// CHECK:STDOUT: ret void, !dbg !48 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !48 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !50 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !50 -// CHECK:STDOUT: ret void, !dbg !50 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !52 +// CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e690471ed5f74dcb:core.Destroy.Core"(ptr %self) #0 !dbg !54 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 1, !dbg !54 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.1.array.index), !dbg !54 -// CHECK:STDOUT: %.loc16_3.2.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 0, !dbg !54 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.2.array.index), !dbg !54 -// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 1, !dbg !56 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.1.array.index), !dbg !56 +// CHECK:STDOUT: %.loc16_3.2.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 0, !dbg !56 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.2.array.index), !dbg !56 +// CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e690471ed5f74dcb:core.Destroy.Core"(ptr %self) #0 !dbg !58 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core"(ptr %self), !dbg !58 -// CHECK:STDOUT: ret void, !dbg !58 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e690471ed5f74dcb:core.Destroy.Core"(ptr %self), !dbg !60 +// CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -104,48 +104,48 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!19} +// CHECK:STDOUT: !llvm.dbg.cu = !{!21} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !18 = !DIFile(filename: "assign_return_value.carbon", directory: "") -// CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !22 = !{!21} -// CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !24 = !{!20} +// CHECK:STDOUT: !20 = !DIFile(filename: "assign_return_value.carbon", directory: "") +// CHECK:STDOUT: !21 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !20, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !22 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{!23} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} +// CHECK:STDOUT: !26 = !{!22} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !21} +// CHECK:STDOUT: !28 = !{null, !22} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 13, type: !23, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !33 = !DILocation(line: 13, column: 31, scope: !30) -// CHECK:STDOUT: !34 = !DILocation(line: 13, column: 24, scope: !30) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !36 = !DILocation(line: 16, column: 3, scope: !35) -// CHECK:STDOUT: !37 = !DILocation(line: 16, column: 26, scope: !35) -// CHECK:STDOUT: !39 = !DILocation(line: 15, column: 1, scope: !35) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) -// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !20) -// CHECK:STDOUT: !42 = !DILocation(line: 16, column: 26, scope: !40) -// CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !21) -// CHECK:STDOUT: !46 = !DILocation(line: 16, column: 26, scope: !44) -// CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !21) -// CHECK:STDOUT: !50 = !DILocation(line: 16, column: 26, scope: !48) -// CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !21) -// CHECK:STDOUT: !54 = !DILocation(line: 16, column: 3, scope: !52) -// CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) -// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !21) -// CHECK:STDOUT: !58 = !DILocation(line: 16, column: 3, scope: !56) -// CHECK:STDOUT: !59 = !{!57} +// CHECK:STDOUT: !30 = !{null, !23} +// CHECK:STDOUT: !31 = !DISubroutineType(types: !30) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !20, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !35 = !DILocation(line: 13, column: 31, scope: !32) +// CHECK:STDOUT: !36 = !DILocation(line: 13, column: 24, scope: !32) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !20, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !38 = !DILocation(line: 16, column: 3, scope: !37) +// CHECK:STDOUT: !39 = !DILocation(line: 16, column: 26, scope: !37) +// CHECK:STDOUT: !41 = !DILocation(line: 15, column: 1, scope: !37) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !20, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !45) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !22) +// CHECK:STDOUT: !44 = !DILocation(line: 16, column: 26, scope: !42) +// CHECK:STDOUT: !45 = !{!43} +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !49) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !23) +// CHECK:STDOUT: !48 = !DILocation(line: 16, column: 26, scope: !46) +// CHECK:STDOUT: !49 = !{!47} +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !53) +// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !23) +// CHECK:STDOUT: !52 = !DILocation(line: 16, column: 26, scope: !50) +// CHECK:STDOUT: !53 = !{!51} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e690471ed5f74dcb:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !57) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !23) +// CHECK:STDOUT: !56 = !DILocation(line: 16, column: 3, scope: !54) +// CHECK:STDOUT: !57 = !{!55} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e690471ed5f74dcb:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !61) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !23) +// CHECK:STDOUT: !60 = !DILocation(line: 16, column: 3, scope: !58) +// CHECK:STDOUT: !61 = !{!59} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/base.carbon b/toolchain/lower/testdata/array/base.carbon index 1e3a19524a1c..cebb4c5acfff 100644 --- a/toolchain/lower/testdata/array/base.carbon +++ b/toolchain/lower/testdata/array/base.carbon @@ -22,168 +22,168 @@ fn Run() { // CHECK:STDOUT: ; ModuleID = 'base.carbon' // CHECK:STDOUT: source_filename = "base.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @array.a00.loc14_3 = internal constant [1 x i32] [i32 1] -// CHECK:STDOUT: @array.541.loc15_3 = internal constant [2 x double] [double 1.110000e+01, double 2.200000e+00] -// CHECK:STDOUT: @array.1cb.loc16_3 = internal constant [5 x {}] zeroinitializer +// CHECK:STDOUT: @array.5e7.loc14_3 = internal constant [1 x i32] [i32 1] +// CHECK:STDOUT: @array.455.loc15_3 = internal constant [2 x double] [double 1.110000e+01, double 2.200000e+00] +// CHECK:STDOUT: @array.ec6.loc16_3 = internal constant [5 x {}] zeroinitializer // CHECK:STDOUT: @tuple.479.loc17_3 = internal constant { i32, i32, i32 } { i32 1, i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !42 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var.loc14 = alloca [1 x i32], align 4, !dbg !43 -// CHECK:STDOUT: %_.var.loc15 = alloca [2 x double], align 8, !dbg !46 -// CHECK:STDOUT: %_.var.loc16 = alloca [5 x {}], align 1, !dbg !49 -// CHECK:STDOUT: %d.var = alloca { i32, i32, i32 }, align 4, !dbg !52 -// CHECK:STDOUT: %_.var.loc18 = alloca [3 x i32], align 4, !dbg !55 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc14), !dbg !43 -// CHECK:STDOUT: %.loc14_29.3.array.index = getelementptr inbounds [1 x i32], ptr %_.var.loc14, i32 0, i64 0, !dbg !44 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %_.var.loc14, ptr align 4 @array.a00.loc14_3, i64 4, i1 false), !dbg !43 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc15), !dbg !46 -// CHECK:STDOUT: %.loc15_37.3.array.index = getelementptr inbounds [2 x double], ptr %_.var.loc15, i32 0, i64 0, !dbg !47 -// CHECK:STDOUT: %.loc15_37.6.array.index = getelementptr inbounds [2 x double], ptr %_.var.loc15, i32 0, i64 1, !dbg !47 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc15, ptr align 8 @array.541.loc15_3, i64 16, i1 false), !dbg !46 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !49 -// CHECK:STDOUT: %.loc16_45.2.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 0, !dbg !50 -// CHECK:STDOUT: %.loc16_45.5.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 1, !dbg !50 -// CHECK:STDOUT: %.loc16_45.8.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 2, !dbg !50 -// CHECK:STDOUT: %.loc16_45.11.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 3, !dbg !50 -// CHECK:STDOUT: %.loc16_45.14.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 4, !dbg !50 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc16, ptr align 1 @array.1cb.loc16_3, i64 0, i1 false), !dbg !49 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !52 -// CHECK:STDOUT: %tuple.elem0.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !53 -// CHECK:STDOUT: %tuple.elem1.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 1, !dbg !53 -// CHECK:STDOUT: %tuple.elem2.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 2, !dbg !53 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %d.var, ptr align 4 @tuple.479.loc17_3, i64 12, i1 false), !dbg !52 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18), !dbg !55 -// CHECK:STDOUT: %tuple.elem0.loc18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !56 -// CHECK:STDOUT: %.loc18_26.1 = load i32, ptr %tuple.elem0.loc18.tuple.elem, align 4, !dbg !56 -// CHECK:STDOUT: %.loc18_26.2.array.index = getelementptr inbounds [3 x i32], ptr %_.var.loc18, i32 0, i64 0, !dbg !56 -// CHECK:STDOUT: store i32 %.loc18_26.1, ptr %.loc18_26.2.array.index, align 4, !dbg !56 -// CHECK:STDOUT: %tuple.elem1.loc18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 1, !dbg !56 -// CHECK:STDOUT: %.loc18_26.4 = load i32, ptr %tuple.elem1.loc18.tuple.elem, align 4, !dbg !56 -// CHECK:STDOUT: %.loc18_26.5.array.index = getelementptr inbounds [3 x i32], ptr %_.var.loc18, i32 0, i64 1, !dbg !56 -// CHECK:STDOUT: store i32 %.loc18_26.4, ptr %.loc18_26.5.array.index, align 4, !dbg !56 -// CHECK:STDOUT: %tuple.elem2.loc18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 2, !dbg !56 -// CHECK:STDOUT: %.loc18_26.7 = load i32, ptr %tuple.elem2.loc18.tuple.elem, align 4, !dbg !56 -// CHECK:STDOUT: %.loc18_26.8.array.index = getelementptr inbounds [3 x i32], ptr %_.var.loc18, i32 0, i64 2, !dbg !56 -// CHECK:STDOUT: store i32 %.loc18_26.7, ptr %.loc18_26.8.array.index, align 4, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr %_.var.loc18), !dbg !55 -// CHECK:STDOUT: call void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %d.var), !dbg !52 -// CHECK:STDOUT: call void @"_CSelfDestruct.c135263f75f7214d:core.Destroy.Core"(ptr %_.var.loc16), !dbg !49 -// CHECK:STDOUT: call void @"_CSelfDestruct.8815565a27e3ec8c:core.Destroy.Core"(ptr %_.var.loc15), !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.d277540f487baeed:core.Destroy.Core"(ptr %_.var.loc14), !dbg !43 -// CHECK:STDOUT: ret i32 0, !dbg !58 +// CHECK:STDOUT: %_.var.loc14 = alloca [1 x i32], align 4, !dbg !45 +// CHECK:STDOUT: %_.var.loc15 = alloca [2 x double], align 8, !dbg !48 +// CHECK:STDOUT: %_.var.loc16 = alloca [5 x {}], align 1, !dbg !51 +// CHECK:STDOUT: %d.var = alloca { i32, i32, i32 }, align 4, !dbg !54 +// CHECK:STDOUT: %_.var.loc18 = alloca [3 x i32], align 4, !dbg !57 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc14), !dbg !45 +// CHECK:STDOUT: %.loc14_29.3.array.index = getelementptr inbounds [1 x i32], ptr %_.var.loc14, i32 0, i64 0, !dbg !46 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %_.var.loc14, ptr align 4 @array.5e7.loc14_3, i64 4, i1 false), !dbg !45 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc15), !dbg !48 +// CHECK:STDOUT: %.loc15_37.3.array.index = getelementptr inbounds [2 x double], ptr %_.var.loc15, i32 0, i64 0, !dbg !49 +// CHECK:STDOUT: %.loc15_37.6.array.index = getelementptr inbounds [2 x double], ptr %_.var.loc15, i32 0, i64 1, !dbg !49 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc15, ptr align 8 @array.455.loc15_3, i64 16, i1 false), !dbg !48 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !51 +// CHECK:STDOUT: %.loc16_45.2.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 0, !dbg !52 +// CHECK:STDOUT: %.loc16_45.5.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 1, !dbg !52 +// CHECK:STDOUT: %.loc16_45.8.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 2, !dbg !52 +// CHECK:STDOUT: %.loc16_45.11.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 3, !dbg !52 +// CHECK:STDOUT: %.loc16_45.14.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 4, !dbg !52 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc16, ptr align 1 @array.ec6.loc16_3, i64 0, i1 false), !dbg !51 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !54 +// CHECK:STDOUT: %tuple.elem0.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !55 +// CHECK:STDOUT: %tuple.elem1.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 1, !dbg !55 +// CHECK:STDOUT: %tuple.elem2.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 2, !dbg !55 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %d.var, ptr align 4 @tuple.479.loc17_3, i64 12, i1 false), !dbg !54 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18), !dbg !57 +// CHECK:STDOUT: %tuple.elem0.loc18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !58 +// CHECK:STDOUT: %.loc18_26.1 = load i32, ptr %tuple.elem0.loc18.tuple.elem, align 4, !dbg !58 +// CHECK:STDOUT: %.loc18_26.2.array.index = getelementptr inbounds [3 x i32], ptr %_.var.loc18, i32 0, i64 0, !dbg !58 +// CHECK:STDOUT: store i32 %.loc18_26.1, ptr %.loc18_26.2.array.index, align 4, !dbg !58 +// CHECK:STDOUT: %tuple.elem1.loc18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 1, !dbg !58 +// CHECK:STDOUT: %.loc18_26.4 = load i32, ptr %tuple.elem1.loc18.tuple.elem, align 4, !dbg !58 +// CHECK:STDOUT: %.loc18_26.5.array.index = getelementptr inbounds [3 x i32], ptr %_.var.loc18, i32 0, i64 1, !dbg !58 +// CHECK:STDOUT: store i32 %.loc18_26.4, ptr %.loc18_26.5.array.index, align 4, !dbg !58 +// CHECK:STDOUT: %tuple.elem2.loc18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 2, !dbg !58 +// CHECK:STDOUT: %.loc18_26.7 = load i32, ptr %tuple.elem2.loc18.tuple.elem, align 4, !dbg !58 +// CHECK:STDOUT: %.loc18_26.8.array.index = getelementptr inbounds [3 x i32], ptr %_.var.loc18, i32 0, i64 2, !dbg !58 +// CHECK:STDOUT: store i32 %.loc18_26.7, ptr %.loc18_26.8.array.index, align 4, !dbg !58 +// CHECK:STDOUT: call void @"_CSelfDestruct.b3a0adb9db7bb49e:core.Destroy.Core"(ptr %_.var.loc18), !dbg !57 +// CHECK:STDOUT: call void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %d.var), !dbg !54 +// CHECK:STDOUT: call void @"_CSelfDestruct.098f0ff86d747183:core.Destroy.Core"(ptr %_.var.loc16), !dbg !51 +// CHECK:STDOUT: call void @"_CSelfDestruct.916d839e916e4250:core.Destroy.Core"(ptr %_.var.loc15), !dbg !48 +// CHECK:STDOUT: call void @"_CSelfDestruct.0963a7242f630903:core.Destroy.Core"(ptr %_.var.loc14), !dbg !45 +// CHECK:STDOUT: ret i32 0, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !61 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !61 +// CHECK:STDOUT: ret void, !dbg !63 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !63 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b3a0adb9db7bb49e:core.Destroy.Core"(ptr %self) #0 !dbg !65 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_3.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !65 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc18_3.1.array.index), !dbg !65 -// CHECK:STDOUT: %.loc18_3.2.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 1, !dbg !65 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc18_3.2.array.index), !dbg !65 -// CHECK:STDOUT: %.loc18_3.3.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 0, !dbg !65 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc18_3.3.array.index), !dbg !65 -// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: %.loc18_3.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !67 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc18_3.1.array.index), !dbg !67 +// CHECK:STDOUT: %.loc18_3.2.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 1, !dbg !67 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc18_3.2.array.index), !dbg !67 +// CHECK:STDOUT: %.loc18_3.3.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 0, !dbg !67 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc18_3.3.array.index), !dbg !67 +// CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b3a0adb9db7bb49e:core.Destroy.Core"(ptr %self) #0 !dbg !69 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self), !dbg !69 -// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b3a0adb9db7bb49e:core.Destroy.Core"(ptr %self), !dbg !71 +// CHECK:STDOUT: ret void, !dbg !71 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !71 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !73 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !73 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !73 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !73 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !73 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !73 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !73 -// CHECK:STDOUT: ret void, !dbg !73 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !75 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !75 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !75 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !75 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !75 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !75 +// CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !75 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !77 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !77 -// CHECK:STDOUT: ret void, !dbg !77 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !79 +// CHECK:STDOUT: ret void, !dbg !79 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %self) #0 !dbg !79 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %self) #0 !dbg !81 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !81 +// CHECK:STDOUT: ret void, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c135263f75f7214d:core.Destroy.Core"(ptr %self) #0 !dbg !83 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.098f0ff86d747183:core.Destroy.Core"(ptr %self) #0 !dbg !85 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 4, !dbg !85 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.1.array.index), !dbg !85 -// CHECK:STDOUT: %.loc16_3.2.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 3, !dbg !85 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.2.array.index), !dbg !85 -// CHECK:STDOUT: %.loc16_3.3.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 2, !dbg !85 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.3.array.index), !dbg !85 -// CHECK:STDOUT: %.loc16_3.4.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 1, !dbg !85 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.4.array.index), !dbg !85 -// CHECK:STDOUT: %.loc16_3.5.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 0, !dbg !85 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.5.array.index), !dbg !85 -// CHECK:STDOUT: ret void, !dbg !85 +// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 4, !dbg !87 +// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.1.array.index), !dbg !87 +// CHECK:STDOUT: %.loc16_3.2.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 3, !dbg !87 +// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.2.array.index), !dbg !87 +// CHECK:STDOUT: %.loc16_3.3.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 2, !dbg !87 +// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.3.array.index), !dbg !87 +// CHECK:STDOUT: %.loc16_3.4.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 1, !dbg !87 +// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.4.array.index), !dbg !87 +// CHECK:STDOUT: %.loc16_3.5.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 0, !dbg !87 +// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.5.array.index), !dbg !87 +// CHECK:STDOUT: ret void, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c135263f75f7214d:core.Destroy.Core"(ptr %self) #0 !dbg !87 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.098f0ff86d747183:core.Destroy.Core"(ptr %self) #0 !dbg !89 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c135263f75f7214d:core.Destroy.Core"(ptr %self), !dbg !89 -// CHECK:STDOUT: ret void, !dbg !89 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.098f0ff86d747183:core.Destroy.Core"(ptr %self), !dbg !91 +// CHECK:STDOUT: ret void, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !93 +// CHECK:STDOUT: ret void, !dbg !95 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8815565a27e3ec8c:core.Destroy.Core"(ptr %self) #0 !dbg !95 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.916d839e916e4250:core.Destroy.Core"(ptr %self) #0 !dbg !97 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15_3.1.array.index = getelementptr inbounds [2 x double], ptr %self, i32 0, i64 1, !dbg !97 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc15_3.1.array.index), !dbg !97 -// CHECK:STDOUT: %.loc15_3.2.array.index = getelementptr inbounds [2 x double], ptr %self, i32 0, i64 0, !dbg !97 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc15_3.2.array.index), !dbg !97 -// CHECK:STDOUT: ret void, !dbg !97 +// CHECK:STDOUT: %.loc15_3.1.array.index = getelementptr inbounds [2 x double], ptr %self, i32 0, i64 1, !dbg !99 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc15_3.1.array.index), !dbg !99 +// CHECK:STDOUT: %.loc15_3.2.array.index = getelementptr inbounds [2 x double], ptr %self, i32 0, i64 0, !dbg !99 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc15_3.2.array.index), !dbg !99 +// CHECK:STDOUT: ret void, !dbg !99 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8815565a27e3ec8c:core.Destroy.Core"(ptr %self) #0 !dbg !99 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.916d839e916e4250:core.Destroy.Core"(ptr %self) #0 !dbg !101 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8815565a27e3ec8c:core.Destroy.Core"(ptr %self), !dbg !101 -// CHECK:STDOUT: ret void, !dbg !101 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.916d839e916e4250:core.Destroy.Core"(ptr %self), !dbg !103 +// CHECK:STDOUT: ret void, !dbg !103 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d277540f487baeed:core.Destroy.Core"(ptr %self) #0 !dbg !103 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0963a7242f630903:core.Destroy.Core"(ptr %self) #0 !dbg !105 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14.array.index = getelementptr inbounds [1 x i32], ptr %self, i32 0, i64 0, !dbg !105 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc14.array.index), !dbg !105 -// CHECK:STDOUT: ret void, !dbg !105 +// CHECK:STDOUT: %.loc14.array.index = getelementptr inbounds [1 x i32], ptr %self, i32 0, i64 0, !dbg !107 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc14.array.index), !dbg !107 +// CHECK:STDOUT: ret void, !dbg !107 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d277540f487baeed:core.Destroy.Core"(ptr %self) #0 !dbg !107 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0963a7242f630903:core.Destroy.Core"(ptr %self) #0 !dbg !109 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d277540f487baeed:core.Destroy.Core"(ptr %self), !dbg !109 -// CHECK:STDOUT: ret void, !dbg !109 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.0963a7242f630903:core.Destroy.Core"(ptr %self), !dbg !111 +// CHECK:STDOUT: ret void, !dbg !111 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -199,83 +199,83 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "base.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !{!34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !{null, !34} +// CHECK:STDOUT: !34 = !DIFile(filename: "base.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !{!36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !40 = !{null, !39} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !32, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !43 = !DILocation(line: 14, column: 3, scope: !42) -// CHECK:STDOUT: !44 = !DILocation(line: 14, column: 26, scope: !42) -// CHECK:STDOUT: !46 = !DILocation(line: 15, column: 3, scope: !42) -// CHECK:STDOUT: !47 = !DILocation(line: 15, column: 26, scope: !42) -// CHECK:STDOUT: !49 = !DILocation(line: 16, column: 3, scope: !42) -// CHECK:STDOUT: !50 = !DILocation(line: 16, column: 25, scope: !42) -// CHECK:STDOUT: !52 = !DILocation(line: 17, column: 3, scope: !42) -// CHECK:STDOUT: !53 = !DILocation(line: 17, column: 28, scope: !42) -// CHECK:STDOUT: !55 = !DILocation(line: 18, column: 3, scope: !42) -// CHECK:STDOUT: !56 = !DILocation(line: 18, column: 26, scope: !42) -// CHECK:STDOUT: !58 = !DILocation(line: 13, column: 1, scope: !42) -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 18, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !62) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !34) -// CHECK:STDOUT: !61 = !DILocation(line: 18, column: 3, scope: !59) -// CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !32, line: 18, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !39) -// CHECK:STDOUT: !65 = !DILocation(line: 18, column: 3, scope: !63) -// CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !32, line: 18, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !70) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !39) -// CHECK:STDOUT: !69 = !DILocation(line: 18, column: 3, scope: !67) -// CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !32, line: 17, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !74) -// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !39) -// CHECK:STDOUT: !73 = !DILocation(line: 17, column: 3, scope: !71) -// CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !32, line: 17, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !78) -// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !39) -// CHECK:STDOUT: !77 = !DILocation(line: 17, column: 3, scope: !75) -// CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !82) -// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !39) -// CHECK:STDOUT: !81 = !DILocation(line: 16, column: 3, scope: !79) -// CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c135263f75f7214d:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !86) -// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !39) -// CHECK:STDOUT: !85 = !DILocation(line: 16, column: 3, scope: !83) -// CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c135263f75f7214d:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !90) -// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !39) -// CHECK:STDOUT: !89 = !DILocation(line: 16, column: 3, scope: !87) -// CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !94) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !39) -// CHECK:STDOUT: !93 = !DILocation(line: 15, column: 3, scope: !91) -// CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8815565a27e3ec8c:core.Destroy.Core", scope: null, file: !32, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !98) -// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !39) -// CHECK:STDOUT: !97 = !DILocation(line: 15, column: 3, scope: !95) -// CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8815565a27e3ec8c:core.Destroy.Core", scope: null, file: !32, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !102) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !39) -// CHECK:STDOUT: !101 = !DILocation(line: 15, column: 3, scope: !99) -// CHECK:STDOUT: !102 = !{!100} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d277540f487baeed:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !106) -// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !39) -// CHECK:STDOUT: !105 = !DILocation(line: 14, column: 3, scope: !103) -// CHECK:STDOUT: !106 = !{!104} -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d277540f487baeed:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !110) -// CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !39) -// CHECK:STDOUT: !109 = !DILocation(line: 14, column: 3, scope: !107) -// CHECK:STDOUT: !110 = !{!108} +// CHECK:STDOUT: !39 = !{null, !36} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !42 = !{null, !41} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !34, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !45 = !DILocation(line: 14, column: 3, scope: !44) +// CHECK:STDOUT: !46 = !DILocation(line: 14, column: 26, scope: !44) +// CHECK:STDOUT: !48 = !DILocation(line: 15, column: 3, scope: !44) +// CHECK:STDOUT: !49 = !DILocation(line: 15, column: 26, scope: !44) +// CHECK:STDOUT: !51 = !DILocation(line: 16, column: 3, scope: !44) +// CHECK:STDOUT: !52 = !DILocation(line: 16, column: 25, scope: !44) +// CHECK:STDOUT: !54 = !DILocation(line: 17, column: 3, scope: !44) +// CHECK:STDOUT: !55 = !DILocation(line: 17, column: 28, scope: !44) +// CHECK:STDOUT: !57 = !DILocation(line: 18, column: 3, scope: !44) +// CHECK:STDOUT: !58 = !DILocation(line: 18, column: 26, scope: !44) +// CHECK:STDOUT: !60 = !DILocation(line: 13, column: 1, scope: !44) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !34, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !64) +// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !36) +// CHECK:STDOUT: !63 = !DILocation(line: 18, column: 3, scope: !61) +// CHECK:STDOUT: !64 = !{!62} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b3a0adb9db7bb49e:core.Destroy.Core", scope: null, file: !34, line: 18, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !68) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !41) +// CHECK:STDOUT: !67 = !DILocation(line: 18, column: 3, scope: !65) +// CHECK:STDOUT: !68 = !{!66} +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b3a0adb9db7bb49e:core.Destroy.Core", scope: null, file: !34, line: 18, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !72) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !41) +// CHECK:STDOUT: !71 = !DILocation(line: 18, column: 3, scope: !69) +// CHECK:STDOUT: !72 = !{!70} +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !34, line: 17, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !76) +// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !41) +// CHECK:STDOUT: !75 = !DILocation(line: 17, column: 3, scope: !73) +// CHECK:STDOUT: !76 = !{!74} +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !34, line: 17, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !80) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !41) +// CHECK:STDOUT: !79 = !DILocation(line: 17, column: 3, scope: !77) +// CHECK:STDOUT: !80 = !{!78} +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !34, line: 16, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !84) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !41) +// CHECK:STDOUT: !83 = !DILocation(line: 16, column: 3, scope: !81) +// CHECK:STDOUT: !84 = !{!82} +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.098f0ff86d747183:core.Destroy.Core", scope: null, file: !34, line: 16, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !88) +// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !41) +// CHECK:STDOUT: !87 = !DILocation(line: 16, column: 3, scope: !85) +// CHECK:STDOUT: !88 = !{!86} +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.098f0ff86d747183:core.Destroy.Core", scope: null, file: !34, line: 16, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !92) +// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !41) +// CHECK:STDOUT: !91 = !DILocation(line: 16, column: 3, scope: !89) +// CHECK:STDOUT: !92 = !{!90} +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !34, line: 15, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !96) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !41) +// CHECK:STDOUT: !95 = !DILocation(line: 15, column: 3, scope: !93) +// CHECK:STDOUT: !96 = !{!94} +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.916d839e916e4250:core.Destroy.Core", scope: null, file: !34, line: 15, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !100) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !41) +// CHECK:STDOUT: !99 = !DILocation(line: 15, column: 3, scope: !97) +// CHECK:STDOUT: !100 = !{!98} +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.916d839e916e4250:core.Destroy.Core", scope: null, file: !34, line: 15, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !104) +// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !41) +// CHECK:STDOUT: !103 = !DILocation(line: 15, column: 3, scope: !101) +// CHECK:STDOUT: !104 = !{!102} +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0963a7242f630903:core.Destroy.Core", scope: null, file: !34, line: 14, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !108) +// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !41) +// CHECK:STDOUT: !107 = !DILocation(line: 14, column: 3, scope: !105) +// CHECK:STDOUT: !108 = !{!106} +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0963a7242f630903:core.Destroy.Core", scope: null, file: !34, line: 14, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !112) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !41) +// CHECK:STDOUT: !111 = !DILocation(line: 14, column: 3, scope: !109) +// CHECK:STDOUT: !112 = !{!110} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/field.carbon b/toolchain/lower/testdata/array/field.carbon index affacdb01da0..7171e4ef987c 100644 --- a/toolchain/lower/testdata/array/field.carbon +++ b/toolchain/lower/testdata/array/field.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -32,34 +32,34 @@ class A { // CHECK:STDOUT: @A.val.loc16_40 = internal constant { [2 x i32] } { [2 x i32] [i32 1, i32 2] } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInit.A.Main(ptr sret({ [2 x i32] }) %return) #0 !dbg !26 { +// CHECK:STDOUT: define void @_CInit.A.Main(ptr sret({ [2 x i32] }) %return) #0 !dbg !28 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_39.2.v = getelementptr inbounds nuw { [2 x i32] }, ptr %return, i32 0, i32 0, !dbg !29 -// CHECK:STDOUT: %.loc16_38.3.array.index = getelementptr inbounds [2 x i32], ptr %.loc16_39.2.v, i32 0, i64 0, !dbg !30 -// CHECK:STDOUT: %.loc16_38.6.array.index = getelementptr inbounds [2 x i32], ptr %.loc16_39.2.v, i32 0, i64 1, !dbg !30 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @A.val.loc16_40, i64 8, i1 false), !dbg !31 -// CHECK:STDOUT: ret void, !dbg !31 +// CHECK:STDOUT: %.loc16_39.2.v = getelementptr inbounds nuw { [2 x i32] }, ptr %return, i32 0, i32 0, !dbg !31 +// CHECK:STDOUT: %.loc16_38.3.array.index = getelementptr inbounds [2 x i32], ptr %.loc16_39.2.v, i32 0, i64 0, !dbg !32 +// CHECK:STDOUT: %.loc16_38.6.array.index = getelementptr inbounds [2 x i32], ptr %.loc16_39.2.v, i32 0, i64 1, !dbg !32 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @A.val.loc16_40, i64 8, i1 false), !dbg !33 +// CHECK:STDOUT: ret void, !dbg !33 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CAccess.A.Main(ptr %self) #0 !dbg !32 { +// CHECK:STDOUT: define i32 @_CAccess.A.Main(ptr %self) #0 !dbg !34 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc19_16.1.v = getelementptr inbounds nuw { [2 x i32] }, ptr %self, i32 0, i32 0, !dbg !37 -// CHECK:STDOUT: %.loc19_20.2.array.index = getelementptr inbounds [2 x i32], ptr %.loc19_16.1.v, i32 0, i32 0, !dbg !37 -// CHECK:STDOUT: %.loc19_20.3 = load i32, ptr %.loc19_20.2.array.index, align 4, !dbg !37 -// CHECK:STDOUT: ret i32 %.loc19_20.3, !dbg !38 +// CHECK:STDOUT: %.loc19_16.1.v = getelementptr inbounds nuw { [2 x i32] }, ptr %self, i32 0, i32 0, !dbg !39 +// CHECK:STDOUT: %.loc19_20.2.array.index = getelementptr inbounds [2 x i32], ptr %.loc19_16.1.v, i32 0, i32 0, !dbg !39 +// CHECK:STDOUT: %.loc19_20.3 = load i32, ptr %.loc19_20.2.array.index, align 4, !dbg !39 +// CHECK:STDOUT: ret i32 %.loc19_20.3, !dbg !40 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CUse.A.Main(ptr %self) #0 !dbg !40 { +// CHECK:STDOUT: define i32 @_CUse.A.Main(ptr %self) #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc23_9.v = getelementptr inbounds nuw { [2 x i32] }, ptr %self, i32 0, i32 0, !dbg !45 -// CHECK:STDOUT: %.loc23_13.array.index = getelementptr inbounds [2 x i32], ptr %.loc23_9.v, i32 0, i32 0, !dbg !45 -// CHECK:STDOUT: store i32 1, ptr %.loc23_13.array.index, align 4, !dbg !45 -// CHECK:STDOUT: %.loc24_16.v = getelementptr inbounds nuw { [2 x i32] }, ptr %self, i32 0, i32 0, !dbg !46 -// CHECK:STDOUT: %.loc24_20.1.array.index = getelementptr inbounds [2 x i32], ptr %.loc24_16.v, i32 0, i32 1, !dbg !46 -// CHECK:STDOUT: %.loc24_20.2 = load i32, ptr %.loc24_20.1.array.index, align 4, !dbg !46 -// CHECK:STDOUT: ret i32 %.loc24_20.2, !dbg !47 +// CHECK:STDOUT: %.loc23_9.v = getelementptr inbounds nuw { [2 x i32] }, ptr %self, i32 0, i32 0, !dbg !47 +// CHECK:STDOUT: %.loc23_13.array.index = getelementptr inbounds [2 x i32], ptr %.loc23_9.v, i32 0, i32 0, !dbg !47 +// CHECK:STDOUT: store i32 1, ptr %.loc23_13.array.index, align 4, !dbg !47 +// CHECK:STDOUT: %.loc24_16.v = getelementptr inbounds nuw { [2 x i32] }, ptr %self, i32 0, i32 0, !dbg !48 +// CHECK:STDOUT: %.loc24_20.1.array.index = getelementptr inbounds [2 x i32], ptr %.loc24_16.v, i32 0, i32 1, !dbg !48 +// CHECK:STDOUT: %.loc24_20.2 = load i32, ptr %.loc24_20.1.array.index, align 4, !dbg !48 +// CHECK:STDOUT: ret i32 %.loc24_20.2, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -68,32 +68,32 @@ class A { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!19} +// CHECK:STDOUT: !llvm.dbg.cu = !{!21} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !18 = !DIFile(filename: "field.carbon", directory: "") -// CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !22 = !{!21} -// CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !24 = !{!20, !21} +// CHECK:STDOUT: !20 = !DIFile(filename: "field.carbon", directory: "") +// CHECK:STDOUT: !21 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !20, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !22 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{!23} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Init", linkageName: "_CInit.A.Main", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !29 = !DILocation(line: 16, column: 27, scope: !26) -// CHECK:STDOUT: !30 = !DILocation(line: 16, column: 33, scope: !26) -// CHECK:STDOUT: !31 = !DILocation(line: 16, column: 20, scope: !26) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Access", linkageName: "_CAccess.A.Main", scope: null, file: !18, line: 18, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) -// CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !21) -// CHECK:STDOUT: !37 = !DILocation(line: 19, column: 12, scope: !32) -// CHECK:STDOUT: !38 = !DILocation(line: 19, column: 5, scope: !32) -// CHECK:STDOUT: !39 = !{!33} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.A.Main", scope: null, file: !18, line: 22, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) -// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !21) -// CHECK:STDOUT: !45 = !DILocation(line: 23, column: 5, scope: !40) -// CHECK:STDOUT: !46 = !DILocation(line: 24, column: 12, scope: !40) -// CHECK:STDOUT: !47 = !DILocation(line: 24, column: 5, scope: !40) -// CHECK:STDOUT: !48 = !{!41} +// CHECK:STDOUT: !26 = !{!22, !23} +// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Init", linkageName: "_CInit.A.Main", scope: null, file: !20, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !31 = !DILocation(line: 16, column: 27, scope: !28) +// CHECK:STDOUT: !32 = !DILocation(line: 16, column: 33, scope: !28) +// CHECK:STDOUT: !33 = !DILocation(line: 16, column: 20, scope: !28) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Access", linkageName: "_CAccess.A.Main", scope: null, file: !20, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !41) +// CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !34, type: !23) +// CHECK:STDOUT: !39 = !DILocation(line: 19, column: 12, scope: !34) +// CHECK:STDOUT: !40 = !DILocation(line: 19, column: 5, scope: !34) +// CHECK:STDOUT: !41 = !{!35} +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.A.Main", scope: null, file: !20, line: 22, type: !27, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !50) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !23) +// CHECK:STDOUT: !47 = !DILocation(line: 23, column: 5, scope: !42) +// CHECK:STDOUT: !48 = !DILocation(line: 24, column: 12, scope: !42) +// CHECK:STDOUT: !49 = !DILocation(line: 24, column: 5, scope: !42) +// CHECK:STDOUT: !50 = !{!43} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/function_param.carbon b/toolchain/lower/testdata/array/function_param.carbon index 486db767dee8..fb9686633c28 100644 --- a/toolchain/lower/testdata/array/function_param.carbon +++ b/toolchain/lower/testdata/array/function_param.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -26,49 +26,49 @@ fn G() -> i32 { // CHECK:STDOUT: @array.loc18_20.15 = internal constant [3 x i32] [i32 1, i32 2, i32 3] // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CF.Main(ptr %arr, i32 %i) #0 !dbg !30 { +// CHECK:STDOUT: define i32 @_CF.Main(ptr %arr, i32 %i) #0 !dbg !32 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14_15.2.array.index = getelementptr inbounds [3 x i32], ptr %arr, i32 0, i32 %i, !dbg !37 -// CHECK:STDOUT: %.loc14_15.3 = load i32, ptr %.loc14_15.2.array.index, align 4, !dbg !37 -// CHECK:STDOUT: ret i32 %.loc14_15.3, !dbg !39 +// CHECK:STDOUT: %.loc14_15.2.array.index = getelementptr inbounds [3 x i32], ptr %arr, i32 0, i32 %i, !dbg !39 +// CHECK:STDOUT: %.loc14_15.3 = load i32, ptr %.loc14_15.2.array.index, align 4, !dbg !39 +// CHECK:STDOUT: ret i32 %.loc14_15.3, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CG.Main() #0 !dbg !41 { +// CHECK:STDOUT: define i32 @_CG.Main() #0 !dbg !43 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_20.3.temp = alloca [3 x i32], align 4, !dbg !44 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_20.3.temp), !dbg !44 -// CHECK:STDOUT: %.loc18_20.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 0, !dbg !44 -// CHECK:STDOUT: %.loc18_20.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 1, !dbg !44 -// CHECK:STDOUT: %.loc18_20.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 2, !dbg !44 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr @array.loc18_20.15, i32 1), !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr @array), !dbg !44 -// CHECK:STDOUT: ret i32 %F.call, !dbg !46 +// CHECK:STDOUT: %.loc18_20.3.temp = alloca [3 x i32], align 4, !dbg !46 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_20.3.temp), !dbg !46 +// CHECK:STDOUT: %.loc18_20.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 0, !dbg !46 +// CHECK:STDOUT: %.loc18_20.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 1, !dbg !46 +// CHECK:STDOUT: %.loc18_20.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 2, !dbg !46 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr @array.loc18_20.15, i32 1), !dbg !47 +// CHECK:STDOUT: call void @"_CSelfDestruct.b3a0adb9db7bb49e:core.Destroy.Core"(ptr @array), !dbg !46 +// CHECK:STDOUT: ret i32 %F.call, !dbg !48 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !47 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !49 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !51 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b3a0adb9db7bb49e:core.Destroy.Core"(ptr %self) #0 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_20.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc18_20.1.array.index), !dbg !53 -// CHECK:STDOUT: %.loc18_20.2.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 1, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc18_20.2.array.index), !dbg !53 -// CHECK:STDOUT: %.loc18_20.3.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 0, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc18_20.3.array.index), !dbg !53 -// CHECK:STDOUT: ret void, !dbg !53 +// CHECK:STDOUT: %.loc18_20.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !55 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc18_20.1.array.index), !dbg !55 +// CHECK:STDOUT: %.loc18_20.2.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 1, !dbg !55 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc18_20.2.array.index), !dbg !55 +// CHECK:STDOUT: %.loc18_20.3.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 0, !dbg !55 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc18_20.3.array.index), !dbg !55 +// CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b3a0adb9db7bb49e:core.Destroy.Core"(ptr %self) #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self), !dbg !57 -// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b3a0adb9db7bb49e:core.Destroy.Core"(ptr %self), !dbg !59 +// CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -77,43 +77,43 @@ fn G() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!19} +// CHECK:STDOUT: !llvm.dbg.cu = !{!21} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !18 = !DIFile(filename: "function_param.carbon", directory: "") -// CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !22 = !{!20, !21, !20} -// CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !24 = !{!20} +// CHECK:STDOUT: !20 = !DIFile(filename: "function_param.carbon", directory: "") +// CHECK:STDOUT: !21 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !20, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !22 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{!22, !23, !22} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} +// CHECK:STDOUT: !26 = !{!22} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !21} +// CHECK:STDOUT: !28 = !{null, !22} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 13, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !40) -// CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !30, type: !21) -// CHECK:STDOUT: !32 = !DILocalVariable(arg: 2, scope: !30, type: !20) -// CHECK:STDOUT: !37 = !DILocation(line: 14, column: 10, scope: !30) -// CHECK:STDOUT: !39 = !DILocation(line: 14, column: 3, scope: !30) -// CHECK:STDOUT: !40 = !{!31, !32} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !18, line: 17, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !44 = !DILocation(line: 18, column: 12, scope: !41) -// CHECK:STDOUT: !45 = !DILocation(line: 18, column: 10, scope: !41) -// CHECK:STDOUT: !46 = !DILocation(line: 18, column: 3, scope: !41) -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !50) -// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !20) -// CHECK:STDOUT: !49 = !DILocation(line: 18, column: 12, scope: !47) -// CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !18, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !54) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !21) -// CHECK:STDOUT: !53 = !DILocation(line: 18, column: 12, scope: !51) -// CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !18, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !58) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !21) -// CHECK:STDOUT: !57 = !DILocation(line: 18, column: 12, scope: !55) -// CHECK:STDOUT: !58 = !{!56} +// CHECK:STDOUT: !30 = !{null, !23} +// CHECK:STDOUT: !31 = !DISubroutineType(types: !30) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !20, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !42) +// CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !23) +// CHECK:STDOUT: !34 = !DILocalVariable(arg: 2, scope: !32, type: !22) +// CHECK:STDOUT: !39 = !DILocation(line: 14, column: 10, scope: !32) +// CHECK:STDOUT: !41 = !DILocation(line: 14, column: 3, scope: !32) +// CHECK:STDOUT: !42 = !{!33, !34} +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !20, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !46 = !DILocation(line: 18, column: 12, scope: !43) +// CHECK:STDOUT: !47 = !DILocation(line: 18, column: 10, scope: !43) +// CHECK:STDOUT: !48 = !DILocation(line: 18, column: 3, scope: !43) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !20, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !52) +// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !22) +// CHECK:STDOUT: !51 = !DILocation(line: 18, column: 12, scope: !49) +// CHECK:STDOUT: !52 = !{!50} +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b3a0adb9db7bb49e:core.Destroy.Core", scope: null, file: !20, line: 18, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !56) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !23) +// CHECK:STDOUT: !55 = !DILocation(line: 18, column: 12, scope: !53) +// CHECK:STDOUT: !56 = !{!54} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b3a0adb9db7bb49e:core.Destroy.Core", scope: null, file: !20, line: 18, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !60) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !23) +// CHECK:STDOUT: !59 = !DILocation(line: 18, column: 12, scope: !57) +// CHECK:STDOUT: !60 = !{!58} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/global.carbon b/toolchain/lower/testdata/array/global.carbon index da57f15847b8..4944487c6197 100644 --- a/toolchain/lower/testdata/array/global.carbon +++ b/toolchain/lower/testdata/array/global.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -28,16 +28,16 @@ fn Get() -> ref array(i32, 4) { // CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }] // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CGet.Main() #0 !dbg !24 { +// CHECK:STDOUT: define ptr @_CGet.Main() #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr @_Ca.Main, !dbg !27 +// CHECK:STDOUT: ret ptr @_Ca.Main, !dbg !29 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !30 { +// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !32 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 @_Ca.Main, ptr align 4 @array.loc3_1, i64 16, i1 false), !dbg !32 -// CHECK:STDOUT: ret void, !dbg !33 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 @_Ca.Main, ptr align 4 @array.loc3_1, i64 16, i1 false), !dbg !34 +// CHECK:STDOUT: ret void, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -46,21 +46,21 @@ fn Get() -> ref array(i32, 4) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!19} +// CHECK:STDOUT: !llvm.dbg.cu = !{!21} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !18 = !DIFile(filename: "global_array_reference.carbon", directory: "") -// CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !22 = !{!21} -// CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Main", scope: null, file: !18, line: 5, type: !23, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !27 = !DILocation(line: 6, column: 3, scope: !24) -// CHECK:STDOUT: !28 = !{null} -// CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !18, type: !29, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !32 = !DILocation(line: 3, column: 1, scope: !30) -// CHECK:STDOUT: !33 = !DILocation(line: 0, scope: !30) +// CHECK:STDOUT: !20 = !DIFile(filename: "global_array_reference.carbon", directory: "") +// CHECK:STDOUT: !21 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !20, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{!23} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Main", scope: null, file: !20, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !29 = !DILocation(line: 6, column: 3, scope: !26) +// CHECK:STDOUT: !30 = !{null} +// CHECK:STDOUT: !31 = !DISubroutineType(types: !30) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !20, type: !31, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !34 = !DILocation(line: 3, column: 1, scope: !32) +// CHECK:STDOUT: !35 = !DILocation(line: 0, scope: !32) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/iterate.carbon b/toolchain/lower/testdata/array/iterate.carbon index 5f950ad2c436..5ad01553440a 100644 --- a/toolchain/lower/testdata/array/iterate.carbon +++ b/toolchain/lower/testdata/array/iterate.carbon @@ -41,14 +41,14 @@ fn F() { // CHECK:STDOUT: %.loc16_43.13.array.index = getelementptr inbounds [6 x i32], ptr %.loc16_43.3.temp, i32 0, i64 3, !dbg !15 // CHECK:STDOUT: %.loc16_43.16.array.index = getelementptr inbounds [6 x i32], ptr %.loc16_43.3.temp, i32 0, i64 4, !dbg !15 // CHECK:STDOUT: %.loc16_43.19.array.index = getelementptr inbounds [6 x i32], ptr %.loc16_43.3.temp, i32 0, i64 5, !dbg !15 -// CHECK:STDOUT: %array_type.as.Iterate.impl.NewCursor.call = call i32 @"_CNewCursor.e163a239f9fa927c:Iterate.Core.64c6854216281bef"(ptr @array.loc16_43.24), !dbg !20 +// CHECK:STDOUT: %Array.as.Iterate.impl.NewCursor.call = call i32 @"_CNewCursor.Array.e6a7e802f5bda6f1.Core:Iterate.Core.64c6854216281bef"(ptr @array.loc16_43.24), !dbg !20 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var), !dbg !20 -// CHECK:STDOUT: store i32 %array_type.as.Iterate.impl.NewCursor.call, ptr %var, align 4, !dbg !20 +// CHECK:STDOUT: store i32 %Array.as.Iterate.impl.NewCursor.call, ptr %var, align 4, !dbg !20 // CHECK:STDOUT: br label %for.next, !dbg !20 // CHECK:STDOUT: // CHECK:STDOUT: for.next: ; preds = %for.body, %entry // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_19.5.temp), !dbg !20 -// CHECK:STDOUT: call void @"_CNext.e163a239f9fa927c:Iterate.Core.64c6854216281bef"(ptr %.loc17_19.5.temp, ptr @array.loc16_43.24, ptr %var), !dbg !20 +// CHECK:STDOUT: call void @"_CNext.Array.e6a7e802f5bda6f1.Core:Iterate.Core.64c6854216281bef"(ptr %.loc17_19.5.temp, ptr @array.loc16_43.24, ptr %var), !dbg !20 // CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.fc4496a6c25d418b(ptr %.loc17_19.5.temp), !dbg !20 // CHECK:STDOUT: br i1 %Optional.HasValue.call, label %for.body, label %for.done, !dbg !20 // CHECK:STDOUT: @@ -61,7 +61,7 @@ fn F() { // CHECK:STDOUT: for.done: ; preds = %for.next // CHECK:STDOUT: call void @"_CSelfDestruct.a8a4e50b707d8bfe:core.Destroy.Core"(ptr %.loc17_19.5.temp), !dbg !20 // CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %var), !dbg !20 -// CHECK:STDOUT: call void @"_CSelfDestruct.1366a4d5330239bd:core.Destroy.Core"(ptr @array), !dbg !15 +// CHECK:STDOUT: call void @"_CSelfDestruct.136effa1f54297dd:core.Destroy.Core"(ptr @array), !dbg !15 // CHECK:STDOUT: ret void, !dbg !30 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -133,7 +133,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.1366a4d5330239bd:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.136effa1f54297dd:core.Destroy.Core"(ptr %self) #0 !dbg !67 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc16_43.1.array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i64 5, !dbg !69 // CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_43.1.array.index), !dbg !69 @@ -151,9 +151,9 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1366a4d5330239bd:core.Destroy.Core"(ptr %self) #0 !dbg !71 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.136effa1f54297dd:core.Destroy.Core"(ptr %self) #0 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.1366a4d5330239bd:core.Destroy.Core"(ptr %self), !dbg !73 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.136effa1f54297dd:core.Destroy.Core"(ptr %self), !dbg !73 // CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -161,12 +161,12 @@ fn F() { // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CNewCursor.e163a239f9fa927c:Iterate.Core.64c6854216281bef"(ptr %self) #0 !dbg !76 { +// CHECK:STDOUT: define linkonce_odr i32 @"_CNewCursor.Array.e6a7e802f5bda6f1.Core:Iterate.Core.64c6854216281bef"(ptr %self) #0 !dbg !76 { // CHECK:STDOUT: ret i32 0, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNext.e163a239f9fa927c:Iterate.Core.64c6854216281bef"(ptr sret(<{ i32, i1 }>) %return, ptr %self, ptr %cursor) #0 !dbg !83 { +// CHECK:STDOUT: define linkonce_odr void @"_CNext.Array.e6a7e802f5bda6f1.Core:Iterate.Core.64c6854216281bef"(ptr sret(<{ i32, i1 }>) %return, ptr %self, ptr %cursor) #0 !dbg !83 { // CHECK:STDOUT: %1 = load i32, ptr %cursor, align 4, !dbg !91 // CHECK:STDOUT: %2 = icmp slt i32 %1, 6, !dbg !91 // CHECK:STDOUT: br i1 %2, label %3, label %7, !dbg !92 @@ -337,20 +337,20 @@ fn F() { // CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !11) // CHECK:STDOUT: !65 = !DILocation(line: 17, column: 7, scope: !63) // CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.1366a4d5330239bd:core.Destroy.Core", scope: null, file: !4, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.136effa1f54297dd:core.Destroy.Core", scope: null, file: !4, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !11) // CHECK:STDOUT: !69 = !DILocation(line: 16, column: 26, scope: !67) // CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1366a4d5330239bd:core.Destroy.Core", scope: null, file: !4, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.136effa1f54297dd:core.Destroy.Core", scope: null, file: !4, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !11) // CHECK:STDOUT: !73 = !DILocation(line: 16, column: 26, scope: !71) // CHECK:STDOUT: !74 = !{!72} // CHECK:STDOUT: !75 = !DIFile(filename: "{{.*}}/prelude/iterate.carbon", directory: "") -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.e163a239f9fa927c:Iterate.Core.64c6854216281bef", scope: null, file: !75, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !82) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.Array.e6a7e802f5bda6f1.Core:Iterate.Core.64c6854216281bef", scope: null, file: !75, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !82) // CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !11) // CHECK:STDOUT: !81 = !DILocation(line: 23, column: 38, scope: !76) // CHECK:STDOUT: !82 = !{!77} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.e163a239f9fa927c:Iterate.Core.64c6854216281bef", scope: null, file: !75, line: 24, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !107) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.Array.e6a7e802f5bda6f1.Core:Iterate.Core.64c6854216281bef", scope: null, file: !75, line: 24, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !107) // CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !11) // CHECK:STDOUT: !85 = !DILocalVariable(arg: 2, scope: !83, type: !11) // CHECK:STDOUT: !91 = !DILocation(line: 25, column: 9, scope: !83) diff --git a/toolchain/lower/testdata/array/layout.carbon b/toolchain/lower/testdata/array/layout.carbon index e566c375593d..a9001e655c44 100644 --- a/toolchain/lower/testdata/array/layout.carbon +++ b/toolchain/lower/testdata/array/layout.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -37,69 +37,69 @@ var c: array(Core.Int(257), 5) = (1, 2, 3, 4, 5); // CHECK:STDOUT: declare void @_CCheck.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest.Main() #0 !dbg !28 { +// CHECK:STDOUT: define void @_CTest.Main() #0 !dbg !30 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %v.var = alloca [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], align 8, !dbg !29 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !29 -// CHECK:STDOUT: %.loc10_13.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %v.var, i32 0, i32 0, !dbg !31 -// CHECK:STDOUT: %.loc10_14.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc10_13.array.index, i32 0, i32 1, !dbg !31 -// CHECK:STDOUT: call void @_CCheck.Main(ptr %.loc10_14.b), !dbg !33 -// CHECK:STDOUT: %.loc11_13.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %v.var, i32 0, i32 1, !dbg !34 -// CHECK:STDOUT: %.loc11_14.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc11_13.array.index, i32 0, i32 1, !dbg !34 -// CHECK:STDOUT: call void @_CCheck.Main(ptr %.loc11_14.b), !dbg !36 -// CHECK:STDOUT: %.loc12_13.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %v.var, i32 0, i32 2, !dbg !37 -// CHECK:STDOUT: %.loc12_14.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc12_13.array.index, i32 0, i32 1, !dbg !37 -// CHECK:STDOUT: call void @_CCheck.Main(ptr %.loc12_14.b), !dbg !39 -// CHECK:STDOUT: call void @"_CSelfDestruct.9e05708f03266b13:core.Destroy.Core"(ptr %v.var), !dbg !29 -// CHECK:STDOUT: ret void, !dbg !40 +// CHECK:STDOUT: %v.var = alloca [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], align 8, !dbg !31 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !31 +// CHECK:STDOUT: %.loc10_13.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %v.var, i32 0, i32 0, !dbg !33 +// CHECK:STDOUT: %.loc10_14.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc10_13.array.index, i32 0, i32 1, !dbg !33 +// CHECK:STDOUT: call void @_CCheck.Main(ptr %.loc10_14.b), !dbg !35 +// CHECK:STDOUT: %.loc11_13.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %v.var, i32 0, i32 1, !dbg !36 +// CHECK:STDOUT: %.loc11_14.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc11_13.array.index, i32 0, i32 1, !dbg !36 +// CHECK:STDOUT: call void @_CCheck.Main(ptr %.loc11_14.b), !dbg !38 +// CHECK:STDOUT: %.loc12_13.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %v.var, i32 0, i32 2, !dbg !39 +// CHECK:STDOUT: %.loc12_14.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc12_13.array.index, i32 0, i32 1, !dbg !39 +// CHECK:STDOUT: call void @_CCheck.Main(ptr %.loc12_14.b), !dbg !41 +// CHECK:STDOUT: call void @"_CSelfDestruct.2bf9274c89d5ec9f:core.Destroy.Core"(ptr %v.var), !dbg !31 +// CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %self) #0 !dbg !43 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !43 +// CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !47 +// CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %self) #0 !dbg !51 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc9_3.1.b), !dbg !51 -// CHECK:STDOUT: %.loc9_3.2.a = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !51 -// CHECK:STDOUT: ret void, !dbg !51 +// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !53 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc9_3.1.b), !dbg !53 +// CHECK:STDOUT: %.loc9_3.2.a = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !53 +// CHECK:STDOUT: call void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !53 +// CHECK:STDOUT: ret void, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %self) #0 !dbg !53 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %self) #0 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %self), !dbg !55 -// CHECK:STDOUT: ret void, !dbg !55 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %self), !dbg !57 +// CHECK:STDOUT: ret void, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.9e05708f03266b13:core.Destroy.Core"(ptr %self) #0 !dbg !57 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2bf9274c89d5ec9f:core.Destroy.Core"(ptr %self) #0 !dbg !59 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_3.1.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %self, i32 0, i64 2, !dbg !59 -// CHECK:STDOUT: call void @"_CSelfDestruct.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %.loc9_3.1.array.index), !dbg !59 -// CHECK:STDOUT: %.loc9_3.2.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %self, i32 0, i64 1, !dbg !59 -// CHECK:STDOUT: call void @"_CSelfDestruct.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %.loc9_3.2.array.index), !dbg !59 -// CHECK:STDOUT: %.loc9_3.3.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %self, i32 0, i64 0, !dbg !59 -// CHECK:STDOUT: call void @"_CSelfDestruct.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %.loc9_3.3.array.index), !dbg !59 -// CHECK:STDOUT: ret void, !dbg !59 +// CHECK:STDOUT: %.loc9_3.1.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %self, i32 0, i64 2, !dbg !61 +// CHECK:STDOUT: call void @"_CSelfDestruct.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %.loc9_3.1.array.index), !dbg !61 +// CHECK:STDOUT: %.loc9_3.2.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %self, i32 0, i64 1, !dbg !61 +// CHECK:STDOUT: call void @"_CSelfDestruct.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %.loc9_3.2.array.index), !dbg !61 +// CHECK:STDOUT: %.loc9_3.3.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %self, i32 0, i64 0, !dbg !61 +// CHECK:STDOUT: call void @"_CSelfDestruct.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %.loc9_3.3.array.index), !dbg !61 +// CHECK:STDOUT: ret void, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9e05708f03266b13:core.Destroy.Core"(ptr %self) #0 !dbg !61 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2bf9274c89d5ec9f:core.Destroy.Core"(ptr %self) #0 !dbg !63 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.9e05708f03266b13:core.Destroy.Core"(ptr %self), !dbg !63 -// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.2bf9274c89d5ec9f:core.Destroy.Core"(ptr %self), !dbg !65 +// CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -108,54 +108,54 @@ var c: array(Core.Int(257), 5) = (1, 2, 3, 4, 5); // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!19} +// CHECK:STDOUT: !llvm.dbg.cu = !{!21} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !18 = !DIFile(filename: "element_tail_padding.carbon", directory: "") -// CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !22 = !{null, !21} -// CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !24 = !{null} +// CHECK:STDOUT: !20 = !DIFile(filename: "element_tail_padding.carbon", directory: "") +// CHECK:STDOUT: !21 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !20, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !22 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{null, !23} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} +// CHECK:STDOUT: !26 = !{null} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !18, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !29 = !DILocation(line: 9, column: 3, scope: !28) -// CHECK:STDOUT: !31 = !DILocation(line: 10, column: 10, scope: !28) -// CHECK:STDOUT: !33 = !DILocation(line: 10, column: 3, scope: !28) -// CHECK:STDOUT: !34 = !DILocation(line: 11, column: 10, scope: !28) -// CHECK:STDOUT: !36 = !DILocation(line: 11, column: 3, scope: !28) -// CHECK:STDOUT: !37 = !DILocation(line: 12, column: 10, scope: !28) -// CHECK:STDOUT: !39 = !DILocation(line: 12, column: 3, scope: !28) -// CHECK:STDOUT: !40 = !DILocation(line: 5, column: 1, scope: !28) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) -// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !21) -// CHECK:STDOUT: !43 = !DILocation(line: 9, column: 3, scope: !41) -// CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !20) -// CHECK:STDOUT: !47 = !DILocation(line: 9, column: 3, scope: !45) -// CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0bcbe81284b6bcb5:core.Destroy.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) -// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !21) -// CHECK:STDOUT: !51 = !DILocation(line: 9, column: 3, scope: !49) -// CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0bcbe81284b6bcb5:core.Destroy.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !21) -// CHECK:STDOUT: !55 = !DILocation(line: 9, column: 3, scope: !53) -// CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.9e05708f03266b13:core.Destroy.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !60) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !21) -// CHECK:STDOUT: !59 = !DILocation(line: 9, column: 3, scope: !57) -// CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9e05708f03266b13:core.Destroy.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !21) -// CHECK:STDOUT: !63 = !DILocation(line: 9, column: 3, scope: !61) -// CHECK:STDOUT: !64 = !{!62} +// CHECK:STDOUT: !28 = !{null, !22} +// CHECK:STDOUT: !29 = !DISubroutineType(types: !28) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !20, line: 5, type: !27, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !31 = !DILocation(line: 9, column: 3, scope: !30) +// CHECK:STDOUT: !33 = !DILocation(line: 10, column: 10, scope: !30) +// CHECK:STDOUT: !35 = !DILocation(line: 10, column: 3, scope: !30) +// CHECK:STDOUT: !36 = !DILocation(line: 11, column: 10, scope: !30) +// CHECK:STDOUT: !38 = !DILocation(line: 11, column: 3, scope: !30) +// CHECK:STDOUT: !39 = !DILocation(line: 12, column: 10, scope: !30) +// CHECK:STDOUT: !41 = !DILocation(line: 12, column: 3, scope: !30) +// CHECK:STDOUT: !42 = !DILocation(line: 5, column: 1, scope: !30) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !20, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !46) +// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !23) +// CHECK:STDOUT: !45 = !DILocation(line: 9, column: 3, scope: !43) +// CHECK:STDOUT: !46 = !{!44} +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !20, line: 9, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !50) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !22) +// CHECK:STDOUT: !49 = !DILocation(line: 9, column: 3, scope: !47) +// CHECK:STDOUT: !50 = !{!48} +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0bcbe81284b6bcb5:core.Destroy.Core", scope: null, file: !20, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !54) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !23) +// CHECK:STDOUT: !53 = !DILocation(line: 9, column: 3, scope: !51) +// CHECK:STDOUT: !54 = !{!52} +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0bcbe81284b6bcb5:core.Destroy.Core", scope: null, file: !20, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !58) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !23) +// CHECK:STDOUT: !57 = !DILocation(line: 9, column: 3, scope: !55) +// CHECK:STDOUT: !58 = !{!56} +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2bf9274c89d5ec9f:core.Destroy.Core", scope: null, file: !20, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !62) +// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !23) +// CHECK:STDOUT: !61 = !DILocation(line: 9, column: 3, scope: !59) +// CHECK:STDOUT: !62 = !{!60} +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2bf9274c89d5ec9f:core.Destroy.Core", scope: null, file: !20, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !66) +// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !23) +// CHECK:STDOUT: !65 = !DILocation(line: 9, column: 3, scope: !63) +// CHECK:STDOUT: !66 = !{!64} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'constant_with_padding.carbon' @@ -166,10 +166,10 @@ var c: array(Core.Int(257), 5) = (1, 2, 3, 4, 5); // CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }] // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !68 { +// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !70 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 32 @_Cc.Main, ptr align 32 @array.loc3_1, i64 320, i1 false), !dbg !70 -// CHECK:STDOUT: ret void, !dbg !71 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 32 @_Cc.Main, ptr align 32 @array.loc3_1, i64 320, i1 false), !dbg !72 +// CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -178,16 +178,16 @@ var c: array(Core.Int(257), 5) = (1, 2, 3, 4, 5); // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!66} +// CHECK:STDOUT: !llvm.dbg.cu = !{!68} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !24 = !{null} -// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !65 = !DIFile(filename: "constant_with_padding.carbon", directory: "") -// CHECK:STDOUT: !66 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !65, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !65, type: !25, spFlags: DISPFlagDefinition, unit: !66) -// CHECK:STDOUT: !70 = !DILocation(line: 3, column: 1, scope: !68) -// CHECK:STDOUT: !71 = !DILocation(line: 0, scope: !68) +// CHECK:STDOUT: !26 = !{null} +// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) +// CHECK:STDOUT: !67 = !DIFile(filename: "constant_with_padding.carbon", directory: "") +// CHECK:STDOUT: !68 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !67, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !67, type: !27, spFlags: DISPFlagDefinition, unit: !68) +// CHECK:STDOUT: !72 = !DILocation(line: 3, column: 1, scope: !70) +// CHECK:STDOUT: !73 = !DILocation(line: 0, scope: !70) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/cpp.carbon b/toolchain/lower/testdata/builtins/cpp.carbon index 6791cdddfd54..03d87f613f16 100644 --- a/toolchain/lower/testdata/builtins/cpp.carbon +++ b/toolchain/lower/testdata/builtins/cpp.carbon @@ -77,7 +77,7 @@ fn Test() { // CHECK:STDOUT: store ptr getelementptr inbounds ([4 x i32], ptr @array.loc25_52.18, i32 1), ptr %MakePointerPointer.call.init_list.end, align 8, !dbg !21 // CHECK:STDOUT: call void @_CTakePointerPointer.Main(ptr %.loc25_53.1.temp), !dbg !23 // CHECK:STDOUT: call void @"_CSelfDestruct.f2bbdd6ca1ad449b:core.Destroy.Core"(ptr %.loc25_53.1.temp), !dbg !21 -// CHECK:STDOUT: call void @"_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core"(ptr @array), !dbg !22 +// CHECK:STDOUT: call void @"_CSelfDestruct.d15a62aea0967f8e:core.Destroy.Core"(ptr @array), !dbg !22 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc26_47.1.temp), !dbg !24 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc26_46.3.temp), !dbg !25 // CHECK:STDOUT: %.loc26_46.4.array.index = getelementptr inbounds [4 x i32], ptr %.loc26_46.3.temp, i32 0, i64 0, !dbg !25 @@ -90,7 +90,7 @@ fn Test() { // CHECK:STDOUT: store i64 4, ptr %MakePointerSize.call.init_list.size, align 8, !dbg !24 // CHECK:STDOUT: call void @_CTakePointerSize.Main(ptr %.loc26_47.1.temp), !dbg !26 // CHECK:STDOUT: call void @"_CSelfDestruct.f6ab4fc1968c35c6:core.Destroy.Core"(ptr %.loc26_47.1.temp), !dbg !24 -// CHECK:STDOUT: call void @"_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core"(ptr @array), !dbg !25 +// CHECK:STDOUT: call void @"_CSelfDestruct.d15a62aea0967f8e:core.Destroy.Core"(ptr @array), !dbg !25 // CHECK:STDOUT: ret void, !dbg !27 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -107,7 +107,7 @@ fn Test() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core"(ptr %self) #0 !dbg !36 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d15a62aea0967f8e:core.Destroy.Core"(ptr %self) #0 !dbg !36 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc25_52.1.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 3, !dbg !38 // CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc25_52.1.array.index), !dbg !38 @@ -121,9 +121,9 @@ fn Test() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core"(ptr %self) #0 !dbg !40 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d15a62aea0967f8e:core.Destroy.Core"(ptr %self) #0 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core"(ptr %self), !dbg !42 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d15a62aea0967f8e:core.Destroy.Core"(ptr %self), !dbg !42 // CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -137,7 +137,7 @@ fn Test() { // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core", { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.d15a62aea0967f8e:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 3, 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } @@ -180,11 +180,11 @@ fn Test() { // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !6) // CHECK:STDOUT: !34 = !DILocation(line: 25, column: 41, scope: !32) // CHECK:STDOUT: !35 = !{!33} -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core", scope: null, file: !4, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d15a62aea0967f8e:core.Destroy.Core", scope: null, file: !4, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !8) // CHECK:STDOUT: !38 = !DILocation(line: 25, column: 41, scope: !36) // CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core", scope: null, file: !4, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !43) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d15a62aea0967f8e:core.Destroy.Core", scope: null, file: !4, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !43) // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !8) // CHECK:STDOUT: !42 = !DILocation(line: 25, column: 41, scope: !40) // CHECK:STDOUT: !43 = !{!41} diff --git a/toolchain/lower/testdata/builtins/float.carbon b/toolchain/lower/testdata/builtins/float.carbon index 80a0686c836d..f3350c330cda 100644 --- a/toolchain/lower/testdata/builtins/float.carbon +++ b/toolchain/lower/testdata/builtins/float.carbon @@ -84,305 +84,305 @@ fn TestF128(a: f128, b: f128) -> f128 { return F128(a, b); } // CHECK:STDOUT: source_filename = "basic.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define double @_CTestNegate.Main(double %a) #0 !dbg !39 { +// CHECK:STDOUT: define double @_CTestNegate.Main(double %a) #0 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Negate.call = fneg double %a, !dbg !45 -// CHECK:STDOUT: ret double %Negate.call, !dbg !46 +// CHECK:STDOUT: %Negate.call = fneg double %a, !dbg !47 +// CHECK:STDOUT: ret double %Negate.call, !dbg !48 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define double @_CTestAdd.Main(double %a, double %b) #0 !dbg !48 { +// CHECK:STDOUT: define double @_CTestAdd.Main(double %a, double %b) #0 !dbg !50 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Add.call = fadd double %a, %b, !dbg !57 -// CHECK:STDOUT: ret double %Add.call, !dbg !58 +// CHECK:STDOUT: %Add.call = fadd double %a, %b, !dbg !59 +// CHECK:STDOUT: ret double %Add.call, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define double @_CTestSub.Main(double %a, double %b) #0 !dbg !60 { +// CHECK:STDOUT: define double @_CTestSub.Main(double %a, double %b) #0 !dbg !62 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Sub.call = fsub double %a, %b, !dbg !69 -// CHECK:STDOUT: ret double %Sub.call, !dbg !70 +// CHECK:STDOUT: %Sub.call = fsub double %a, %b, !dbg !71 +// CHECK:STDOUT: ret double %Sub.call, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define double @_CTestMul.Main(double %a, double %b) #0 !dbg !72 { +// CHECK:STDOUT: define double @_CTestMul.Main(double %a, double %b) #0 !dbg !74 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Mul.call = fmul double %a, %b, !dbg !81 -// CHECK:STDOUT: ret double %Mul.call, !dbg !82 +// CHECK:STDOUT: %Mul.call = fmul double %a, %b, !dbg !83 +// CHECK:STDOUT: ret double %Mul.call, !dbg !84 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define double @_CTestDiv.Main(double %a, double %b) #0 !dbg !84 { +// CHECK:STDOUT: define double @_CTestDiv.Main(double %a, double %b) #0 !dbg !86 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Div.call = fdiv double %a, %b, !dbg !93 -// CHECK:STDOUT: ret double %Div.call, !dbg !94 +// CHECK:STDOUT: %Div.call = fdiv double %a, %b, !dbg !95 +// CHECK:STDOUT: ret double %Div.call, !dbg !96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestEq.Main(double %a, double %b) #0 !dbg !96 { +// CHECK:STDOUT: define i1 @_CTestEq.Main(double %a, double %b) #0 !dbg !98 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Eq.call = fcmp oeq double %a, %b, !dbg !105 -// CHECK:STDOUT: ret i1 %Eq.call, !dbg !106 +// CHECK:STDOUT: %Eq.call = fcmp oeq double %a, %b, !dbg !107 +// CHECK:STDOUT: ret i1 %Eq.call, !dbg !108 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestNeq.Main(double %a, double %b) #0 !dbg !108 { +// CHECK:STDOUT: define i1 @_CTestNeq.Main(double %a, double %b) #0 !dbg !110 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Neq.call = fcmp one double %a, %b, !dbg !117 -// CHECK:STDOUT: ret i1 %Neq.call, !dbg !118 +// CHECK:STDOUT: %Neq.call = fcmp one double %a, %b, !dbg !119 +// CHECK:STDOUT: ret i1 %Neq.call, !dbg !120 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestLess.Main(double %a, double %b) #0 !dbg !120 { +// CHECK:STDOUT: define i1 @_CTestLess.Main(double %a, double %b) #0 !dbg !122 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Less.call = fcmp olt double %a, %b, !dbg !129 -// CHECK:STDOUT: ret i1 %Less.call, !dbg !130 +// CHECK:STDOUT: %Less.call = fcmp olt double %a, %b, !dbg !131 +// CHECK:STDOUT: ret i1 %Less.call, !dbg !132 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestLessEq.Main(double %a, double %b) #0 !dbg !132 { +// CHECK:STDOUT: define i1 @_CTestLessEq.Main(double %a, double %b) #0 !dbg !134 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %LessEq.call = fcmp ole double %a, %b, !dbg !141 -// CHECK:STDOUT: ret i1 %LessEq.call, !dbg !142 +// CHECK:STDOUT: %LessEq.call = fcmp ole double %a, %b, !dbg !143 +// CHECK:STDOUT: ret i1 %LessEq.call, !dbg !144 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestGreater.Main(double %a, double %b) #0 !dbg !144 { +// CHECK:STDOUT: define i1 @_CTestGreater.Main(double %a, double %b) #0 !dbg !146 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Greater.call = fcmp ogt double %a, %b, !dbg !153 -// CHECK:STDOUT: ret i1 %Greater.call, !dbg !154 +// CHECK:STDOUT: %Greater.call = fcmp ogt double %a, %b, !dbg !155 +// CHECK:STDOUT: ret i1 %Greater.call, !dbg !156 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestGreaterEq.Main(double %a, double %b) #0 !dbg !156 { +// CHECK:STDOUT: define i1 @_CTestGreaterEq.Main(double %a, double %b) #0 !dbg !158 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %GreaterEq.call = fcmp oge double %a, %b, !dbg !165 -// CHECK:STDOUT: ret i1 %GreaterEq.call, !dbg !166 +// CHECK:STDOUT: %GreaterEq.call = fcmp oge double %a, %b, !dbg !167 +// CHECK:STDOUT: ret i1 %GreaterEq.call, !dbg !168 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "basic.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !35 = !{!34, !34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !{!34, !34, !34} +// CHECK:STDOUT: !34 = !DIFile(filename: "basic.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !37 = !{!36, !36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "TestNegate", linkageName: "_CTestNegate.Main", scope: null, file: !32, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !47) -// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !34) -// CHECK:STDOUT: !45 = !DILocation(line: 5, column: 39, scope: !39) -// CHECK:STDOUT: !46 = !DILocation(line: 5, column: 32, scope: !39) -// CHECK:STDOUT: !47 = !{!40} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !32, line: 8, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !59) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !34) -// CHECK:STDOUT: !50 = !DILocalVariable(arg: 2, scope: !48, type: !34) -// CHECK:STDOUT: !57 = !DILocation(line: 8, column: 44, scope: !48) -// CHECK:STDOUT: !58 = !DILocation(line: 8, column: 37, scope: !48) -// CHECK:STDOUT: !59 = !{!49, !50} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !32, line: 11, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !71) -// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !34) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 2, scope: !60, type: !34) -// CHECK:STDOUT: !69 = !DILocation(line: 11, column: 44, scope: !60) -// CHECK:STDOUT: !70 = !DILocation(line: 11, column: 37, scope: !60) -// CHECK:STDOUT: !71 = !{!61, !62} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !32, line: 14, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !83) -// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !34) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 2, scope: !72, type: !34) -// CHECK:STDOUT: !81 = !DILocation(line: 14, column: 44, scope: !72) -// CHECK:STDOUT: !82 = !DILocation(line: 14, column: 37, scope: !72) -// CHECK:STDOUT: !83 = !{!73, !74} -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !32, line: 17, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !95) -// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !34) -// CHECK:STDOUT: !86 = !DILocalVariable(arg: 2, scope: !84, type: !34) -// CHECK:STDOUT: !93 = !DILocation(line: 17, column: 44, scope: !84) -// CHECK:STDOUT: !94 = !DILocation(line: 17, column: 37, scope: !84) -// CHECK:STDOUT: !95 = !{!85, !86} -// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !32, line: 20, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !107) -// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !34) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 2, scope: !96, type: !34) -// CHECK:STDOUT: !105 = !DILocation(line: 20, column: 44, scope: !96) -// CHECK:STDOUT: !106 = !DILocation(line: 20, column: 37, scope: !96) -// CHECK:STDOUT: !107 = !{!97, !98} -// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !32, line: 23, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !119) -// CHECK:STDOUT: !109 = !DILocalVariable(arg: 1, scope: !108, type: !34) -// CHECK:STDOUT: !110 = !DILocalVariable(arg: 2, scope: !108, type: !34) -// CHECK:STDOUT: !117 = !DILocation(line: 23, column: 45, scope: !108) -// CHECK:STDOUT: !118 = !DILocation(line: 23, column: 38, scope: !108) -// CHECK:STDOUT: !119 = !{!109, !110} -// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "TestLess", linkageName: "_CTestLess.Main", scope: null, file: !32, line: 26, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !131) -// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !34) -// CHECK:STDOUT: !122 = !DILocalVariable(arg: 2, scope: !120, type: !34) -// CHECK:STDOUT: !129 = !DILocation(line: 26, column: 46, scope: !120) -// CHECK:STDOUT: !130 = !DILocation(line: 26, column: 39, scope: !120) -// CHECK:STDOUT: !131 = !{!121, !122} -// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "TestLessEq", linkageName: "_CTestLessEq.Main", scope: null, file: !32, line: 29, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !143) -// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !34) -// CHECK:STDOUT: !134 = !DILocalVariable(arg: 2, scope: !132, type: !34) -// CHECK:STDOUT: !141 = !DILocation(line: 29, column: 48, scope: !132) -// CHECK:STDOUT: !142 = !DILocation(line: 29, column: 41, scope: !132) -// CHECK:STDOUT: !143 = !{!133, !134} -// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "TestGreater", linkageName: "_CTestGreater.Main", scope: null, file: !32, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !155) -// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !34) -// CHECK:STDOUT: !146 = !DILocalVariable(arg: 2, scope: !144, type: !34) -// CHECK:STDOUT: !153 = !DILocation(line: 32, column: 49, scope: !144) -// CHECK:STDOUT: !154 = !DILocation(line: 32, column: 42, scope: !144) -// CHECK:STDOUT: !155 = !{!145, !146} -// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "TestGreaterEq", linkageName: "_CTestGreaterEq.Main", scope: null, file: !32, line: 35, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !167) -// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !34) -// CHECK:STDOUT: !158 = !DILocalVariable(arg: 2, scope: !156, type: !34) -// CHECK:STDOUT: !165 = !DILocation(line: 35, column: 51, scope: !156) -// CHECK:STDOUT: !166 = !DILocation(line: 35, column: 44, scope: !156) -// CHECK:STDOUT: !167 = !{!157, !158} +// CHECK:STDOUT: !39 = !{!36, !36, !36} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "TestNegate", linkageName: "_CTestNegate.Main", scope: null, file: !34, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !49) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !36) +// CHECK:STDOUT: !47 = !DILocation(line: 5, column: 39, scope: !41) +// CHECK:STDOUT: !48 = !DILocation(line: 5, column: 32, scope: !41) +// CHECK:STDOUT: !49 = !{!42} +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !34, line: 8, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !61) +// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !36) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 2, scope: !50, type: !36) +// CHECK:STDOUT: !59 = !DILocation(line: 8, column: 44, scope: !50) +// CHECK:STDOUT: !60 = !DILocation(line: 8, column: 37, scope: !50) +// CHECK:STDOUT: !61 = !{!51, !52} +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !34, line: 11, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !73) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !36) +// CHECK:STDOUT: !64 = !DILocalVariable(arg: 2, scope: !62, type: !36) +// CHECK:STDOUT: !71 = !DILocation(line: 11, column: 44, scope: !62) +// CHECK:STDOUT: !72 = !DILocation(line: 11, column: 37, scope: !62) +// CHECK:STDOUT: !73 = !{!63, !64} +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !34, line: 14, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !85) +// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !36) +// CHECK:STDOUT: !76 = !DILocalVariable(arg: 2, scope: !74, type: !36) +// CHECK:STDOUT: !83 = !DILocation(line: 14, column: 44, scope: !74) +// CHECK:STDOUT: !84 = !DILocation(line: 14, column: 37, scope: !74) +// CHECK:STDOUT: !85 = !{!75, !76} +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !34, line: 17, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !97) +// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !36) +// CHECK:STDOUT: !88 = !DILocalVariable(arg: 2, scope: !86, type: !36) +// CHECK:STDOUT: !95 = !DILocation(line: 17, column: 44, scope: !86) +// CHECK:STDOUT: !96 = !DILocation(line: 17, column: 37, scope: !86) +// CHECK:STDOUT: !97 = !{!87, !88} +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !34, line: 20, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !109) +// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !36) +// CHECK:STDOUT: !100 = !DILocalVariable(arg: 2, scope: !98, type: !36) +// CHECK:STDOUT: !107 = !DILocation(line: 20, column: 44, scope: !98) +// CHECK:STDOUT: !108 = !DILocation(line: 20, column: 37, scope: !98) +// CHECK:STDOUT: !109 = !{!99, !100} +// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !34, line: 23, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !121) +// CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !36) +// CHECK:STDOUT: !112 = !DILocalVariable(arg: 2, scope: !110, type: !36) +// CHECK:STDOUT: !119 = !DILocation(line: 23, column: 45, scope: !110) +// CHECK:STDOUT: !120 = !DILocation(line: 23, column: 38, scope: !110) +// CHECK:STDOUT: !121 = !{!111, !112} +// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "TestLess", linkageName: "_CTestLess.Main", scope: null, file: !34, line: 26, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !133) +// CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !122, type: !36) +// CHECK:STDOUT: !124 = !DILocalVariable(arg: 2, scope: !122, type: !36) +// CHECK:STDOUT: !131 = !DILocation(line: 26, column: 46, scope: !122) +// CHECK:STDOUT: !132 = !DILocation(line: 26, column: 39, scope: !122) +// CHECK:STDOUT: !133 = !{!123, !124} +// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "TestLessEq", linkageName: "_CTestLessEq.Main", scope: null, file: !34, line: 29, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !145) +// CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !134, type: !36) +// CHECK:STDOUT: !136 = !DILocalVariable(arg: 2, scope: !134, type: !36) +// CHECK:STDOUT: !143 = !DILocation(line: 29, column: 48, scope: !134) +// CHECK:STDOUT: !144 = !DILocation(line: 29, column: 41, scope: !134) +// CHECK:STDOUT: !145 = !{!135, !136} +// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "TestGreater", linkageName: "_CTestGreater.Main", scope: null, file: !34, line: 32, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !157) +// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !36) +// CHECK:STDOUT: !148 = !DILocalVariable(arg: 2, scope: !146, type: !36) +// CHECK:STDOUT: !155 = !DILocation(line: 32, column: 49, scope: !146) +// CHECK:STDOUT: !156 = !DILocation(line: 32, column: 42, scope: !146) +// CHECK:STDOUT: !157 = !{!147, !148} +// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "TestGreaterEq", linkageName: "_CTestGreaterEq.Main", scope: null, file: !34, line: 35, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !169) +// CHECK:STDOUT: !159 = !DILocalVariable(arg: 1, scope: !158, type: !36) +// CHECK:STDOUT: !160 = !DILocalVariable(arg: 2, scope: !158, type: !36) +// CHECK:STDOUT: !167 = !DILocation(line: 35, column: 51, scope: !158) +// CHECK:STDOUT: !168 = !DILocation(line: 35, column: 44, scope: !158) +// CHECK:STDOUT: !169 = !{!159, !160} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'compound_assign.carbon' // CHECK:STDOUT: source_filename = "compound_assign.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestAdd.Main(ptr %a, double %b) #0 !dbg !172 { +// CHECK:STDOUT: define void @_CTestAdd.Main(ptr %a, double %b) #0 !dbg !174 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Add.call = load double, ptr %a, align 8, !dbg !180 -// CHECK:STDOUT: %Add.call1 = fadd double %Add.call, %b, !dbg !180 -// CHECK:STDOUT: store double %Add.call1, ptr %a, align 8, !dbg !180 -// CHECK:STDOUT: ret void, !dbg !181 +// CHECK:STDOUT: %Add.call = load double, ptr %a, align 8, !dbg !182 +// CHECK:STDOUT: %Add.call1 = fadd double %Add.call, %b, !dbg !182 +// CHECK:STDOUT: store double %Add.call1, ptr %a, align 8, !dbg !182 +// CHECK:STDOUT: ret void, !dbg !183 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestSub.Main(ptr %a, double %b) #0 !dbg !183 { +// CHECK:STDOUT: define void @_CTestSub.Main(ptr %a, double %b) #0 !dbg !185 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Sub.call = load double, ptr %a, align 8, !dbg !191 -// CHECK:STDOUT: %Sub.call1 = fsub double %Sub.call, %b, !dbg !191 -// CHECK:STDOUT: store double %Sub.call1, ptr %a, align 8, !dbg !191 -// CHECK:STDOUT: ret void, !dbg !192 +// CHECK:STDOUT: %Sub.call = load double, ptr %a, align 8, !dbg !193 +// CHECK:STDOUT: %Sub.call1 = fsub double %Sub.call, %b, !dbg !193 +// CHECK:STDOUT: store double %Sub.call1, ptr %a, align 8, !dbg !193 +// CHECK:STDOUT: ret void, !dbg !194 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestMul.Main(ptr %a, double %b) #0 !dbg !194 { +// CHECK:STDOUT: define void @_CTestMul.Main(ptr %a, double %b) #0 !dbg !196 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Mul.call = load double, ptr %a, align 8, !dbg !202 -// CHECK:STDOUT: %Mul.call1 = fmul double %Mul.call, %b, !dbg !202 -// CHECK:STDOUT: store double %Mul.call1, ptr %a, align 8, !dbg !202 -// CHECK:STDOUT: ret void, !dbg !203 +// CHECK:STDOUT: %Mul.call = load double, ptr %a, align 8, !dbg !204 +// CHECK:STDOUT: %Mul.call1 = fmul double %Mul.call, %b, !dbg !204 +// CHECK:STDOUT: store double %Mul.call1, ptr %a, align 8, !dbg !204 +// CHECK:STDOUT: ret void, !dbg !205 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestDiv.Main(ptr %a, double %b) #0 !dbg !205 { +// CHECK:STDOUT: define void @_CTestDiv.Main(ptr %a, double %b) #0 !dbg !207 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Div.call = load double, ptr %a, align 8, !dbg !213 -// CHECK:STDOUT: %Div.call1 = fdiv double %Div.call, %b, !dbg !213 -// CHECK:STDOUT: store double %Div.call1, ptr %a, align 8, !dbg !213 -// CHECK:STDOUT: ret void, !dbg !214 +// CHECK:STDOUT: %Div.call = load double, ptr %a, align 8, !dbg !215 +// CHECK:STDOUT: %Div.call1 = fdiv double %Div.call, %b, !dbg !215 +// CHECK:STDOUT: store double %Div.call1, ptr %a, align 8, !dbg !215 +// CHECK:STDOUT: ret void, !dbg !216 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!169} +// CHECK:STDOUT: !llvm.dbg.cu = !{!171} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !168 = !DIFile(filename: "compound_assign.carbon", directory: "") -// CHECK:STDOUT: !169 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !168, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !170 = !{null, !34, !34} -// CHECK:STDOUT: !171 = !DISubroutineType(types: !170) -// CHECK:STDOUT: !172 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !168, line: 5, type: !171, spFlags: DISPFlagDefinition, unit: !169, retainedNodes: !182) -// CHECK:STDOUT: !173 = !DILocalVariable(arg: 1, scope: !172, type: !34) -// CHECK:STDOUT: !174 = !DILocalVariable(arg: 2, scope: !172, type: !34) -// CHECK:STDOUT: !180 = !DILocation(line: 5, column: 34, scope: !172) -// CHECK:STDOUT: !181 = !DILocation(line: 5, column: 1, scope: !172) -// CHECK:STDOUT: !182 = !{!173, !174} -// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !168, line: 8, type: !171, spFlags: DISPFlagDefinition, unit: !169, retainedNodes: !193) -// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !34) -// CHECK:STDOUT: !185 = !DILocalVariable(arg: 2, scope: !183, type: !34) -// CHECK:STDOUT: !191 = !DILocation(line: 8, column: 34, scope: !183) -// CHECK:STDOUT: !192 = !DILocation(line: 8, column: 1, scope: !183) -// CHECK:STDOUT: !193 = !{!184, !185} -// CHECK:STDOUT: !194 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !168, line: 11, type: !171, spFlags: DISPFlagDefinition, unit: !169, retainedNodes: !204) -// CHECK:STDOUT: !195 = !DILocalVariable(arg: 1, scope: !194, type: !34) -// CHECK:STDOUT: !196 = !DILocalVariable(arg: 2, scope: !194, type: !34) -// CHECK:STDOUT: !202 = !DILocation(line: 11, column: 34, scope: !194) -// CHECK:STDOUT: !203 = !DILocation(line: 11, column: 1, scope: !194) -// CHECK:STDOUT: !204 = !{!195, !196} -// CHECK:STDOUT: !205 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !168, line: 14, type: !171, spFlags: DISPFlagDefinition, unit: !169, retainedNodes: !215) -// CHECK:STDOUT: !206 = !DILocalVariable(arg: 1, scope: !205, type: !34) -// CHECK:STDOUT: !207 = !DILocalVariable(arg: 2, scope: !205, type: !34) -// CHECK:STDOUT: !213 = !DILocation(line: 14, column: 34, scope: !205) -// CHECK:STDOUT: !214 = !DILocation(line: 14, column: 1, scope: !205) -// CHECK:STDOUT: !215 = !{!206, !207} +// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !170 = !DIFile(filename: "compound_assign.carbon", directory: "") +// CHECK:STDOUT: !171 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !170, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !172 = !{null, !36, !36} +// CHECK:STDOUT: !173 = !DISubroutineType(types: !172) +// CHECK:STDOUT: !174 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !170, line: 5, type: !173, spFlags: DISPFlagDefinition, unit: !171, retainedNodes: !184) +// CHECK:STDOUT: !175 = !DILocalVariable(arg: 1, scope: !174, type: !36) +// CHECK:STDOUT: !176 = !DILocalVariable(arg: 2, scope: !174, type: !36) +// CHECK:STDOUT: !182 = !DILocation(line: 5, column: 34, scope: !174) +// CHECK:STDOUT: !183 = !DILocation(line: 5, column: 1, scope: !174) +// CHECK:STDOUT: !184 = !{!175, !176} +// CHECK:STDOUT: !185 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !170, line: 8, type: !173, spFlags: DISPFlagDefinition, unit: !171, retainedNodes: !195) +// CHECK:STDOUT: !186 = !DILocalVariable(arg: 1, scope: !185, type: !36) +// CHECK:STDOUT: !187 = !DILocalVariable(arg: 2, scope: !185, type: !36) +// CHECK:STDOUT: !193 = !DILocation(line: 8, column: 34, scope: !185) +// CHECK:STDOUT: !194 = !DILocation(line: 8, column: 1, scope: !185) +// CHECK:STDOUT: !195 = !{!186, !187} +// CHECK:STDOUT: !196 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !170, line: 11, type: !173, spFlags: DISPFlagDefinition, unit: !171, retainedNodes: !206) +// CHECK:STDOUT: !197 = !DILocalVariable(arg: 1, scope: !196, type: !36) +// CHECK:STDOUT: !198 = !DILocalVariable(arg: 2, scope: !196, type: !36) +// CHECK:STDOUT: !204 = !DILocation(line: 11, column: 34, scope: !196) +// CHECK:STDOUT: !205 = !DILocation(line: 11, column: 1, scope: !196) +// CHECK:STDOUT: !206 = !{!197, !198} +// CHECK:STDOUT: !207 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !170, line: 14, type: !173, spFlags: DISPFlagDefinition, unit: !171, retainedNodes: !217) +// CHECK:STDOUT: !208 = !DILocalVariable(arg: 1, scope: !207, type: !36) +// CHECK:STDOUT: !209 = !DILocalVariable(arg: 2, scope: !207, type: !36) +// CHECK:STDOUT: !215 = !DILocation(line: 14, column: 34, scope: !207) +// CHECK:STDOUT: !216 = !DILocation(line: 14, column: 1, scope: !207) +// CHECK:STDOUT: !217 = !{!208, !209} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'types.carbon' // CHECK:STDOUT: source_filename = "types.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define half @_CTestF16.Main(half %a, half %b) #0 !dbg !218 { +// CHECK:STDOUT: define half @_CTestF16.Main(half %a, half %b) #0 !dbg !220 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F16.call = fadd half %a, %b, !dbg !227 -// CHECK:STDOUT: ret half %F16.call, !dbg !228 +// CHECK:STDOUT: %F16.call = fadd half %a, %b, !dbg !229 +// CHECK:STDOUT: ret half %F16.call, !dbg !230 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define float @_CTestF32.Main(float %a, float %b) #0 !dbg !230 { +// CHECK:STDOUT: define float @_CTestF32.Main(float %a, float %b) #0 !dbg !232 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F32.call = fadd float %a, %b, !dbg !239 -// CHECK:STDOUT: ret float %F32.call, !dbg !240 +// CHECK:STDOUT: %F32.call = fadd float %a, %b, !dbg !241 +// CHECK:STDOUT: ret float %F32.call, !dbg !242 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define double @_CTestF64.Main(double %a, double %b) #0 !dbg !242 { +// CHECK:STDOUT: define double @_CTestF64.Main(double %a, double %b) #0 !dbg !244 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F64.call = fadd double %a, %b, !dbg !251 -// CHECK:STDOUT: ret double %F64.call, !dbg !252 +// CHECK:STDOUT: %F64.call = fadd double %a, %b, !dbg !253 +// CHECK:STDOUT: ret double %F64.call, !dbg !254 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define fp128 @_CTestF128.Main(fp128 %a, fp128 %b) #0 !dbg !254 { +// CHECK:STDOUT: define fp128 @_CTestF128.Main(fp128 %a, fp128 %b) #0 !dbg !256 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F128.call = fadd fp128 %a, %b, !dbg !263 -// CHECK:STDOUT: ret fp128 %F128.call, !dbg !264 +// CHECK:STDOUT: %F128.call = fadd fp128 %a, %b, !dbg !265 +// CHECK:STDOUT: ret fp128 %F128.call, !dbg !266 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!217} +// CHECK:STDOUT: !llvm.dbg.cu = !{!219} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !37 = !{!34, !34, !34} -// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !216 = !DIFile(filename: "types.carbon", directory: "") -// CHECK:STDOUT: !217 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !216, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !218 = distinct !DISubprogram(name: "TestF16", linkageName: "_CTestF16.Main", scope: null, file: !216, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !217, retainedNodes: !229) -// CHECK:STDOUT: !219 = !DILocalVariable(arg: 1, scope: !218, type: !34) -// CHECK:STDOUT: !220 = !DILocalVariable(arg: 2, scope: !218, type: !34) -// CHECK:STDOUT: !227 = !DILocation(line: 5, column: 44, scope: !218) -// CHECK:STDOUT: !228 = !DILocation(line: 5, column: 37, scope: !218) -// CHECK:STDOUT: !229 = !{!219, !220} -// CHECK:STDOUT: !230 = distinct !DISubprogram(name: "TestF32", linkageName: "_CTestF32.Main", scope: null, file: !216, line: 8, type: !38, spFlags: DISPFlagDefinition, unit: !217, retainedNodes: !241) -// CHECK:STDOUT: !231 = !DILocalVariable(arg: 1, scope: !230, type: !34) -// CHECK:STDOUT: !232 = !DILocalVariable(arg: 2, scope: !230, type: !34) -// CHECK:STDOUT: !239 = !DILocation(line: 8, column: 44, scope: !230) -// CHECK:STDOUT: !240 = !DILocation(line: 8, column: 37, scope: !230) -// CHECK:STDOUT: !241 = !{!231, !232} -// CHECK:STDOUT: !242 = distinct !DISubprogram(name: "TestF64", linkageName: "_CTestF64.Main", scope: null, file: !216, line: 11, type: !38, spFlags: DISPFlagDefinition, unit: !217, retainedNodes: !253) -// CHECK:STDOUT: !243 = !DILocalVariable(arg: 1, scope: !242, type: !34) -// CHECK:STDOUT: !244 = !DILocalVariable(arg: 2, scope: !242, type: !34) -// CHECK:STDOUT: !251 = !DILocation(line: 11, column: 44, scope: !242) -// CHECK:STDOUT: !252 = !DILocation(line: 11, column: 37, scope: !242) -// CHECK:STDOUT: !253 = !{!243, !244} -// CHECK:STDOUT: !254 = distinct !DISubprogram(name: "TestF128", linkageName: "_CTestF128.Main", scope: null, file: !216, line: 14, type: !38, spFlags: DISPFlagDefinition, unit: !217, retainedNodes: !265) -// CHECK:STDOUT: !255 = !DILocalVariable(arg: 1, scope: !254, type: !34) -// CHECK:STDOUT: !256 = !DILocalVariable(arg: 2, scope: !254, type: !34) -// CHECK:STDOUT: !263 = !DILocation(line: 14, column: 48, scope: !254) -// CHECK:STDOUT: !264 = !DILocation(line: 14, column: 41, scope: !254) -// CHECK:STDOUT: !265 = !{!255, !256} +// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !39 = !{!36, !36, !36} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !218 = !DIFile(filename: "types.carbon", directory: "") +// CHECK:STDOUT: !219 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !218, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !220 = distinct !DISubprogram(name: "TestF16", linkageName: "_CTestF16.Main", scope: null, file: !218, line: 5, type: !40, spFlags: DISPFlagDefinition, unit: !219, retainedNodes: !231) +// CHECK:STDOUT: !221 = !DILocalVariable(arg: 1, scope: !220, type: !36) +// CHECK:STDOUT: !222 = !DILocalVariable(arg: 2, scope: !220, type: !36) +// CHECK:STDOUT: !229 = !DILocation(line: 5, column: 44, scope: !220) +// CHECK:STDOUT: !230 = !DILocation(line: 5, column: 37, scope: !220) +// CHECK:STDOUT: !231 = !{!221, !222} +// CHECK:STDOUT: !232 = distinct !DISubprogram(name: "TestF32", linkageName: "_CTestF32.Main", scope: null, file: !218, line: 8, type: !40, spFlags: DISPFlagDefinition, unit: !219, retainedNodes: !243) +// CHECK:STDOUT: !233 = !DILocalVariable(arg: 1, scope: !232, type: !36) +// CHECK:STDOUT: !234 = !DILocalVariable(arg: 2, scope: !232, type: !36) +// CHECK:STDOUT: !241 = !DILocation(line: 8, column: 44, scope: !232) +// CHECK:STDOUT: !242 = !DILocation(line: 8, column: 37, scope: !232) +// CHECK:STDOUT: !243 = !{!233, !234} +// CHECK:STDOUT: !244 = distinct !DISubprogram(name: "TestF64", linkageName: "_CTestF64.Main", scope: null, file: !218, line: 11, type: !40, spFlags: DISPFlagDefinition, unit: !219, retainedNodes: !255) +// CHECK:STDOUT: !245 = !DILocalVariable(arg: 1, scope: !244, type: !36) +// CHECK:STDOUT: !246 = !DILocalVariable(arg: 2, scope: !244, type: !36) +// CHECK:STDOUT: !253 = !DILocation(line: 11, column: 44, scope: !244) +// CHECK:STDOUT: !254 = !DILocation(line: 11, column: 37, scope: !244) +// CHECK:STDOUT: !255 = !{!245, !246} +// CHECK:STDOUT: !256 = distinct !DISubprogram(name: "TestF128", linkageName: "_CTestF128.Main", scope: null, file: !218, line: 14, type: !40, spFlags: DISPFlagDefinition, unit: !219, retainedNodes: !267) +// CHECK:STDOUT: !257 = !DILocalVariable(arg: 1, scope: !256, type: !36) +// CHECK:STDOUT: !258 = !DILocalVariable(arg: 2, scope: !256, type: !36) +// CHECK:STDOUT: !265 = !DILocation(line: 14, column: 48, scope: !256) +// CHECK:STDOUT: !266 = !DILocation(line: 14, column: 41, scope: !256) +// CHECK:STDOUT: !267 = !{!257, !258} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/float_to_float.carbon b/toolchain/lower/testdata/builtins/float_to_float.carbon index ec2f5c6d33ba..039c526d6d60 100644 --- a/toolchain/lower/testdata/builtins/float_to_float.carbon +++ b/toolchain/lower/testdata/builtins/float_to_float.carbon @@ -27,51 +27,51 @@ fn TestConvertF16ToF128(a: f16) -> f128 { return ConvertF16ToF128(a); } // CHECK:STDOUT: source_filename = "float_to_float.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define double @_CTestConvertF32ToF64.Main(float %a) #0 !dbg !37 { +// CHECK:STDOUT: define double @_CTestConvertF32ToF64.Main(float %a) #0 !dbg !39 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertF32ToF64.call = fpext float %a to double, !dbg !43 -// CHECK:STDOUT: ret double %ConvertF32ToF64.call, !dbg !44 +// CHECK:STDOUT: %ConvertF32ToF64.call = fpext float %a to double, !dbg !45 +// CHECK:STDOUT: ret double %ConvertF32ToF64.call, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define float @_CTestConvertF64ToF32.Main(double %a) #0 !dbg !46 { +// CHECK:STDOUT: define float @_CTestConvertF64ToF32.Main(double %a) #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertF64ToF32.call = fptrunc double %a to float, !dbg !52 -// CHECK:STDOUT: ret float %ConvertF64ToF32.call, !dbg !53 +// CHECK:STDOUT: %ConvertF64ToF32.call = fptrunc double %a to float, !dbg !54 +// CHECK:STDOUT: ret float %ConvertF64ToF32.call, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define fp128 @_CTestConvertF16ToF128.Main(half %a) #0 !dbg !55 { +// CHECK:STDOUT: define fp128 @_CTestConvertF16ToF128.Main(half %a) #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertF16ToF128.call = fpext half %a to fp128, !dbg !61 -// CHECK:STDOUT: ret fp128 %ConvertF16ToF128.call, !dbg !62 +// CHECK:STDOUT: %ConvertF16ToF128.call = fpext half %a to fp128, !dbg !63 +// CHECK:STDOUT: ret fp128 %ConvertF16ToF128.call, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "float_to_float.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !35 = !{!34, !34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "TestConvertF32ToF64", linkageName: "_CTestConvertF32ToF64.Main", scope: null, file: !32, line: 4, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !45) -// CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !34) -// CHECK:STDOUT: !43 = !DILocation(line: 4, column: 48, scope: !37) -// CHECK:STDOUT: !44 = !DILocation(line: 4, column: 41, scope: !37) -// CHECK:STDOUT: !45 = !{!38} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "TestConvertF64ToF32", linkageName: "_CTestConvertF64ToF32.Main", scope: null, file: !32, line: 7, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !54) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !34) -// CHECK:STDOUT: !52 = !DILocation(line: 7, column: 48, scope: !46) -// CHECK:STDOUT: !53 = !DILocation(line: 7, column: 41, scope: !46) -// CHECK:STDOUT: !54 = !{!47} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "TestConvertF16ToF128", linkageName: "_CTestConvertF16ToF128.Main", scope: null, file: !32, line: 10, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !63) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !34) -// CHECK:STDOUT: !61 = !DILocation(line: 10, column: 50, scope: !55) -// CHECK:STDOUT: !62 = !DILocation(line: 10, column: 43, scope: !55) -// CHECK:STDOUT: !63 = !{!56} +// CHECK:STDOUT: !34 = !DIFile(filename: "float_to_float.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !37 = !{!36, !36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "TestConvertF32ToF64", linkageName: "_CTestConvertF32ToF64.Main", scope: null, file: !34, line: 4, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !47) +// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !36) +// CHECK:STDOUT: !45 = !DILocation(line: 4, column: 48, scope: !39) +// CHECK:STDOUT: !46 = !DILocation(line: 4, column: 41, scope: !39) +// CHECK:STDOUT: !47 = !{!40} +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "TestConvertF64ToF32", linkageName: "_CTestConvertF64ToF32.Main", scope: null, file: !34, line: 7, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !56) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !36) +// CHECK:STDOUT: !54 = !DILocation(line: 7, column: 48, scope: !48) +// CHECK:STDOUT: !55 = !DILocation(line: 7, column: 41, scope: !48) +// CHECK:STDOUT: !56 = !{!49} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "TestConvertF16ToF128", linkageName: "_CTestConvertF16ToF128.Main", scope: null, file: !34, line: 10, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !65) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !36) +// CHECK:STDOUT: !63 = !DILocation(line: 10, column: 50, scope: !57) +// CHECK:STDOUT: !64 = !DILocation(line: 10, column: 43, scope: !57) +// CHECK:STDOUT: !65 = !{!58} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/float_to_int.carbon b/toolchain/lower/testdata/builtins/float_to_int.carbon index 22511db9665d..b3eda70dfab7 100644 --- a/toolchain/lower/testdata/builtins/float_to_int.carbon +++ b/toolchain/lower/testdata/builtins/float_to_int.carbon @@ -36,97 +36,97 @@ fn TestConvertF128ToU64(a: f128) -> u64 { return ConvertF128ToU64(a); } // CHECK:STDOUT: source_filename = "float_to_int.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestConvertF32ToI32.Main(float %a) #0 !dbg !46 { +// CHECK:STDOUT: define i32 @_CTestConvertF32ToI32.Main(float %a) #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertF32ToI32.call = fptosi float %a to i32, !dbg !52 -// CHECK:STDOUT: ret i32 %ConvertF32ToI32.call, !dbg !53 +// CHECK:STDOUT: %ConvertF32ToI32.call = fptosi float %a to i32, !dbg !54 +// CHECK:STDOUT: ret i32 %ConvertF32ToI32.call, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestConvertF32ToU32.Main(float %a) #0 !dbg !55 { +// CHECK:STDOUT: define i32 @_CTestConvertF32ToU32.Main(float %a) #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertF32ToU32.call = fptoui float %a to i32, !dbg !61 -// CHECK:STDOUT: ret i32 %ConvertF32ToU32.call, !dbg !62 +// CHECK:STDOUT: %ConvertF32ToU32.call = fptoui float %a to i32, !dbg !63 +// CHECK:STDOUT: ret i32 %ConvertF32ToU32.call, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestConvertF64ToI32.Main(double %a) #0 !dbg !64 { +// CHECK:STDOUT: define i32 @_CTestConvertF64ToI32.Main(double %a) #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertF64ToI32.call = fptosi double %a to i32, !dbg !70 -// CHECK:STDOUT: ret i32 %ConvertF64ToI32.call, !dbg !71 +// CHECK:STDOUT: %ConvertF64ToI32.call = fptosi double %a to i32, !dbg !72 +// CHECK:STDOUT: ret i32 %ConvertF64ToI32.call, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestConvertF64ToU32.Main(double %a) #0 !dbg !73 { +// CHECK:STDOUT: define i32 @_CTestConvertF64ToU32.Main(double %a) #0 !dbg !75 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertF64ToU32.call = fptoui double %a to i32, !dbg !79 -// CHECK:STDOUT: ret i32 %ConvertF64ToU32.call, !dbg !80 +// CHECK:STDOUT: %ConvertF64ToU32.call = fptoui double %a to i32, !dbg !81 +// CHECK:STDOUT: ret i32 %ConvertF64ToU32.call, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestConvertF128ToI64.Main(fp128 %a) #0 !dbg !82 { +// CHECK:STDOUT: define i64 @_CTestConvertF128ToI64.Main(fp128 %a) #0 !dbg !84 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertF128ToI64.call = fptosi fp128 %a to i64, !dbg !88 -// CHECK:STDOUT: ret i64 %ConvertF128ToI64.call, !dbg !89 +// CHECK:STDOUT: %ConvertF128ToI64.call = fptosi fp128 %a to i64, !dbg !90 +// CHECK:STDOUT: ret i64 %ConvertF128ToI64.call, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestConvertF128ToU64.Main(fp128 %a) #0 !dbg !91 { +// CHECK:STDOUT: define i64 @_CTestConvertF128ToU64.Main(fp128 %a) #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertF128ToU64.call = fptoui fp128 %a to i64, !dbg !97 -// CHECK:STDOUT: ret i64 %ConvertF128ToU64.call, !dbg !98 +// CHECK:STDOUT: %ConvertF128ToU64.call = fptoui fp128 %a to i64, !dbg !99 +// CHECK:STDOUT: ret i64 %ConvertF128ToU64.call, !dbg !100 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !17 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !32 = !DIFile(filename: "float_to_int.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) -// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !38 = !{!34, !37} -// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{!35, !37} +// CHECK:STDOUT: !19 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !34 = !DIFile(filename: "float_to_int.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !38 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !40 = !{!36, !39} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = !{!36, !37} +// CHECK:STDOUT: !42 = !{!37, !39} // CHECK:STDOUT: !43 = !DISubroutineType(types: !42) -// CHECK:STDOUT: !44 = !{!17, !37} +// CHECK:STDOUT: !44 = !{!38, !39} // CHECK:STDOUT: !45 = !DISubroutineType(types: !44) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "TestConvertF32ToI32", linkageName: "_CTestConvertF32ToI32.Main", scope: null, file: !32, line: 4, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !54) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !37) -// CHECK:STDOUT: !52 = !DILocation(line: 4, column: 48, scope: !46) -// CHECK:STDOUT: !53 = !DILocation(line: 4, column: 41, scope: !46) -// CHECK:STDOUT: !54 = !{!47} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "TestConvertF32ToU32", linkageName: "_CTestConvertF32ToU32.Main", scope: null, file: !32, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !63) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !37) -// CHECK:STDOUT: !61 = !DILocation(line: 7, column: 48, scope: !55) -// CHECK:STDOUT: !62 = !DILocation(line: 7, column: 41, scope: !55) -// CHECK:STDOUT: !63 = !{!56} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "TestConvertF64ToI32", linkageName: "_CTestConvertF64ToI32.Main", scope: null, file: !32, line: 10, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !72) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !37) -// CHECK:STDOUT: !70 = !DILocation(line: 10, column: 48, scope: !64) -// CHECK:STDOUT: !71 = !DILocation(line: 10, column: 41, scope: !64) -// CHECK:STDOUT: !72 = !{!65} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "TestConvertF64ToU32", linkageName: "_CTestConvertF64ToU32.Main", scope: null, file: !32, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !81) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !37) -// CHECK:STDOUT: !79 = !DILocation(line: 13, column: 48, scope: !73) -// CHECK:STDOUT: !80 = !DILocation(line: 13, column: 41, scope: !73) -// CHECK:STDOUT: !81 = !{!74} -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "TestConvertF128ToI64", linkageName: "_CTestConvertF128ToI64.Main", scope: null, file: !32, line: 16, type: !43, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !90) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !37) -// CHECK:STDOUT: !88 = !DILocation(line: 16, column: 50, scope: !82) -// CHECK:STDOUT: !89 = !DILocation(line: 16, column: 43, scope: !82) -// CHECK:STDOUT: !90 = !{!83} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "TestConvertF128ToU64", linkageName: "_CTestConvertF128ToU64.Main", scope: null, file: !32, line: 19, type: !45, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !99) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !37) -// CHECK:STDOUT: !97 = !DILocation(line: 19, column: 50, scope: !91) -// CHECK:STDOUT: !98 = !DILocation(line: 19, column: 43, scope: !91) -// CHECK:STDOUT: !99 = !{!92} +// CHECK:STDOUT: !46 = !{!19, !39} +// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "TestConvertF32ToI32", linkageName: "_CTestConvertF32ToI32.Main", scope: null, file: !34, line: 4, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !56) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !39) +// CHECK:STDOUT: !54 = !DILocation(line: 4, column: 48, scope: !48) +// CHECK:STDOUT: !55 = !DILocation(line: 4, column: 41, scope: !48) +// CHECK:STDOUT: !56 = !{!49} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "TestConvertF32ToU32", linkageName: "_CTestConvertF32ToU32.Main", scope: null, file: !34, line: 7, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !65) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !39) +// CHECK:STDOUT: !63 = !DILocation(line: 7, column: 48, scope: !57) +// CHECK:STDOUT: !64 = !DILocation(line: 7, column: 41, scope: !57) +// CHECK:STDOUT: !65 = !{!58} +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "TestConvertF64ToI32", linkageName: "_CTestConvertF64ToI32.Main", scope: null, file: !34, line: 10, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !74) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !39) +// CHECK:STDOUT: !72 = !DILocation(line: 10, column: 48, scope: !66) +// CHECK:STDOUT: !73 = !DILocation(line: 10, column: 41, scope: !66) +// CHECK:STDOUT: !74 = !{!67} +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "TestConvertF64ToU32", linkageName: "_CTestConvertF64ToU32.Main", scope: null, file: !34, line: 13, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !83) +// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !39) +// CHECK:STDOUT: !81 = !DILocation(line: 13, column: 48, scope: !75) +// CHECK:STDOUT: !82 = !DILocation(line: 13, column: 41, scope: !75) +// CHECK:STDOUT: !83 = !{!76} +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "TestConvertF128ToI64", linkageName: "_CTestConvertF128ToI64.Main", scope: null, file: !34, line: 16, type: !45, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !92) +// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !39) +// CHECK:STDOUT: !90 = !DILocation(line: 16, column: 50, scope: !84) +// CHECK:STDOUT: !91 = !DILocation(line: 16, column: 43, scope: !84) +// CHECK:STDOUT: !92 = !{!85} +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "TestConvertF128ToU64", linkageName: "_CTestConvertF128ToU64.Main", scope: null, file: !34, line: 19, type: !47, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !101) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !39) +// CHECK:STDOUT: !99 = !DILocation(line: 19, column: 50, scope: !93) +// CHECK:STDOUT: !100 = !DILocation(line: 19, column: 43, scope: !93) +// CHECK:STDOUT: !101 = !{!94} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/int.carbon b/toolchain/lower/testdata/builtins/int.carbon index 4820bffb7d47..9f702bac31e2 100644 --- a/toolchain/lower/testdata/builtins/int.carbon +++ b/toolchain/lower/testdata/builtins/int.carbon @@ -227,1051 +227,1051 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: source_filename = "basic.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestNegate.Main(i32 %a) #0 !dbg !45 { +// CHECK:STDOUT: define i32 @_CTestNegate.Main(i32 %a) #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Negate.call = sub i32 0, %a, !dbg !51 -// CHECK:STDOUT: ret i32 %Negate.call, !dbg !52 +// CHECK:STDOUT: %Negate.call = sub i32 0, %a, !dbg !53 +// CHECK:STDOUT: ret i32 %Negate.call, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestAdd.Main(i32 %a, i32 %b) #0 !dbg !54 { +// CHECK:STDOUT: define i32 @_CTestAdd.Main(i32 %a, i32 %b) #0 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Add.call = add i32 %a, %b, !dbg !63 -// CHECK:STDOUT: ret i32 %Add.call, !dbg !64 +// CHECK:STDOUT: %Add.call = add i32 %a, %b, !dbg !65 +// CHECK:STDOUT: ret i32 %Add.call, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestSub.Main(i32 %a, i32 %b) #0 !dbg !66 { +// CHECK:STDOUT: define i32 @_CTestSub.Main(i32 %a, i32 %b) #0 !dbg !68 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Sub.call = sub i32 %a, %b, !dbg !75 -// CHECK:STDOUT: ret i32 %Sub.call, !dbg !76 +// CHECK:STDOUT: %Sub.call = sub i32 %a, %b, !dbg !77 +// CHECK:STDOUT: ret i32 %Sub.call, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestMul.Main(i32 %a, i32 %b) #0 !dbg !78 { +// CHECK:STDOUT: define i32 @_CTestMul.Main(i32 %a, i32 %b) #0 !dbg !80 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Mul.call = mul i32 %a, %b, !dbg !87 -// CHECK:STDOUT: ret i32 %Mul.call, !dbg !88 +// CHECK:STDOUT: %Mul.call = mul i32 %a, %b, !dbg !89 +// CHECK:STDOUT: ret i32 %Mul.call, !dbg !90 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestDiv.Main(i32 %a, i32 %b) #0 !dbg !90 { +// CHECK:STDOUT: define i32 @_CTestDiv.Main(i32 %a, i32 %b) #0 !dbg !92 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Div.call = sdiv i32 %a, %b, !dbg !99 -// CHECK:STDOUT: ret i32 %Div.call, !dbg !100 +// CHECK:STDOUT: %Div.call = sdiv i32 %a, %b, !dbg !101 +// CHECK:STDOUT: ret i32 %Div.call, !dbg !102 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestMod.Main(i32 %a, i32 %b) #0 !dbg !102 { +// CHECK:STDOUT: define i32 @_CTestMod.Main(i32 %a, i32 %b) #0 !dbg !104 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Mod.call = srem i32 %a, %b, !dbg !111 -// CHECK:STDOUT: ret i32 %Mod.call, !dbg !112 +// CHECK:STDOUT: %Mod.call = srem i32 %a, %b, !dbg !113 +// CHECK:STDOUT: ret i32 %Mod.call, !dbg !114 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestComplement.Main(i32 %a) #0 !dbg !114 { +// CHECK:STDOUT: define i32 @_CTestComplement.Main(i32 %a) #0 !dbg !116 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Complement.call = xor i32 -1, %a, !dbg !120 -// CHECK:STDOUT: ret i32 %Complement.call, !dbg !121 +// CHECK:STDOUT: %Complement.call = xor i32 -1, %a, !dbg !122 +// CHECK:STDOUT: ret i32 %Complement.call, !dbg !123 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestAnd.Main(i32 %a, i32 %b) #0 !dbg !123 { +// CHECK:STDOUT: define i32 @_CTestAnd.Main(i32 %a, i32 %b) #0 !dbg !125 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %And.call = and i32 %a, %b, !dbg !132 -// CHECK:STDOUT: ret i32 %And.call, !dbg !133 +// CHECK:STDOUT: %And.call = and i32 %a, %b, !dbg !134 +// CHECK:STDOUT: ret i32 %And.call, !dbg !135 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestOr.Main(i32 %a, i32 %b) #0 !dbg !135 { +// CHECK:STDOUT: define i32 @_CTestOr.Main(i32 %a, i32 %b) #0 !dbg !137 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Or.call = or i32 %a, %b, !dbg !144 -// CHECK:STDOUT: ret i32 %Or.call, !dbg !145 +// CHECK:STDOUT: %Or.call = or i32 %a, %b, !dbg !146 +// CHECK:STDOUT: ret i32 %Or.call, !dbg !147 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestXor.Main(i32 %a, i32 %b) #0 !dbg !147 { +// CHECK:STDOUT: define i32 @_CTestXor.Main(i32 %a, i32 %b) #0 !dbg !149 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Xor.call = xor i32 %a, %b, !dbg !156 -// CHECK:STDOUT: ret i32 %Xor.call, !dbg !157 +// CHECK:STDOUT: %Xor.call = xor i32 %a, %b, !dbg !158 +// CHECK:STDOUT: ret i32 %Xor.call, !dbg !159 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestLeftShift.Main(i32 %a, i32 %b) #0 !dbg !159 { +// CHECK:STDOUT: define i32 @_CTestLeftShift.Main(i32 %a, i32 %b) #0 !dbg !161 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %LeftShift.call = shl i32 %a, %b, !dbg !168 -// CHECK:STDOUT: ret i32 %LeftShift.call, !dbg !169 +// CHECK:STDOUT: %LeftShift.call = shl i32 %a, %b, !dbg !170 +// CHECK:STDOUT: ret i32 %LeftShift.call, !dbg !171 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestArithmeticRightShift.Main(i32 %a, i32 %b) #0 !dbg !171 { +// CHECK:STDOUT: define i32 @_CTestArithmeticRightShift.Main(i32 %a, i32 %b) #0 !dbg !173 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ArithmeticRightShift.call = ashr i32 %a, %b, !dbg !180 -// CHECK:STDOUT: ret i32 %ArithmeticRightShift.call, !dbg !181 +// CHECK:STDOUT: %ArithmeticRightShift.call = ashr i32 %a, %b, !dbg !182 +// CHECK:STDOUT: ret i32 %ArithmeticRightShift.call, !dbg !183 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestLogicalRightShift.Main(i32 %a, i32 %b) #0 !dbg !183 { +// CHECK:STDOUT: define i32 @_CTestLogicalRightShift.Main(i32 %a, i32 %b) #0 !dbg !185 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %LogicalRightShift.call = lshr i32 %a, %b, !dbg !192 -// CHECK:STDOUT: ret i32 %LogicalRightShift.call, !dbg !193 +// CHECK:STDOUT: %LogicalRightShift.call = lshr i32 %a, %b, !dbg !194 +// CHECK:STDOUT: ret i32 %LogicalRightShift.call, !dbg !195 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestEq.Main(i32 %a, i32 %b) #0 !dbg !195 { +// CHECK:STDOUT: define i1 @_CTestEq.Main(i32 %a, i32 %b) #0 !dbg !197 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Eq.call = icmp eq i32 %a, %b, !dbg !204 -// CHECK:STDOUT: ret i1 %Eq.call, !dbg !205 +// CHECK:STDOUT: %Eq.call = icmp eq i32 %a, %b, !dbg !206 +// CHECK:STDOUT: ret i1 %Eq.call, !dbg !207 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestNeq.Main(i32 %a, i32 %b) #0 !dbg !207 { +// CHECK:STDOUT: define i1 @_CTestNeq.Main(i32 %a, i32 %b) #0 !dbg !209 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Neq.call = icmp ne i32 %a, %b, !dbg !216 -// CHECK:STDOUT: ret i1 %Neq.call, !dbg !217 +// CHECK:STDOUT: %Neq.call = icmp ne i32 %a, %b, !dbg !218 +// CHECK:STDOUT: ret i1 %Neq.call, !dbg !219 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestLess.Main(i32 %a, i32 %b) #0 !dbg !219 { +// CHECK:STDOUT: define i1 @_CTestLess.Main(i32 %a, i32 %b) #0 !dbg !221 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Less.call = icmp slt i32 %a, %b, !dbg !228 -// CHECK:STDOUT: ret i1 %Less.call, !dbg !229 +// CHECK:STDOUT: %Less.call = icmp slt i32 %a, %b, !dbg !230 +// CHECK:STDOUT: ret i1 %Less.call, !dbg !231 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestLessEq.Main(i32 %a, i32 %b) #0 !dbg !231 { +// CHECK:STDOUT: define i1 @_CTestLessEq.Main(i32 %a, i32 %b) #0 !dbg !233 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %LessEq.call = icmp sle i32 %a, %b, !dbg !240 -// CHECK:STDOUT: ret i1 %LessEq.call, !dbg !241 +// CHECK:STDOUT: %LessEq.call = icmp sle i32 %a, %b, !dbg !242 +// CHECK:STDOUT: ret i1 %LessEq.call, !dbg !243 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestGreater.Main(i32 %a, i32 %b) #0 !dbg !243 { +// CHECK:STDOUT: define i1 @_CTestGreater.Main(i32 %a, i32 %b) #0 !dbg !245 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Greater.call = icmp sgt i32 %a, %b, !dbg !252 -// CHECK:STDOUT: ret i1 %Greater.call, !dbg !253 +// CHECK:STDOUT: %Greater.call = icmp sgt i32 %a, %b, !dbg !254 +// CHECK:STDOUT: ret i1 %Greater.call, !dbg !255 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestGreaterEq.Main(i32 %a, i32 %b) #0 !dbg !255 { +// CHECK:STDOUT: define i1 @_CTestGreaterEq.Main(i32 %a, i32 %b) #0 !dbg !257 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %GreaterEq.call = icmp sge i32 %a, %b, !dbg !264 -// CHECK:STDOUT: ret i1 %GreaterEq.call, !dbg !265 +// CHECK:STDOUT: %GreaterEq.call = icmp sge i32 %a, %b, !dbg !266 +// CHECK:STDOUT: ret i1 %GreaterEq.call, !dbg !267 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "basic.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !36 = !{!34, !34} -// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !38 = !{!34, !34, !34} +// CHECK:STDOUT: !34 = !DIFile(filename: "basic.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !38 = !{!36, !36} // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{!35, !35, !35} +// CHECK:STDOUT: !40 = !{!36, !36, !36} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !43 = !{!42, !34, !34} -// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "TestNegate", linkageName: "_CTestNegate.Main", scope: null, file: !32, line: 5, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !53) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !34) -// CHECK:STDOUT: !51 = !DILocation(line: 5, column: 39, scope: !45) -// CHECK:STDOUT: !52 = !DILocation(line: 5, column: 32, scope: !45) -// CHECK:STDOUT: !53 = !{!46} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !32, line: 8, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !65) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !34) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 2, scope: !54, type: !34) -// CHECK:STDOUT: !63 = !DILocation(line: 8, column: 44, scope: !54) -// CHECK:STDOUT: !64 = !DILocation(line: 8, column: 37, scope: !54) -// CHECK:STDOUT: !65 = !{!55, !56} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !32, line: 11, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !77) -// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !34) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 2, scope: !66, type: !34) -// CHECK:STDOUT: !75 = !DILocation(line: 11, column: 44, scope: !66) -// CHECK:STDOUT: !76 = !DILocation(line: 11, column: 37, scope: !66) -// CHECK:STDOUT: !77 = !{!67, !68} -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !32, line: 14, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !89) -// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !34) -// CHECK:STDOUT: !80 = !DILocalVariable(arg: 2, scope: !78, type: !34) -// CHECK:STDOUT: !87 = !DILocation(line: 14, column: 44, scope: !78) -// CHECK:STDOUT: !88 = !DILocation(line: 14, column: 37, scope: !78) -// CHECK:STDOUT: !89 = !{!79, !80} -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !32, line: 17, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !101) -// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !34) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 2, scope: !90, type: !34) -// CHECK:STDOUT: !99 = !DILocation(line: 17, column: 44, scope: !90) -// CHECK:STDOUT: !100 = !DILocation(line: 17, column: 37, scope: !90) -// CHECK:STDOUT: !101 = !{!91, !92} -// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "TestMod", linkageName: "_CTestMod.Main", scope: null, file: !32, line: 20, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !113) -// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !34) -// CHECK:STDOUT: !104 = !DILocalVariable(arg: 2, scope: !102, type: !34) -// CHECK:STDOUT: !111 = !DILocation(line: 20, column: 44, scope: !102) -// CHECK:STDOUT: !112 = !DILocation(line: 20, column: 37, scope: !102) -// CHECK:STDOUT: !113 = !{!103, !104} -// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "TestComplement", linkageName: "_CTestComplement.Main", scope: null, file: !32, line: 23, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !122) -// CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !114, type: !34) -// CHECK:STDOUT: !120 = !DILocation(line: 23, column: 43, scope: !114) -// CHECK:STDOUT: !121 = !DILocation(line: 23, column: 36, scope: !114) -// CHECK:STDOUT: !122 = !{!115} -// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "TestAnd", linkageName: "_CTestAnd.Main", scope: null, file: !32, line: 26, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !134) -// CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !34) -// CHECK:STDOUT: !125 = !DILocalVariable(arg: 2, scope: !123, type: !34) -// CHECK:STDOUT: !132 = !DILocation(line: 26, column: 44, scope: !123) -// CHECK:STDOUT: !133 = !DILocation(line: 26, column: 37, scope: !123) -// CHECK:STDOUT: !134 = !{!124, !125} -// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "TestOr", linkageName: "_CTestOr.Main", scope: null, file: !32, line: 29, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !146) -// CHECK:STDOUT: !136 = !DILocalVariable(arg: 1, scope: !135, type: !34) -// CHECK:STDOUT: !137 = !DILocalVariable(arg: 2, scope: !135, type: !34) -// CHECK:STDOUT: !144 = !DILocation(line: 29, column: 43, scope: !135) -// CHECK:STDOUT: !145 = !DILocation(line: 29, column: 36, scope: !135) -// CHECK:STDOUT: !146 = !{!136, !137} -// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "TestXor", linkageName: "_CTestXor.Main", scope: null, file: !32, line: 32, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !158) -// CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !34) -// CHECK:STDOUT: !149 = !DILocalVariable(arg: 2, scope: !147, type: !34) -// CHECK:STDOUT: !156 = !DILocation(line: 32, column: 44, scope: !147) -// CHECK:STDOUT: !157 = !DILocation(line: 32, column: 37, scope: !147) -// CHECK:STDOUT: !158 = !{!148, !149} -// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "TestLeftShift", linkageName: "_CTestLeftShift.Main", scope: null, file: !32, line: 35, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !170) -// CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !34) -// CHECK:STDOUT: !161 = !DILocalVariable(arg: 2, scope: !159, type: !34) -// CHECK:STDOUT: !168 = !DILocation(line: 35, column: 50, scope: !159) -// CHECK:STDOUT: !169 = !DILocation(line: 35, column: 43, scope: !159) -// CHECK:STDOUT: !170 = !{!160, !161} -// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "TestArithmeticRightShift", linkageName: "_CTestArithmeticRightShift.Main", scope: null, file: !32, line: 38, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !182) -// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !34) -// CHECK:STDOUT: !173 = !DILocalVariable(arg: 2, scope: !171, type: !34) -// CHECK:STDOUT: !180 = !DILocation(line: 38, column: 61, scope: !171) -// CHECK:STDOUT: !181 = !DILocation(line: 38, column: 54, scope: !171) -// CHECK:STDOUT: !182 = !{!172, !173} -// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "TestLogicalRightShift", linkageName: "_CTestLogicalRightShift.Main", scope: null, file: !32, line: 41, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !194) -// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !35) -// CHECK:STDOUT: !185 = !DILocalVariable(arg: 2, scope: !183, type: !35) -// CHECK:STDOUT: !192 = !DILocation(line: 41, column: 58, scope: !183) -// CHECK:STDOUT: !193 = !DILocation(line: 41, column: 51, scope: !183) -// CHECK:STDOUT: !194 = !{!184, !185} -// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !32, line: 44, type: !44, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !206) -// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !34) -// CHECK:STDOUT: !197 = !DILocalVariable(arg: 2, scope: !195, type: !34) -// CHECK:STDOUT: !204 = !DILocation(line: 44, column: 44, scope: !195) -// CHECK:STDOUT: !205 = !DILocation(line: 44, column: 37, scope: !195) -// CHECK:STDOUT: !206 = !{!196, !197} -// CHECK:STDOUT: !207 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !32, line: 47, type: !44, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !218) -// CHECK:STDOUT: !208 = !DILocalVariable(arg: 1, scope: !207, type: !34) -// CHECK:STDOUT: !209 = !DILocalVariable(arg: 2, scope: !207, type: !34) -// CHECK:STDOUT: !216 = !DILocation(line: 47, column: 45, scope: !207) -// CHECK:STDOUT: !217 = !DILocation(line: 47, column: 38, scope: !207) -// CHECK:STDOUT: !218 = !{!208, !209} -// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "TestLess", linkageName: "_CTestLess.Main", scope: null, file: !32, line: 50, type: !44, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !230) -// CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !34) -// CHECK:STDOUT: !221 = !DILocalVariable(arg: 2, scope: !219, type: !34) -// CHECK:STDOUT: !228 = !DILocation(line: 50, column: 46, scope: !219) -// CHECK:STDOUT: !229 = !DILocation(line: 50, column: 39, scope: !219) -// CHECK:STDOUT: !230 = !{!220, !221} -// CHECK:STDOUT: !231 = distinct !DISubprogram(name: "TestLessEq", linkageName: "_CTestLessEq.Main", scope: null, file: !32, line: 53, type: !44, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !242) -// CHECK:STDOUT: !232 = !DILocalVariable(arg: 1, scope: !231, type: !34) -// CHECK:STDOUT: !233 = !DILocalVariable(arg: 2, scope: !231, type: !34) -// CHECK:STDOUT: !240 = !DILocation(line: 53, column: 48, scope: !231) -// CHECK:STDOUT: !241 = !DILocation(line: 53, column: 41, scope: !231) -// CHECK:STDOUT: !242 = !{!232, !233} -// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "TestGreater", linkageName: "_CTestGreater.Main", scope: null, file: !32, line: 56, type: !44, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !254) -// CHECK:STDOUT: !244 = !DILocalVariable(arg: 1, scope: !243, type: !34) -// CHECK:STDOUT: !245 = !DILocalVariable(arg: 2, scope: !243, type: !34) -// CHECK:STDOUT: !252 = !DILocation(line: 56, column: 49, scope: !243) -// CHECK:STDOUT: !253 = !DILocation(line: 56, column: 42, scope: !243) -// CHECK:STDOUT: !254 = !{!244, !245} -// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "TestGreaterEq", linkageName: "_CTestGreaterEq.Main", scope: null, file: !32, line: 59, type: !44, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !266) -// CHECK:STDOUT: !256 = !DILocalVariable(arg: 1, scope: !255, type: !34) -// CHECK:STDOUT: !257 = !DILocalVariable(arg: 2, scope: !255, type: !34) -// CHECK:STDOUT: !264 = !DILocation(line: 59, column: 51, scope: !255) -// CHECK:STDOUT: !265 = !DILocation(line: 59, column: 44, scope: !255) -// CHECK:STDOUT: !266 = !{!256, !257} +// CHECK:STDOUT: !42 = !{!37, !37, !37} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !45 = !{!44, !36, !36} +// CHECK:STDOUT: !46 = !DISubroutineType(types: !45) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "TestNegate", linkageName: "_CTestNegate.Main", scope: null, file: !34, line: 5, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !55) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !36) +// CHECK:STDOUT: !53 = !DILocation(line: 5, column: 39, scope: !47) +// CHECK:STDOUT: !54 = !DILocation(line: 5, column: 32, scope: !47) +// CHECK:STDOUT: !55 = !{!48} +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !34, line: 8, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !67) +// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !36) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 2, scope: !56, type: !36) +// CHECK:STDOUT: !65 = !DILocation(line: 8, column: 44, scope: !56) +// CHECK:STDOUT: !66 = !DILocation(line: 8, column: 37, scope: !56) +// CHECK:STDOUT: !67 = !{!57, !58} +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !34, line: 11, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !79) +// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !36) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 2, scope: !68, type: !36) +// CHECK:STDOUT: !77 = !DILocation(line: 11, column: 44, scope: !68) +// CHECK:STDOUT: !78 = !DILocation(line: 11, column: 37, scope: !68) +// CHECK:STDOUT: !79 = !{!69, !70} +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !34, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !91) +// CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !36) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 2, scope: !80, type: !36) +// CHECK:STDOUT: !89 = !DILocation(line: 14, column: 44, scope: !80) +// CHECK:STDOUT: !90 = !DILocation(line: 14, column: 37, scope: !80) +// CHECK:STDOUT: !91 = !{!81, !82} +// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !34, line: 17, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !103) +// CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !92, type: !36) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 2, scope: !92, type: !36) +// CHECK:STDOUT: !101 = !DILocation(line: 17, column: 44, scope: !92) +// CHECK:STDOUT: !102 = !DILocation(line: 17, column: 37, scope: !92) +// CHECK:STDOUT: !103 = !{!93, !94} +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "TestMod", linkageName: "_CTestMod.Main", scope: null, file: !34, line: 20, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !115) +// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !36) +// CHECK:STDOUT: !106 = !DILocalVariable(arg: 2, scope: !104, type: !36) +// CHECK:STDOUT: !113 = !DILocation(line: 20, column: 44, scope: !104) +// CHECK:STDOUT: !114 = !DILocation(line: 20, column: 37, scope: !104) +// CHECK:STDOUT: !115 = !{!105, !106} +// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "TestComplement", linkageName: "_CTestComplement.Main", scope: null, file: !34, line: 23, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !124) +// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !36) +// CHECK:STDOUT: !122 = !DILocation(line: 23, column: 43, scope: !116) +// CHECK:STDOUT: !123 = !DILocation(line: 23, column: 36, scope: !116) +// CHECK:STDOUT: !124 = !{!117} +// CHECK:STDOUT: !125 = distinct !DISubprogram(name: "TestAnd", linkageName: "_CTestAnd.Main", scope: null, file: !34, line: 26, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !136) +// CHECK:STDOUT: !126 = !DILocalVariable(arg: 1, scope: !125, type: !36) +// CHECK:STDOUT: !127 = !DILocalVariable(arg: 2, scope: !125, type: !36) +// CHECK:STDOUT: !134 = !DILocation(line: 26, column: 44, scope: !125) +// CHECK:STDOUT: !135 = !DILocation(line: 26, column: 37, scope: !125) +// CHECK:STDOUT: !136 = !{!126, !127} +// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "TestOr", linkageName: "_CTestOr.Main", scope: null, file: !34, line: 29, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !148) +// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !36) +// CHECK:STDOUT: !139 = !DILocalVariable(arg: 2, scope: !137, type: !36) +// CHECK:STDOUT: !146 = !DILocation(line: 29, column: 43, scope: !137) +// CHECK:STDOUT: !147 = !DILocation(line: 29, column: 36, scope: !137) +// CHECK:STDOUT: !148 = !{!138, !139} +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "TestXor", linkageName: "_CTestXor.Main", scope: null, file: !34, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !160) +// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !36) +// CHECK:STDOUT: !151 = !DILocalVariable(arg: 2, scope: !149, type: !36) +// CHECK:STDOUT: !158 = !DILocation(line: 32, column: 44, scope: !149) +// CHECK:STDOUT: !159 = !DILocation(line: 32, column: 37, scope: !149) +// CHECK:STDOUT: !160 = !{!150, !151} +// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "TestLeftShift", linkageName: "_CTestLeftShift.Main", scope: null, file: !34, line: 35, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !172) +// CHECK:STDOUT: !162 = !DILocalVariable(arg: 1, scope: !161, type: !36) +// CHECK:STDOUT: !163 = !DILocalVariable(arg: 2, scope: !161, type: !36) +// CHECK:STDOUT: !170 = !DILocation(line: 35, column: 50, scope: !161) +// CHECK:STDOUT: !171 = !DILocation(line: 35, column: 43, scope: !161) +// CHECK:STDOUT: !172 = !{!162, !163} +// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "TestArithmeticRightShift", linkageName: "_CTestArithmeticRightShift.Main", scope: null, file: !34, line: 38, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !184) +// CHECK:STDOUT: !174 = !DILocalVariable(arg: 1, scope: !173, type: !36) +// CHECK:STDOUT: !175 = !DILocalVariable(arg: 2, scope: !173, type: !36) +// CHECK:STDOUT: !182 = !DILocation(line: 38, column: 61, scope: !173) +// CHECK:STDOUT: !183 = !DILocation(line: 38, column: 54, scope: !173) +// CHECK:STDOUT: !184 = !{!174, !175} +// CHECK:STDOUT: !185 = distinct !DISubprogram(name: "TestLogicalRightShift", linkageName: "_CTestLogicalRightShift.Main", scope: null, file: !34, line: 41, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !196) +// CHECK:STDOUT: !186 = !DILocalVariable(arg: 1, scope: !185, type: !37) +// CHECK:STDOUT: !187 = !DILocalVariable(arg: 2, scope: !185, type: !37) +// CHECK:STDOUT: !194 = !DILocation(line: 41, column: 58, scope: !185) +// CHECK:STDOUT: !195 = !DILocation(line: 41, column: 51, scope: !185) +// CHECK:STDOUT: !196 = !{!186, !187} +// CHECK:STDOUT: !197 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !34, line: 44, type: !46, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !208) +// CHECK:STDOUT: !198 = !DILocalVariable(arg: 1, scope: !197, type: !36) +// CHECK:STDOUT: !199 = !DILocalVariable(arg: 2, scope: !197, type: !36) +// CHECK:STDOUT: !206 = !DILocation(line: 44, column: 44, scope: !197) +// CHECK:STDOUT: !207 = !DILocation(line: 44, column: 37, scope: !197) +// CHECK:STDOUT: !208 = !{!198, !199} +// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !34, line: 47, type: !46, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !220) +// CHECK:STDOUT: !210 = !DILocalVariable(arg: 1, scope: !209, type: !36) +// CHECK:STDOUT: !211 = !DILocalVariable(arg: 2, scope: !209, type: !36) +// CHECK:STDOUT: !218 = !DILocation(line: 47, column: 45, scope: !209) +// CHECK:STDOUT: !219 = !DILocation(line: 47, column: 38, scope: !209) +// CHECK:STDOUT: !220 = !{!210, !211} +// CHECK:STDOUT: !221 = distinct !DISubprogram(name: "TestLess", linkageName: "_CTestLess.Main", scope: null, file: !34, line: 50, type: !46, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !232) +// CHECK:STDOUT: !222 = !DILocalVariable(arg: 1, scope: !221, type: !36) +// CHECK:STDOUT: !223 = !DILocalVariable(arg: 2, scope: !221, type: !36) +// CHECK:STDOUT: !230 = !DILocation(line: 50, column: 46, scope: !221) +// CHECK:STDOUT: !231 = !DILocation(line: 50, column: 39, scope: !221) +// CHECK:STDOUT: !232 = !{!222, !223} +// CHECK:STDOUT: !233 = distinct !DISubprogram(name: "TestLessEq", linkageName: "_CTestLessEq.Main", scope: null, file: !34, line: 53, type: !46, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !244) +// CHECK:STDOUT: !234 = !DILocalVariable(arg: 1, scope: !233, type: !36) +// CHECK:STDOUT: !235 = !DILocalVariable(arg: 2, scope: !233, type: !36) +// CHECK:STDOUT: !242 = !DILocation(line: 53, column: 48, scope: !233) +// CHECK:STDOUT: !243 = !DILocation(line: 53, column: 41, scope: !233) +// CHECK:STDOUT: !244 = !{!234, !235} +// CHECK:STDOUT: !245 = distinct !DISubprogram(name: "TestGreater", linkageName: "_CTestGreater.Main", scope: null, file: !34, line: 56, type: !46, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !256) +// CHECK:STDOUT: !246 = !DILocalVariable(arg: 1, scope: !245, type: !36) +// CHECK:STDOUT: !247 = !DILocalVariable(arg: 2, scope: !245, type: !36) +// CHECK:STDOUT: !254 = !DILocation(line: 56, column: 49, scope: !245) +// CHECK:STDOUT: !255 = !DILocation(line: 56, column: 42, scope: !245) +// CHECK:STDOUT: !256 = !{!246, !247} +// CHECK:STDOUT: !257 = distinct !DISubprogram(name: "TestGreaterEq", linkageName: "_CTestGreaterEq.Main", scope: null, file: !34, line: 59, type: !46, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !268) +// CHECK:STDOUT: !258 = !DILocalVariable(arg: 1, scope: !257, type: !36) +// CHECK:STDOUT: !259 = !DILocalVariable(arg: 2, scope: !257, type: !36) +// CHECK:STDOUT: !266 = !DILocation(line: 59, column: 51, scope: !257) +// CHECK:STDOUT: !267 = !DILocation(line: 59, column: 44, scope: !257) +// CHECK:STDOUT: !268 = !{!258, !259} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'compound_assign.carbon' // CHECK:STDOUT: source_filename = "compound_assign.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestSAdd.Main(ptr %a, i32 %b) #0 !dbg !275 { +// CHECK:STDOUT: define void @_CTestSAdd.Main(ptr %a, i32 %b) #0 !dbg !277 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %SAdd.call = load i32, ptr %a, align 4, !dbg !283 -// CHECK:STDOUT: %SAdd.call1 = add i32 %SAdd.call, %b, !dbg !283 -// CHECK:STDOUT: store i32 %SAdd.call1, ptr %a, align 4, !dbg !283 -// CHECK:STDOUT: ret void, !dbg !284 +// CHECK:STDOUT: %SAdd.call = load i32, ptr %a, align 4, !dbg !285 +// CHECK:STDOUT: %SAdd.call1 = add i32 %SAdd.call, %b, !dbg !285 +// CHECK:STDOUT: store i32 %SAdd.call1, ptr %a, align 4, !dbg !285 +// CHECK:STDOUT: ret void, !dbg !286 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestSSub.Main(ptr %a, i32 %b) #0 !dbg !286 { +// CHECK:STDOUT: define void @_CTestSSub.Main(ptr %a, i32 %b) #0 !dbg !288 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %SSub.call = load i32, ptr %a, align 4, !dbg !294 -// CHECK:STDOUT: %SSub.call1 = sub i32 %SSub.call, %b, !dbg !294 -// CHECK:STDOUT: store i32 %SSub.call1, ptr %a, align 4, !dbg !294 -// CHECK:STDOUT: ret void, !dbg !295 +// CHECK:STDOUT: %SSub.call = load i32, ptr %a, align 4, !dbg !296 +// CHECK:STDOUT: %SSub.call1 = sub i32 %SSub.call, %b, !dbg !296 +// CHECK:STDOUT: store i32 %SSub.call1, ptr %a, align 4, !dbg !296 +// CHECK:STDOUT: ret void, !dbg !297 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestSMul.Main(ptr %a, i32 %b) #0 !dbg !297 { +// CHECK:STDOUT: define void @_CTestSMul.Main(ptr %a, i32 %b) #0 !dbg !299 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %SMul.call = load i32, ptr %a, align 4, !dbg !305 -// CHECK:STDOUT: %SMul.call1 = mul i32 %SMul.call, %b, !dbg !305 -// CHECK:STDOUT: store i32 %SMul.call1, ptr %a, align 4, !dbg !305 -// CHECK:STDOUT: ret void, !dbg !306 +// CHECK:STDOUT: %SMul.call = load i32, ptr %a, align 4, !dbg !307 +// CHECK:STDOUT: %SMul.call1 = mul i32 %SMul.call, %b, !dbg !307 +// CHECK:STDOUT: store i32 %SMul.call1, ptr %a, align 4, !dbg !307 +// CHECK:STDOUT: ret void, !dbg !308 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestSDiv.Main(ptr %a, i32 %b) #0 !dbg !308 { +// CHECK:STDOUT: define void @_CTestSDiv.Main(ptr %a, i32 %b) #0 !dbg !310 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %SDiv.call = load i32, ptr %a, align 4, !dbg !316 -// CHECK:STDOUT: %SDiv.call1 = sdiv i32 %SDiv.call, %b, !dbg !316 -// CHECK:STDOUT: store i32 %SDiv.call1, ptr %a, align 4, !dbg !316 -// CHECK:STDOUT: ret void, !dbg !317 +// CHECK:STDOUT: %SDiv.call = load i32, ptr %a, align 4, !dbg !318 +// CHECK:STDOUT: %SDiv.call1 = sdiv i32 %SDiv.call, %b, !dbg !318 +// CHECK:STDOUT: store i32 %SDiv.call1, ptr %a, align 4, !dbg !318 +// CHECK:STDOUT: ret void, !dbg !319 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestSMod.Main(ptr %a, i32 %b) #0 !dbg !319 { +// CHECK:STDOUT: define void @_CTestSMod.Main(ptr %a, i32 %b) #0 !dbg !321 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %SMod.call = load i32, ptr %a, align 4, !dbg !327 -// CHECK:STDOUT: %SMod.call1 = srem i32 %SMod.call, %b, !dbg !327 -// CHECK:STDOUT: store i32 %SMod.call1, ptr %a, align 4, !dbg !327 -// CHECK:STDOUT: ret void, !dbg !328 +// CHECK:STDOUT: %SMod.call = load i32, ptr %a, align 4, !dbg !329 +// CHECK:STDOUT: %SMod.call1 = srem i32 %SMod.call, %b, !dbg !329 +// CHECK:STDOUT: store i32 %SMod.call1, ptr %a, align 4, !dbg !329 +// CHECK:STDOUT: ret void, !dbg !330 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestUAdd.Main(ptr %a, i32 %b) #0 !dbg !330 { +// CHECK:STDOUT: define void @_CTestUAdd.Main(ptr %a, i32 %b) #0 !dbg !332 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %UAdd.call = load i32, ptr %a, align 4, !dbg !338 -// CHECK:STDOUT: %UAdd.call1 = add i32 %UAdd.call, %b, !dbg !338 -// CHECK:STDOUT: store i32 %UAdd.call1, ptr %a, align 4, !dbg !338 -// CHECK:STDOUT: ret void, !dbg !339 +// CHECK:STDOUT: %UAdd.call = load i32, ptr %a, align 4, !dbg !340 +// CHECK:STDOUT: %UAdd.call1 = add i32 %UAdd.call, %b, !dbg !340 +// CHECK:STDOUT: store i32 %UAdd.call1, ptr %a, align 4, !dbg !340 +// CHECK:STDOUT: ret void, !dbg !341 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestUSub.Main(ptr %a, i32 %b) #0 !dbg !341 { +// CHECK:STDOUT: define void @_CTestUSub.Main(ptr %a, i32 %b) #0 !dbg !343 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %USub.call = load i32, ptr %a, align 4, !dbg !349 -// CHECK:STDOUT: %USub.call1 = sub i32 %USub.call, %b, !dbg !349 -// CHECK:STDOUT: store i32 %USub.call1, ptr %a, align 4, !dbg !349 -// CHECK:STDOUT: ret void, !dbg !350 +// CHECK:STDOUT: %USub.call = load i32, ptr %a, align 4, !dbg !351 +// CHECK:STDOUT: %USub.call1 = sub i32 %USub.call, %b, !dbg !351 +// CHECK:STDOUT: store i32 %USub.call1, ptr %a, align 4, !dbg !351 +// CHECK:STDOUT: ret void, !dbg !352 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestUMul.Main(ptr %a, i32 %b) #0 !dbg !352 { +// CHECK:STDOUT: define void @_CTestUMul.Main(ptr %a, i32 %b) #0 !dbg !354 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %UMul.call = load i32, ptr %a, align 4, !dbg !360 -// CHECK:STDOUT: %UMul.call1 = mul i32 %UMul.call, %b, !dbg !360 -// CHECK:STDOUT: store i32 %UMul.call1, ptr %a, align 4, !dbg !360 -// CHECK:STDOUT: ret void, !dbg !361 +// CHECK:STDOUT: %UMul.call = load i32, ptr %a, align 4, !dbg !362 +// CHECK:STDOUT: %UMul.call1 = mul i32 %UMul.call, %b, !dbg !362 +// CHECK:STDOUT: store i32 %UMul.call1, ptr %a, align 4, !dbg !362 +// CHECK:STDOUT: ret void, !dbg !363 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestUDiv.Main(ptr %a, i32 %b) #0 !dbg !363 { +// CHECK:STDOUT: define void @_CTestUDiv.Main(ptr %a, i32 %b) #0 !dbg !365 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %UDiv.call = load i32, ptr %a, align 4, !dbg !371 -// CHECK:STDOUT: %UDiv.call1 = udiv i32 %UDiv.call, %b, !dbg !371 -// CHECK:STDOUT: store i32 %UDiv.call1, ptr %a, align 4, !dbg !371 -// CHECK:STDOUT: ret void, !dbg !372 +// CHECK:STDOUT: %UDiv.call = load i32, ptr %a, align 4, !dbg !373 +// CHECK:STDOUT: %UDiv.call1 = udiv i32 %UDiv.call, %b, !dbg !373 +// CHECK:STDOUT: store i32 %UDiv.call1, ptr %a, align 4, !dbg !373 +// CHECK:STDOUT: ret void, !dbg !374 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestUMod.Main(ptr %a, i32 %b) #0 !dbg !374 { +// CHECK:STDOUT: define void @_CTestUMod.Main(ptr %a, i32 %b) #0 !dbg !376 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %UMod.call = load i32, ptr %a, align 4, !dbg !382 -// CHECK:STDOUT: %UMod.call1 = urem i32 %UMod.call, %b, !dbg !382 -// CHECK:STDOUT: store i32 %UMod.call1, ptr %a, align 4, !dbg !382 -// CHECK:STDOUT: ret void, !dbg !383 +// CHECK:STDOUT: %UMod.call = load i32, ptr %a, align 4, !dbg !384 +// CHECK:STDOUT: %UMod.call1 = urem i32 %UMod.call, %b, !dbg !384 +// CHECK:STDOUT: store i32 %UMod.call1, ptr %a, align 4, !dbg !384 +// CHECK:STDOUT: ret void, !dbg !385 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestAnd.Main(ptr %a, i32 %b) #0 !dbg !385 { +// CHECK:STDOUT: define void @_CTestAnd.Main(ptr %a, i32 %b) #0 !dbg !387 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %And.call = load i32, ptr %a, align 4, !dbg !393 -// CHECK:STDOUT: %And.call1 = and i32 %And.call, %b, !dbg !393 -// CHECK:STDOUT: store i32 %And.call1, ptr %a, align 4, !dbg !393 -// CHECK:STDOUT: ret void, !dbg !394 +// CHECK:STDOUT: %And.call = load i32, ptr %a, align 4, !dbg !395 +// CHECK:STDOUT: %And.call1 = and i32 %And.call, %b, !dbg !395 +// CHECK:STDOUT: store i32 %And.call1, ptr %a, align 4, !dbg !395 +// CHECK:STDOUT: ret void, !dbg !396 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestOr.Main(ptr %a, i32 %b) #0 !dbg !396 { +// CHECK:STDOUT: define void @_CTestOr.Main(ptr %a, i32 %b) #0 !dbg !398 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Or.call = load i32, ptr %a, align 4, !dbg !404 -// CHECK:STDOUT: %Or.call1 = or i32 %Or.call, %b, !dbg !404 -// CHECK:STDOUT: store i32 %Or.call1, ptr %a, align 4, !dbg !404 -// CHECK:STDOUT: ret void, !dbg !405 +// CHECK:STDOUT: %Or.call = load i32, ptr %a, align 4, !dbg !406 +// CHECK:STDOUT: %Or.call1 = or i32 %Or.call, %b, !dbg !406 +// CHECK:STDOUT: store i32 %Or.call1, ptr %a, align 4, !dbg !406 +// CHECK:STDOUT: ret void, !dbg !407 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestXor.Main(ptr %a, i32 %b) #0 !dbg !407 { +// CHECK:STDOUT: define void @_CTestXor.Main(ptr %a, i32 %b) #0 !dbg !409 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Xor.call = load i32, ptr %a, align 4, !dbg !415 -// CHECK:STDOUT: %Xor.call1 = xor i32 %Xor.call, %b, !dbg !415 -// CHECK:STDOUT: store i32 %Xor.call1, ptr %a, align 4, !dbg !415 -// CHECK:STDOUT: ret void, !dbg !416 +// CHECK:STDOUT: %Xor.call = load i32, ptr %a, align 4, !dbg !417 +// CHECK:STDOUT: %Xor.call1 = xor i32 %Xor.call, %b, !dbg !417 +// CHECK:STDOUT: store i32 %Xor.call1, ptr %a, align 4, !dbg !417 +// CHECK:STDOUT: ret void, !dbg !418 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestLeftShift.Main(ptr %a, i32 %b) #0 !dbg !418 { +// CHECK:STDOUT: define void @_CTestLeftShift.Main(ptr %a, i32 %b) #0 !dbg !420 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %LeftShift.call = load i32, ptr %a, align 4, !dbg !426 -// CHECK:STDOUT: %LeftShift.call1 = shl i32 %LeftShift.call, %b, !dbg !426 -// CHECK:STDOUT: store i32 %LeftShift.call1, ptr %a, align 4, !dbg !426 -// CHECK:STDOUT: ret void, !dbg !427 +// CHECK:STDOUT: %LeftShift.call = load i32, ptr %a, align 4, !dbg !428 +// CHECK:STDOUT: %LeftShift.call1 = shl i32 %LeftShift.call, %b, !dbg !428 +// CHECK:STDOUT: store i32 %LeftShift.call1, ptr %a, align 4, !dbg !428 +// CHECK:STDOUT: ret void, !dbg !429 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestArithmeticRightShift.Main(ptr %a, i32 %b) #0 !dbg !429 { +// CHECK:STDOUT: define void @_CTestArithmeticRightShift.Main(ptr %a, i32 %b) #0 !dbg !431 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ArithmeticRightShift.call = load i32, ptr %a, align 4, !dbg !437 -// CHECK:STDOUT: %ArithmeticRightShift.call1 = ashr i32 %ArithmeticRightShift.call, %b, !dbg !437 -// CHECK:STDOUT: store i32 %ArithmeticRightShift.call1, ptr %a, align 4, !dbg !437 -// CHECK:STDOUT: ret void, !dbg !438 +// CHECK:STDOUT: %ArithmeticRightShift.call = load i32, ptr %a, align 4, !dbg !439 +// CHECK:STDOUT: %ArithmeticRightShift.call1 = ashr i32 %ArithmeticRightShift.call, %b, !dbg !439 +// CHECK:STDOUT: store i32 %ArithmeticRightShift.call1, ptr %a, align 4, !dbg !439 +// CHECK:STDOUT: ret void, !dbg !440 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTestLogicalRightShift.Main(ptr %a, i32 %b) #0 !dbg !440 { +// CHECK:STDOUT: define void @_CTestLogicalRightShift.Main(ptr %a, i32 %b) #0 !dbg !442 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %LogicalRightShift.call = load i32, ptr %a, align 4, !dbg !448 -// CHECK:STDOUT: %LogicalRightShift.call1 = lshr i32 %LogicalRightShift.call, %b, !dbg !448 -// CHECK:STDOUT: store i32 %LogicalRightShift.call1, ptr %a, align 4, !dbg !448 -// CHECK:STDOUT: ret void, !dbg !449 +// CHECK:STDOUT: %LogicalRightShift.call = load i32, ptr %a, align 4, !dbg !450 +// CHECK:STDOUT: %LogicalRightShift.call1 = lshr i32 %LogicalRightShift.call, %b, !dbg !450 +// CHECK:STDOUT: store i32 %LogicalRightShift.call1, ptr %a, align 4, !dbg !450 +// CHECK:STDOUT: ret void, !dbg !451 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!268} +// CHECK:STDOUT: !llvm.dbg.cu = !{!270} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !267 = !DIFile(filename: "compound_assign.carbon", directory: "") -// CHECK:STDOUT: !268 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !267, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !269 = !{null, !34, !34} -// CHECK:STDOUT: !270 = !DISubroutineType(types: !269) -// CHECK:STDOUT: !271 = !{null, !34, !35} +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !269 = !DIFile(filename: "compound_assign.carbon", directory: "") +// CHECK:STDOUT: !270 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !269, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !271 = !{null, !36, !36} // CHECK:STDOUT: !272 = !DISubroutineType(types: !271) -// CHECK:STDOUT: !273 = !{null, !35, !35} +// CHECK:STDOUT: !273 = !{null, !36, !37} // CHECK:STDOUT: !274 = !DISubroutineType(types: !273) -// CHECK:STDOUT: !275 = distinct !DISubprogram(name: "TestSAdd", linkageName: "_CTestSAdd.Main", scope: null, file: !267, line: 5, type: !270, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !285) -// CHECK:STDOUT: !276 = !DILocalVariable(arg: 1, scope: !275, type: !34) -// CHECK:STDOUT: !277 = !DILocalVariable(arg: 2, scope: !275, type: !34) -// CHECK:STDOUT: !283 = !DILocation(line: 5, column: 35, scope: !275) -// CHECK:STDOUT: !284 = !DILocation(line: 5, column: 1, scope: !275) -// CHECK:STDOUT: !285 = !{!276, !277} -// CHECK:STDOUT: !286 = distinct !DISubprogram(name: "TestSSub", linkageName: "_CTestSSub.Main", scope: null, file: !267, line: 8, type: !270, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !296) -// CHECK:STDOUT: !287 = !DILocalVariable(arg: 1, scope: !286, type: !34) -// CHECK:STDOUT: !288 = !DILocalVariable(arg: 2, scope: !286, type: !34) -// CHECK:STDOUT: !294 = !DILocation(line: 8, column: 35, scope: !286) -// CHECK:STDOUT: !295 = !DILocation(line: 8, column: 1, scope: !286) -// CHECK:STDOUT: !296 = !{!287, !288} -// CHECK:STDOUT: !297 = distinct !DISubprogram(name: "TestSMul", linkageName: "_CTestSMul.Main", scope: null, file: !267, line: 11, type: !270, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !307) -// CHECK:STDOUT: !298 = !DILocalVariable(arg: 1, scope: !297, type: !34) -// CHECK:STDOUT: !299 = !DILocalVariable(arg: 2, scope: !297, type: !34) -// CHECK:STDOUT: !305 = !DILocation(line: 11, column: 35, scope: !297) -// CHECK:STDOUT: !306 = !DILocation(line: 11, column: 1, scope: !297) -// CHECK:STDOUT: !307 = !{!298, !299} -// CHECK:STDOUT: !308 = distinct !DISubprogram(name: "TestSDiv", linkageName: "_CTestSDiv.Main", scope: null, file: !267, line: 14, type: !270, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !318) -// CHECK:STDOUT: !309 = !DILocalVariable(arg: 1, scope: !308, type: !34) -// CHECK:STDOUT: !310 = !DILocalVariable(arg: 2, scope: !308, type: !34) -// CHECK:STDOUT: !316 = !DILocation(line: 14, column: 35, scope: !308) -// CHECK:STDOUT: !317 = !DILocation(line: 14, column: 1, scope: !308) -// CHECK:STDOUT: !318 = !{!309, !310} -// CHECK:STDOUT: !319 = distinct !DISubprogram(name: "TestSMod", linkageName: "_CTestSMod.Main", scope: null, file: !267, line: 17, type: !270, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !329) -// CHECK:STDOUT: !320 = !DILocalVariable(arg: 1, scope: !319, type: !34) -// CHECK:STDOUT: !321 = !DILocalVariable(arg: 2, scope: !319, type: !34) -// CHECK:STDOUT: !327 = !DILocation(line: 17, column: 35, scope: !319) -// CHECK:STDOUT: !328 = !DILocation(line: 17, column: 1, scope: !319) -// CHECK:STDOUT: !329 = !{!320, !321} -// CHECK:STDOUT: !330 = distinct !DISubprogram(name: "TestUAdd", linkageName: "_CTestUAdd.Main", scope: null, file: !267, line: 20, type: !270, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !340) -// CHECK:STDOUT: !331 = !DILocalVariable(arg: 1, scope: !330, type: !34) -// CHECK:STDOUT: !332 = !DILocalVariable(arg: 2, scope: !330, type: !34) -// CHECK:STDOUT: !338 = !DILocation(line: 20, column: 35, scope: !330) -// CHECK:STDOUT: !339 = !DILocation(line: 20, column: 1, scope: !330) -// CHECK:STDOUT: !340 = !{!331, !332} -// CHECK:STDOUT: !341 = distinct !DISubprogram(name: "TestUSub", linkageName: "_CTestUSub.Main", scope: null, file: !267, line: 23, type: !270, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !351) -// CHECK:STDOUT: !342 = !DILocalVariable(arg: 1, scope: !341, type: !34) -// CHECK:STDOUT: !343 = !DILocalVariable(arg: 2, scope: !341, type: !34) -// CHECK:STDOUT: !349 = !DILocation(line: 23, column: 35, scope: !341) -// CHECK:STDOUT: !350 = !DILocation(line: 23, column: 1, scope: !341) -// CHECK:STDOUT: !351 = !{!342, !343} -// CHECK:STDOUT: !352 = distinct !DISubprogram(name: "TestUMul", linkageName: "_CTestUMul.Main", scope: null, file: !267, line: 26, type: !270, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !362) -// CHECK:STDOUT: !353 = !DILocalVariable(arg: 1, scope: !352, type: !34) -// CHECK:STDOUT: !354 = !DILocalVariable(arg: 2, scope: !352, type: !34) -// CHECK:STDOUT: !360 = !DILocation(line: 26, column: 35, scope: !352) -// CHECK:STDOUT: !361 = !DILocation(line: 26, column: 1, scope: !352) -// CHECK:STDOUT: !362 = !{!353, !354} -// CHECK:STDOUT: !363 = distinct !DISubprogram(name: "TestUDiv", linkageName: "_CTestUDiv.Main", scope: null, file: !267, line: 29, type: !270, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !373) -// CHECK:STDOUT: !364 = !DILocalVariable(arg: 1, scope: !363, type: !34) -// CHECK:STDOUT: !365 = !DILocalVariable(arg: 2, scope: !363, type: !34) -// CHECK:STDOUT: !371 = !DILocation(line: 29, column: 35, scope: !363) -// CHECK:STDOUT: !372 = !DILocation(line: 29, column: 1, scope: !363) -// CHECK:STDOUT: !373 = !{!364, !365} -// CHECK:STDOUT: !374 = distinct !DISubprogram(name: "TestUMod", linkageName: "_CTestUMod.Main", scope: null, file: !267, line: 32, type: !270, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !384) -// CHECK:STDOUT: !375 = !DILocalVariable(arg: 1, scope: !374, type: !34) -// CHECK:STDOUT: !376 = !DILocalVariable(arg: 2, scope: !374, type: !34) -// CHECK:STDOUT: !382 = !DILocation(line: 32, column: 35, scope: !374) -// CHECK:STDOUT: !383 = !DILocation(line: 32, column: 1, scope: !374) -// CHECK:STDOUT: !384 = !{!375, !376} -// CHECK:STDOUT: !385 = distinct !DISubprogram(name: "TestAnd", linkageName: "_CTestAnd.Main", scope: null, file: !267, line: 35, type: !270, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !395) -// CHECK:STDOUT: !386 = !DILocalVariable(arg: 1, scope: !385, type: !34) -// CHECK:STDOUT: !387 = !DILocalVariable(arg: 2, scope: !385, type: !34) -// CHECK:STDOUT: !393 = !DILocation(line: 35, column: 34, scope: !385) -// CHECK:STDOUT: !394 = !DILocation(line: 35, column: 1, scope: !385) -// CHECK:STDOUT: !395 = !{!386, !387} -// CHECK:STDOUT: !396 = distinct !DISubprogram(name: "TestOr", linkageName: "_CTestOr.Main", scope: null, file: !267, line: 38, type: !270, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !406) -// CHECK:STDOUT: !397 = !DILocalVariable(arg: 1, scope: !396, type: !34) -// CHECK:STDOUT: !398 = !DILocalVariable(arg: 2, scope: !396, type: !34) -// CHECK:STDOUT: !404 = !DILocation(line: 38, column: 33, scope: !396) -// CHECK:STDOUT: !405 = !DILocation(line: 38, column: 1, scope: !396) -// CHECK:STDOUT: !406 = !{!397, !398} -// CHECK:STDOUT: !407 = distinct !DISubprogram(name: "TestXor", linkageName: "_CTestXor.Main", scope: null, file: !267, line: 41, type: !270, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !417) -// CHECK:STDOUT: !408 = !DILocalVariable(arg: 1, scope: !407, type: !34) -// CHECK:STDOUT: !409 = !DILocalVariable(arg: 2, scope: !407, type: !34) -// CHECK:STDOUT: !415 = !DILocation(line: 41, column: 34, scope: !407) -// CHECK:STDOUT: !416 = !DILocation(line: 41, column: 1, scope: !407) -// CHECK:STDOUT: !417 = !{!408, !409} -// CHECK:STDOUT: !418 = distinct !DISubprogram(name: "TestLeftShift", linkageName: "_CTestLeftShift.Main", scope: null, file: !267, line: 44, type: !270, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !428) -// CHECK:STDOUT: !419 = !DILocalVariable(arg: 1, scope: !418, type: !34) -// CHECK:STDOUT: !420 = !DILocalVariable(arg: 2, scope: !418, type: !34) -// CHECK:STDOUT: !426 = !DILocation(line: 44, column: 40, scope: !418) -// CHECK:STDOUT: !427 = !DILocation(line: 44, column: 1, scope: !418) -// CHECK:STDOUT: !428 = !{!419, !420} -// CHECK:STDOUT: !429 = distinct !DISubprogram(name: "TestArithmeticRightShift", linkageName: "_CTestArithmeticRightShift.Main", scope: null, file: !267, line: 47, type: !272, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !439) -// CHECK:STDOUT: !430 = !DILocalVariable(arg: 1, scope: !429, type: !34) -// CHECK:STDOUT: !431 = !DILocalVariable(arg: 2, scope: !429, type: !35) -// CHECK:STDOUT: !437 = !DILocation(line: 47, column: 51, scope: !429) -// CHECK:STDOUT: !438 = !DILocation(line: 47, column: 1, scope: !429) -// CHECK:STDOUT: !439 = !{!430, !431} -// CHECK:STDOUT: !440 = distinct !DISubprogram(name: "TestLogicalRightShift", linkageName: "_CTestLogicalRightShift.Main", scope: null, file: !267, line: 50, type: !274, spFlags: DISPFlagDefinition, unit: !268, retainedNodes: !450) -// CHECK:STDOUT: !441 = !DILocalVariable(arg: 1, scope: !440, type: !35) -// CHECK:STDOUT: !442 = !DILocalVariable(arg: 2, scope: !440, type: !35) -// CHECK:STDOUT: !448 = !DILocation(line: 50, column: 48, scope: !440) -// CHECK:STDOUT: !449 = !DILocation(line: 50, column: 1, scope: !440) -// CHECK:STDOUT: !450 = !{!441, !442} +// CHECK:STDOUT: !275 = !{null, !37, !37} +// CHECK:STDOUT: !276 = !DISubroutineType(types: !275) +// CHECK:STDOUT: !277 = distinct !DISubprogram(name: "TestSAdd", linkageName: "_CTestSAdd.Main", scope: null, file: !269, line: 5, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !287) +// CHECK:STDOUT: !278 = !DILocalVariable(arg: 1, scope: !277, type: !36) +// CHECK:STDOUT: !279 = !DILocalVariable(arg: 2, scope: !277, type: !36) +// CHECK:STDOUT: !285 = !DILocation(line: 5, column: 35, scope: !277) +// CHECK:STDOUT: !286 = !DILocation(line: 5, column: 1, scope: !277) +// CHECK:STDOUT: !287 = !{!278, !279} +// CHECK:STDOUT: !288 = distinct !DISubprogram(name: "TestSSub", linkageName: "_CTestSSub.Main", scope: null, file: !269, line: 8, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !298) +// CHECK:STDOUT: !289 = !DILocalVariable(arg: 1, scope: !288, type: !36) +// CHECK:STDOUT: !290 = !DILocalVariable(arg: 2, scope: !288, type: !36) +// CHECK:STDOUT: !296 = !DILocation(line: 8, column: 35, scope: !288) +// CHECK:STDOUT: !297 = !DILocation(line: 8, column: 1, scope: !288) +// CHECK:STDOUT: !298 = !{!289, !290} +// CHECK:STDOUT: !299 = distinct !DISubprogram(name: "TestSMul", linkageName: "_CTestSMul.Main", scope: null, file: !269, line: 11, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !309) +// CHECK:STDOUT: !300 = !DILocalVariable(arg: 1, scope: !299, type: !36) +// CHECK:STDOUT: !301 = !DILocalVariable(arg: 2, scope: !299, type: !36) +// CHECK:STDOUT: !307 = !DILocation(line: 11, column: 35, scope: !299) +// CHECK:STDOUT: !308 = !DILocation(line: 11, column: 1, scope: !299) +// CHECK:STDOUT: !309 = !{!300, !301} +// CHECK:STDOUT: !310 = distinct !DISubprogram(name: "TestSDiv", linkageName: "_CTestSDiv.Main", scope: null, file: !269, line: 14, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !320) +// CHECK:STDOUT: !311 = !DILocalVariable(arg: 1, scope: !310, type: !36) +// CHECK:STDOUT: !312 = !DILocalVariable(arg: 2, scope: !310, type: !36) +// CHECK:STDOUT: !318 = !DILocation(line: 14, column: 35, scope: !310) +// CHECK:STDOUT: !319 = !DILocation(line: 14, column: 1, scope: !310) +// CHECK:STDOUT: !320 = !{!311, !312} +// CHECK:STDOUT: !321 = distinct !DISubprogram(name: "TestSMod", linkageName: "_CTestSMod.Main", scope: null, file: !269, line: 17, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !331) +// CHECK:STDOUT: !322 = !DILocalVariable(arg: 1, scope: !321, type: !36) +// CHECK:STDOUT: !323 = !DILocalVariable(arg: 2, scope: !321, type: !36) +// CHECK:STDOUT: !329 = !DILocation(line: 17, column: 35, scope: !321) +// CHECK:STDOUT: !330 = !DILocation(line: 17, column: 1, scope: !321) +// CHECK:STDOUT: !331 = !{!322, !323} +// CHECK:STDOUT: !332 = distinct !DISubprogram(name: "TestUAdd", linkageName: "_CTestUAdd.Main", scope: null, file: !269, line: 20, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !342) +// CHECK:STDOUT: !333 = !DILocalVariable(arg: 1, scope: !332, type: !36) +// CHECK:STDOUT: !334 = !DILocalVariable(arg: 2, scope: !332, type: !36) +// CHECK:STDOUT: !340 = !DILocation(line: 20, column: 35, scope: !332) +// CHECK:STDOUT: !341 = !DILocation(line: 20, column: 1, scope: !332) +// CHECK:STDOUT: !342 = !{!333, !334} +// CHECK:STDOUT: !343 = distinct !DISubprogram(name: "TestUSub", linkageName: "_CTestUSub.Main", scope: null, file: !269, line: 23, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !353) +// CHECK:STDOUT: !344 = !DILocalVariable(arg: 1, scope: !343, type: !36) +// CHECK:STDOUT: !345 = !DILocalVariable(arg: 2, scope: !343, type: !36) +// CHECK:STDOUT: !351 = !DILocation(line: 23, column: 35, scope: !343) +// CHECK:STDOUT: !352 = !DILocation(line: 23, column: 1, scope: !343) +// CHECK:STDOUT: !353 = !{!344, !345} +// CHECK:STDOUT: !354 = distinct !DISubprogram(name: "TestUMul", linkageName: "_CTestUMul.Main", scope: null, file: !269, line: 26, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !364) +// CHECK:STDOUT: !355 = !DILocalVariable(arg: 1, scope: !354, type: !36) +// CHECK:STDOUT: !356 = !DILocalVariable(arg: 2, scope: !354, type: !36) +// CHECK:STDOUT: !362 = !DILocation(line: 26, column: 35, scope: !354) +// CHECK:STDOUT: !363 = !DILocation(line: 26, column: 1, scope: !354) +// CHECK:STDOUT: !364 = !{!355, !356} +// CHECK:STDOUT: !365 = distinct !DISubprogram(name: "TestUDiv", linkageName: "_CTestUDiv.Main", scope: null, file: !269, line: 29, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !375) +// CHECK:STDOUT: !366 = !DILocalVariable(arg: 1, scope: !365, type: !36) +// CHECK:STDOUT: !367 = !DILocalVariable(arg: 2, scope: !365, type: !36) +// CHECK:STDOUT: !373 = !DILocation(line: 29, column: 35, scope: !365) +// CHECK:STDOUT: !374 = !DILocation(line: 29, column: 1, scope: !365) +// CHECK:STDOUT: !375 = !{!366, !367} +// CHECK:STDOUT: !376 = distinct !DISubprogram(name: "TestUMod", linkageName: "_CTestUMod.Main", scope: null, file: !269, line: 32, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !386) +// CHECK:STDOUT: !377 = !DILocalVariable(arg: 1, scope: !376, type: !36) +// CHECK:STDOUT: !378 = !DILocalVariable(arg: 2, scope: !376, type: !36) +// CHECK:STDOUT: !384 = !DILocation(line: 32, column: 35, scope: !376) +// CHECK:STDOUT: !385 = !DILocation(line: 32, column: 1, scope: !376) +// CHECK:STDOUT: !386 = !{!377, !378} +// CHECK:STDOUT: !387 = distinct !DISubprogram(name: "TestAnd", linkageName: "_CTestAnd.Main", scope: null, file: !269, line: 35, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !397) +// CHECK:STDOUT: !388 = !DILocalVariable(arg: 1, scope: !387, type: !36) +// CHECK:STDOUT: !389 = !DILocalVariable(arg: 2, scope: !387, type: !36) +// CHECK:STDOUT: !395 = !DILocation(line: 35, column: 34, scope: !387) +// CHECK:STDOUT: !396 = !DILocation(line: 35, column: 1, scope: !387) +// CHECK:STDOUT: !397 = !{!388, !389} +// CHECK:STDOUT: !398 = distinct !DISubprogram(name: "TestOr", linkageName: "_CTestOr.Main", scope: null, file: !269, line: 38, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !408) +// CHECK:STDOUT: !399 = !DILocalVariable(arg: 1, scope: !398, type: !36) +// CHECK:STDOUT: !400 = !DILocalVariable(arg: 2, scope: !398, type: !36) +// CHECK:STDOUT: !406 = !DILocation(line: 38, column: 33, scope: !398) +// CHECK:STDOUT: !407 = !DILocation(line: 38, column: 1, scope: !398) +// CHECK:STDOUT: !408 = !{!399, !400} +// CHECK:STDOUT: !409 = distinct !DISubprogram(name: "TestXor", linkageName: "_CTestXor.Main", scope: null, file: !269, line: 41, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !419) +// CHECK:STDOUT: !410 = !DILocalVariable(arg: 1, scope: !409, type: !36) +// CHECK:STDOUT: !411 = !DILocalVariable(arg: 2, scope: !409, type: !36) +// CHECK:STDOUT: !417 = !DILocation(line: 41, column: 34, scope: !409) +// CHECK:STDOUT: !418 = !DILocation(line: 41, column: 1, scope: !409) +// CHECK:STDOUT: !419 = !{!410, !411} +// CHECK:STDOUT: !420 = distinct !DISubprogram(name: "TestLeftShift", linkageName: "_CTestLeftShift.Main", scope: null, file: !269, line: 44, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !430) +// CHECK:STDOUT: !421 = !DILocalVariable(arg: 1, scope: !420, type: !36) +// CHECK:STDOUT: !422 = !DILocalVariable(arg: 2, scope: !420, type: !36) +// CHECK:STDOUT: !428 = !DILocation(line: 44, column: 40, scope: !420) +// CHECK:STDOUT: !429 = !DILocation(line: 44, column: 1, scope: !420) +// CHECK:STDOUT: !430 = !{!421, !422} +// CHECK:STDOUT: !431 = distinct !DISubprogram(name: "TestArithmeticRightShift", linkageName: "_CTestArithmeticRightShift.Main", scope: null, file: !269, line: 47, type: !274, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !441) +// CHECK:STDOUT: !432 = !DILocalVariable(arg: 1, scope: !431, type: !36) +// CHECK:STDOUT: !433 = !DILocalVariable(arg: 2, scope: !431, type: !37) +// CHECK:STDOUT: !439 = !DILocation(line: 47, column: 51, scope: !431) +// CHECK:STDOUT: !440 = !DILocation(line: 47, column: 1, scope: !431) +// CHECK:STDOUT: !441 = !{!432, !433} +// CHECK:STDOUT: !442 = distinct !DISubprogram(name: "TestLogicalRightShift", linkageName: "_CTestLogicalRightShift.Main", scope: null, file: !269, line: 50, type: !276, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !452) +// CHECK:STDOUT: !443 = !DILocalVariable(arg: 1, scope: !442, type: !37) +// CHECK:STDOUT: !444 = !DILocalVariable(arg: 2, scope: !442, type: !37) +// CHECK:STDOUT: !450 = !DILocation(line: 50, column: 48, scope: !442) +// CHECK:STDOUT: !451 = !DILocation(line: 50, column: 1, scope: !442) +// CHECK:STDOUT: !452 = !{!443, !444} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'mixed_shift.carbon' // CHECK:STDOUT: source_filename = "mixed_shift.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestLeftShiftSmaller.Main(i32 %a, i16 %b) #0 !dbg !465 { +// CHECK:STDOUT: define i32 @_CTestLeftShiftSmaller.Main(i32 %a, i16 %b) #0 !dbg !467 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %LeftShiftSmaller.call.rhs = zext i16 %b to i32, !dbg !474 -// CHECK:STDOUT: %LeftShiftSmaller.call = shl i32 %a, %LeftShiftSmaller.call.rhs, !dbg !474 -// CHECK:STDOUT: ret i32 %LeftShiftSmaller.call, !dbg !475 +// CHECK:STDOUT: %LeftShiftSmaller.call.rhs = zext i16 %b to i32, !dbg !476 +// CHECK:STDOUT: %LeftShiftSmaller.call = shl i32 %a, %LeftShiftSmaller.call.rhs, !dbg !476 +// CHECK:STDOUT: ret i32 %LeftShiftSmaller.call, !dbg !477 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestRightShiftSmaller.Main(i32 %a, i16 %b) #0 !dbg !477 { +// CHECK:STDOUT: define i32 @_CTestRightShiftSmaller.Main(i32 %a, i16 %b) #0 !dbg !479 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %RightShiftSmaller.call.rhs = zext i16 %b to i32, !dbg !486 -// CHECK:STDOUT: %RightShiftSmaller.call = ashr i32 %a, %RightShiftSmaller.call.rhs, !dbg !486 -// CHECK:STDOUT: ret i32 %RightShiftSmaller.call, !dbg !487 +// CHECK:STDOUT: %RightShiftSmaller.call.rhs = zext i16 %b to i32, !dbg !488 +// CHECK:STDOUT: %RightShiftSmaller.call = ashr i32 %a, %RightShiftSmaller.call.rhs, !dbg !488 +// CHECK:STDOUT: ret i32 %RightShiftSmaller.call, !dbg !489 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i16 @_CTestLeftShiftLargerII.Main(i16 %a, i32 %b) #0 !dbg !489 { +// CHECK:STDOUT: define i16 @_CTestLeftShiftLargerII.Main(i16 %a, i32 %b) #0 !dbg !491 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %LeftShiftLargerII.call.rhs = trunc i32 %b to i16, !dbg !498 -// CHECK:STDOUT: %LeftShiftLargerII.call = shl i16 %a, %LeftShiftLargerII.call.rhs, !dbg !498 -// CHECK:STDOUT: ret i16 %LeftShiftLargerII.call, !dbg !499 +// CHECK:STDOUT: %LeftShiftLargerII.call.rhs = trunc i32 %b to i16, !dbg !500 +// CHECK:STDOUT: %LeftShiftLargerII.call = shl i16 %a, %LeftShiftLargerII.call.rhs, !dbg !500 +// CHECK:STDOUT: ret i16 %LeftShiftLargerII.call, !dbg !501 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i16 @_CTestRightShiftLargerII.Main(i16 %a, i32 %b) #0 !dbg !501 { +// CHECK:STDOUT: define i16 @_CTestRightShiftLargerII.Main(i16 %a, i32 %b) #0 !dbg !503 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %RightShiftLargerII.call.rhs = trunc i32 %b to i16, !dbg !510 -// CHECK:STDOUT: %RightShiftLargerII.call = ashr i16 %a, %RightShiftLargerII.call.rhs, !dbg !510 -// CHECK:STDOUT: ret i16 %RightShiftLargerII.call, !dbg !511 +// CHECK:STDOUT: %RightShiftLargerII.call.rhs = trunc i32 %b to i16, !dbg !512 +// CHECK:STDOUT: %RightShiftLargerII.call = ashr i16 %a, %RightShiftLargerII.call.rhs, !dbg !512 +// CHECK:STDOUT: ret i16 %RightShiftLargerII.call, !dbg !513 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i16 @_CTestLeftShiftLargerIU.Main(i16 %a, i32 %b) #0 !dbg !513 { +// CHECK:STDOUT: define i16 @_CTestLeftShiftLargerIU.Main(i16 %a, i32 %b) #0 !dbg !515 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %LeftShiftLargerIU.call.rhs = trunc i32 %b to i16, !dbg !522 -// CHECK:STDOUT: %LeftShiftLargerIU.call = shl i16 %a, %LeftShiftLargerIU.call.rhs, !dbg !522 -// CHECK:STDOUT: ret i16 %LeftShiftLargerIU.call, !dbg !523 +// CHECK:STDOUT: %LeftShiftLargerIU.call.rhs = trunc i32 %b to i16, !dbg !524 +// CHECK:STDOUT: %LeftShiftLargerIU.call = shl i16 %a, %LeftShiftLargerIU.call.rhs, !dbg !524 +// CHECK:STDOUT: ret i16 %LeftShiftLargerIU.call, !dbg !525 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i16 @_CTestRightShiftLargerIU.Main(i16 %a, i32 %b) #0 !dbg !525 { +// CHECK:STDOUT: define i16 @_CTestRightShiftLargerIU.Main(i16 %a, i32 %b) #0 !dbg !527 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %RightShiftLargerIU.call.rhs = trunc i32 %b to i16, !dbg !534 -// CHECK:STDOUT: %RightShiftLargerIU.call = ashr i16 %a, %RightShiftLargerIU.call.rhs, !dbg !534 -// CHECK:STDOUT: ret i16 %RightShiftLargerIU.call, !dbg !535 +// CHECK:STDOUT: %RightShiftLargerIU.call.rhs = trunc i32 %b to i16, !dbg !536 +// CHECK:STDOUT: %RightShiftLargerIU.call = ashr i16 %a, %RightShiftLargerIU.call.rhs, !dbg !536 +// CHECK:STDOUT: ret i16 %RightShiftLargerIU.call, !dbg !537 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i16 @_CTestLeftShiftLargerUI.Main(i16 %a, i32 %b) #0 !dbg !537 { +// CHECK:STDOUT: define i16 @_CTestLeftShiftLargerUI.Main(i16 %a, i32 %b) #0 !dbg !539 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %LeftShiftLargerUI.call.rhs = trunc i32 %b to i16, !dbg !546 -// CHECK:STDOUT: %LeftShiftLargerUI.call = shl i16 %a, %LeftShiftLargerUI.call.rhs, !dbg !546 -// CHECK:STDOUT: ret i16 %LeftShiftLargerUI.call, !dbg !547 +// CHECK:STDOUT: %LeftShiftLargerUI.call.rhs = trunc i32 %b to i16, !dbg !548 +// CHECK:STDOUT: %LeftShiftLargerUI.call = shl i16 %a, %LeftShiftLargerUI.call.rhs, !dbg !548 +// CHECK:STDOUT: ret i16 %LeftShiftLargerUI.call, !dbg !549 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i16 @_CTestRightShiftLargerUI.Main(i16 %a, i32 %b) #0 !dbg !549 { +// CHECK:STDOUT: define i16 @_CTestRightShiftLargerUI.Main(i16 %a, i32 %b) #0 !dbg !551 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %RightShiftLargerUI.call.rhs = trunc i32 %b to i16, !dbg !558 -// CHECK:STDOUT: %RightShiftLargerUI.call = lshr i16 %a, %RightShiftLargerUI.call.rhs, !dbg !558 -// CHECK:STDOUT: ret i16 %RightShiftLargerUI.call, !dbg !559 +// CHECK:STDOUT: %RightShiftLargerUI.call.rhs = trunc i32 %b to i16, !dbg !560 +// CHECK:STDOUT: %RightShiftLargerUI.call = lshr i16 %a, %RightShiftLargerUI.call.rhs, !dbg !560 +// CHECK:STDOUT: ret i16 %RightShiftLargerUI.call, !dbg !561 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i16 @_CTestLeftShiftLargerUU.Main(i16 %a, i32 %b) #0 !dbg !561 { +// CHECK:STDOUT: define i16 @_CTestLeftShiftLargerUU.Main(i16 %a, i32 %b) #0 !dbg !563 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %LeftShiftLargerUU.call.rhs = trunc i32 %b to i16, !dbg !570 -// CHECK:STDOUT: %LeftShiftLargerUU.call = shl i16 %a, %LeftShiftLargerUU.call.rhs, !dbg !570 -// CHECK:STDOUT: ret i16 %LeftShiftLargerUU.call, !dbg !571 +// CHECK:STDOUT: %LeftShiftLargerUU.call.rhs = trunc i32 %b to i16, !dbg !572 +// CHECK:STDOUT: %LeftShiftLargerUU.call = shl i16 %a, %LeftShiftLargerUU.call.rhs, !dbg !572 +// CHECK:STDOUT: ret i16 %LeftShiftLargerUU.call, !dbg !573 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i16 @_CTestRightShiftLargerUU.Main(i16 %a, i32 %b) #0 !dbg !573 { +// CHECK:STDOUT: define i16 @_CTestRightShiftLargerUU.Main(i16 %a, i32 %b) #0 !dbg !575 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %RightShiftLargerUU.call.rhs = trunc i32 %b to i16, !dbg !582 -// CHECK:STDOUT: %RightShiftLargerUU.call = lshr i16 %a, %RightShiftLargerUU.call.rhs, !dbg !582 -// CHECK:STDOUT: ret i16 %RightShiftLargerUU.call, !dbg !583 +// CHECK:STDOUT: %RightShiftLargerUU.call.rhs = trunc i32 %b to i16, !dbg !584 +// CHECK:STDOUT: %RightShiftLargerUU.call = lshr i16 %a, %RightShiftLargerUU.call.rhs, !dbg !584 +// CHECK:STDOUT: ret i16 %RightShiftLargerUU.call, !dbg !585 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!452} +// CHECK:STDOUT: !llvm.dbg.cu = !{!454} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !451 = !DIFile(filename: "mixed_shift.carbon", directory: "") -// CHECK:STDOUT: !452 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !451, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !453 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) -// CHECK:STDOUT: !454 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !455 = !{!34, !34, !453} -// CHECK:STDOUT: !456 = !DISubroutineType(types: !455) -// CHECK:STDOUT: !457 = !{!453, !453, !34} +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !453 = !DIFile(filename: "mixed_shift.carbon", directory: "") +// CHECK:STDOUT: !454 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !453, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !455 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) +// CHECK:STDOUT: !456 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !457 = !{!36, !36, !455} // CHECK:STDOUT: !458 = !DISubroutineType(types: !457) -// CHECK:STDOUT: !459 = !{!453, !453, !35} +// CHECK:STDOUT: !459 = !{!455, !455, !36} // CHECK:STDOUT: !460 = !DISubroutineType(types: !459) -// CHECK:STDOUT: !461 = !{!454, !454, !34} +// CHECK:STDOUT: !461 = !{!455, !455, !37} // CHECK:STDOUT: !462 = !DISubroutineType(types: !461) -// CHECK:STDOUT: !463 = !{!454, !454, !35} +// CHECK:STDOUT: !463 = !{!456, !456, !36} // CHECK:STDOUT: !464 = !DISubroutineType(types: !463) -// CHECK:STDOUT: !465 = distinct !DISubprogram(name: "TestLeftShiftSmaller", linkageName: "_CTestLeftShiftSmaller.Main", scope: null, file: !451, line: 5, type: !456, spFlags: DISPFlagDefinition, unit: !452, retainedNodes: !476) -// CHECK:STDOUT: !466 = !DILocalVariable(arg: 1, scope: !465, type: !34) -// CHECK:STDOUT: !467 = !DILocalVariable(arg: 2, scope: !465, type: !453) -// CHECK:STDOUT: !474 = !DILocation(line: 5, column: 57, scope: !465) -// CHECK:STDOUT: !475 = !DILocation(line: 5, column: 50, scope: !465) -// CHECK:STDOUT: !476 = !{!466, !467} -// CHECK:STDOUT: !477 = distinct !DISubprogram(name: "TestRightShiftSmaller", linkageName: "_CTestRightShiftSmaller.Main", scope: null, file: !451, line: 8, type: !456, spFlags: DISPFlagDefinition, unit: !452, retainedNodes: !488) -// CHECK:STDOUT: !478 = !DILocalVariable(arg: 1, scope: !477, type: !34) -// CHECK:STDOUT: !479 = !DILocalVariable(arg: 2, scope: !477, type: !453) -// CHECK:STDOUT: !486 = !DILocation(line: 8, column: 58, scope: !477) -// CHECK:STDOUT: !487 = !DILocation(line: 8, column: 51, scope: !477) -// CHECK:STDOUT: !488 = !{!478, !479} -// CHECK:STDOUT: !489 = distinct !DISubprogram(name: "TestLeftShiftLargerII", linkageName: "_CTestLeftShiftLargerII.Main", scope: null, file: !451, line: 11, type: !458, spFlags: DISPFlagDefinition, unit: !452, retainedNodes: !500) -// CHECK:STDOUT: !490 = !DILocalVariable(arg: 1, scope: !489, type: !453) -// CHECK:STDOUT: !491 = !DILocalVariable(arg: 2, scope: !489, type: !34) -// CHECK:STDOUT: !498 = !DILocation(line: 11, column: 58, scope: !489) -// CHECK:STDOUT: !499 = !DILocation(line: 11, column: 51, scope: !489) -// CHECK:STDOUT: !500 = !{!490, !491} -// CHECK:STDOUT: !501 = distinct !DISubprogram(name: "TestRightShiftLargerII", linkageName: "_CTestRightShiftLargerII.Main", scope: null, file: !451, line: 14, type: !458, spFlags: DISPFlagDefinition, unit: !452, retainedNodes: !512) -// CHECK:STDOUT: !502 = !DILocalVariable(arg: 1, scope: !501, type: !453) -// CHECK:STDOUT: !503 = !DILocalVariable(arg: 2, scope: !501, type: !34) -// CHECK:STDOUT: !510 = !DILocation(line: 14, column: 59, scope: !501) -// CHECK:STDOUT: !511 = !DILocation(line: 14, column: 52, scope: !501) -// CHECK:STDOUT: !512 = !{!502, !503} -// CHECK:STDOUT: !513 = distinct !DISubprogram(name: "TestLeftShiftLargerIU", linkageName: "_CTestLeftShiftLargerIU.Main", scope: null, file: !451, line: 17, type: !460, spFlags: DISPFlagDefinition, unit: !452, retainedNodes: !524) -// CHECK:STDOUT: !514 = !DILocalVariable(arg: 1, scope: !513, type: !453) -// CHECK:STDOUT: !515 = !DILocalVariable(arg: 2, scope: !513, type: !35) -// CHECK:STDOUT: !522 = !DILocation(line: 17, column: 58, scope: !513) -// CHECK:STDOUT: !523 = !DILocation(line: 17, column: 51, scope: !513) -// CHECK:STDOUT: !524 = !{!514, !515} -// CHECK:STDOUT: !525 = distinct !DISubprogram(name: "TestRightShiftLargerIU", linkageName: "_CTestRightShiftLargerIU.Main", scope: null, file: !451, line: 20, type: !460, spFlags: DISPFlagDefinition, unit: !452, retainedNodes: !536) -// CHECK:STDOUT: !526 = !DILocalVariable(arg: 1, scope: !525, type: !453) -// CHECK:STDOUT: !527 = !DILocalVariable(arg: 2, scope: !525, type: !35) -// CHECK:STDOUT: !534 = !DILocation(line: 20, column: 59, scope: !525) -// CHECK:STDOUT: !535 = !DILocation(line: 20, column: 52, scope: !525) -// CHECK:STDOUT: !536 = !{!526, !527} -// CHECK:STDOUT: !537 = distinct !DISubprogram(name: "TestLeftShiftLargerUI", linkageName: "_CTestLeftShiftLargerUI.Main", scope: null, file: !451, line: 23, type: !462, spFlags: DISPFlagDefinition, unit: !452, retainedNodes: !548) -// CHECK:STDOUT: !538 = !DILocalVariable(arg: 1, scope: !537, type: !454) -// CHECK:STDOUT: !539 = !DILocalVariable(arg: 2, scope: !537, type: !34) -// CHECK:STDOUT: !546 = !DILocation(line: 23, column: 58, scope: !537) -// CHECK:STDOUT: !547 = !DILocation(line: 23, column: 51, scope: !537) -// CHECK:STDOUT: !548 = !{!538, !539} -// CHECK:STDOUT: !549 = distinct !DISubprogram(name: "TestRightShiftLargerUI", linkageName: "_CTestRightShiftLargerUI.Main", scope: null, file: !451, line: 26, type: !462, spFlags: DISPFlagDefinition, unit: !452, retainedNodes: !560) -// CHECK:STDOUT: !550 = !DILocalVariable(arg: 1, scope: !549, type: !454) -// CHECK:STDOUT: !551 = !DILocalVariable(arg: 2, scope: !549, type: !34) -// CHECK:STDOUT: !558 = !DILocation(line: 26, column: 59, scope: !549) -// CHECK:STDOUT: !559 = !DILocation(line: 26, column: 52, scope: !549) -// CHECK:STDOUT: !560 = !{!550, !551} -// CHECK:STDOUT: !561 = distinct !DISubprogram(name: "TestLeftShiftLargerUU", linkageName: "_CTestLeftShiftLargerUU.Main", scope: null, file: !451, line: 29, type: !464, spFlags: DISPFlagDefinition, unit: !452, retainedNodes: !572) -// CHECK:STDOUT: !562 = !DILocalVariable(arg: 1, scope: !561, type: !454) -// CHECK:STDOUT: !563 = !DILocalVariable(arg: 2, scope: !561, type: !35) -// CHECK:STDOUT: !570 = !DILocation(line: 29, column: 58, scope: !561) -// CHECK:STDOUT: !571 = !DILocation(line: 29, column: 51, scope: !561) -// CHECK:STDOUT: !572 = !{!562, !563} -// CHECK:STDOUT: !573 = distinct !DISubprogram(name: "TestRightShiftLargerUU", linkageName: "_CTestRightShiftLargerUU.Main", scope: null, file: !451, line: 32, type: !464, spFlags: DISPFlagDefinition, unit: !452, retainedNodes: !584) -// CHECK:STDOUT: !574 = !DILocalVariable(arg: 1, scope: !573, type: !454) -// CHECK:STDOUT: !575 = !DILocalVariable(arg: 2, scope: !573, type: !35) -// CHECK:STDOUT: !582 = !DILocation(line: 32, column: 59, scope: !573) -// CHECK:STDOUT: !583 = !DILocation(line: 32, column: 52, scope: !573) -// CHECK:STDOUT: !584 = !{!574, !575} +// CHECK:STDOUT: !465 = !{!456, !456, !37} +// CHECK:STDOUT: !466 = !DISubroutineType(types: !465) +// CHECK:STDOUT: !467 = distinct !DISubprogram(name: "TestLeftShiftSmaller", linkageName: "_CTestLeftShiftSmaller.Main", scope: null, file: !453, line: 5, type: !458, spFlags: DISPFlagDefinition, unit: !454, retainedNodes: !478) +// CHECK:STDOUT: !468 = !DILocalVariable(arg: 1, scope: !467, type: !36) +// CHECK:STDOUT: !469 = !DILocalVariable(arg: 2, scope: !467, type: !455) +// CHECK:STDOUT: !476 = !DILocation(line: 5, column: 57, scope: !467) +// CHECK:STDOUT: !477 = !DILocation(line: 5, column: 50, scope: !467) +// CHECK:STDOUT: !478 = !{!468, !469} +// CHECK:STDOUT: !479 = distinct !DISubprogram(name: "TestRightShiftSmaller", linkageName: "_CTestRightShiftSmaller.Main", scope: null, file: !453, line: 8, type: !458, spFlags: DISPFlagDefinition, unit: !454, retainedNodes: !490) +// CHECK:STDOUT: !480 = !DILocalVariable(arg: 1, scope: !479, type: !36) +// CHECK:STDOUT: !481 = !DILocalVariable(arg: 2, scope: !479, type: !455) +// CHECK:STDOUT: !488 = !DILocation(line: 8, column: 58, scope: !479) +// CHECK:STDOUT: !489 = !DILocation(line: 8, column: 51, scope: !479) +// CHECK:STDOUT: !490 = !{!480, !481} +// CHECK:STDOUT: !491 = distinct !DISubprogram(name: "TestLeftShiftLargerII", linkageName: "_CTestLeftShiftLargerII.Main", scope: null, file: !453, line: 11, type: !460, spFlags: DISPFlagDefinition, unit: !454, retainedNodes: !502) +// CHECK:STDOUT: !492 = !DILocalVariable(arg: 1, scope: !491, type: !455) +// CHECK:STDOUT: !493 = !DILocalVariable(arg: 2, scope: !491, type: !36) +// CHECK:STDOUT: !500 = !DILocation(line: 11, column: 58, scope: !491) +// CHECK:STDOUT: !501 = !DILocation(line: 11, column: 51, scope: !491) +// CHECK:STDOUT: !502 = !{!492, !493} +// CHECK:STDOUT: !503 = distinct !DISubprogram(name: "TestRightShiftLargerII", linkageName: "_CTestRightShiftLargerII.Main", scope: null, file: !453, line: 14, type: !460, spFlags: DISPFlagDefinition, unit: !454, retainedNodes: !514) +// CHECK:STDOUT: !504 = !DILocalVariable(arg: 1, scope: !503, type: !455) +// CHECK:STDOUT: !505 = !DILocalVariable(arg: 2, scope: !503, type: !36) +// CHECK:STDOUT: !512 = !DILocation(line: 14, column: 59, scope: !503) +// CHECK:STDOUT: !513 = !DILocation(line: 14, column: 52, scope: !503) +// CHECK:STDOUT: !514 = !{!504, !505} +// CHECK:STDOUT: !515 = distinct !DISubprogram(name: "TestLeftShiftLargerIU", linkageName: "_CTestLeftShiftLargerIU.Main", scope: null, file: !453, line: 17, type: !462, spFlags: DISPFlagDefinition, unit: !454, retainedNodes: !526) +// CHECK:STDOUT: !516 = !DILocalVariable(arg: 1, scope: !515, type: !455) +// CHECK:STDOUT: !517 = !DILocalVariable(arg: 2, scope: !515, type: !37) +// CHECK:STDOUT: !524 = !DILocation(line: 17, column: 58, scope: !515) +// CHECK:STDOUT: !525 = !DILocation(line: 17, column: 51, scope: !515) +// CHECK:STDOUT: !526 = !{!516, !517} +// CHECK:STDOUT: !527 = distinct !DISubprogram(name: "TestRightShiftLargerIU", linkageName: "_CTestRightShiftLargerIU.Main", scope: null, file: !453, line: 20, type: !462, spFlags: DISPFlagDefinition, unit: !454, retainedNodes: !538) +// CHECK:STDOUT: !528 = !DILocalVariable(arg: 1, scope: !527, type: !455) +// CHECK:STDOUT: !529 = !DILocalVariable(arg: 2, scope: !527, type: !37) +// CHECK:STDOUT: !536 = !DILocation(line: 20, column: 59, scope: !527) +// CHECK:STDOUT: !537 = !DILocation(line: 20, column: 52, scope: !527) +// CHECK:STDOUT: !538 = !{!528, !529} +// CHECK:STDOUT: !539 = distinct !DISubprogram(name: "TestLeftShiftLargerUI", linkageName: "_CTestLeftShiftLargerUI.Main", scope: null, file: !453, line: 23, type: !464, spFlags: DISPFlagDefinition, unit: !454, retainedNodes: !550) +// CHECK:STDOUT: !540 = !DILocalVariable(arg: 1, scope: !539, type: !456) +// CHECK:STDOUT: !541 = !DILocalVariable(arg: 2, scope: !539, type: !36) +// CHECK:STDOUT: !548 = !DILocation(line: 23, column: 58, scope: !539) +// CHECK:STDOUT: !549 = !DILocation(line: 23, column: 51, scope: !539) +// CHECK:STDOUT: !550 = !{!540, !541} +// CHECK:STDOUT: !551 = distinct !DISubprogram(name: "TestRightShiftLargerUI", linkageName: "_CTestRightShiftLargerUI.Main", scope: null, file: !453, line: 26, type: !464, spFlags: DISPFlagDefinition, unit: !454, retainedNodes: !562) +// CHECK:STDOUT: !552 = !DILocalVariable(arg: 1, scope: !551, type: !456) +// CHECK:STDOUT: !553 = !DILocalVariable(arg: 2, scope: !551, type: !36) +// CHECK:STDOUT: !560 = !DILocation(line: 26, column: 59, scope: !551) +// CHECK:STDOUT: !561 = !DILocation(line: 26, column: 52, scope: !551) +// CHECK:STDOUT: !562 = !{!552, !553} +// CHECK:STDOUT: !563 = distinct !DISubprogram(name: "TestLeftShiftLargerUU", linkageName: "_CTestLeftShiftLargerUU.Main", scope: null, file: !453, line: 29, type: !466, spFlags: DISPFlagDefinition, unit: !454, retainedNodes: !574) +// CHECK:STDOUT: !564 = !DILocalVariable(arg: 1, scope: !563, type: !456) +// CHECK:STDOUT: !565 = !DILocalVariable(arg: 2, scope: !563, type: !37) +// CHECK:STDOUT: !572 = !DILocation(line: 29, column: 58, scope: !563) +// CHECK:STDOUT: !573 = !DILocation(line: 29, column: 51, scope: !563) +// CHECK:STDOUT: !574 = !{!564, !565} +// CHECK:STDOUT: !575 = distinct !DISubprogram(name: "TestRightShiftLargerUU", linkageName: "_CTestRightShiftLargerUU.Main", scope: null, file: !453, line: 32, type: !466, spFlags: DISPFlagDefinition, unit: !454, retainedNodes: !586) +// CHECK:STDOUT: !576 = !DILocalVariable(arg: 1, scope: !575, type: !456) +// CHECK:STDOUT: !577 = !DILocalVariable(arg: 2, scope: !575, type: !37) +// CHECK:STDOUT: !584 = !DILocation(line: 32, column: 59, scope: !575) +// CHECK:STDOUT: !585 = !DILocation(line: 32, column: 52, scope: !575) +// CHECK:STDOUT: !586 = !{!576, !577} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'mixed_compare.carbon' // CHECK:STDOUT: source_filename = "mixed_compare.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestEq_u16_u32.Main(i16 %a, i32 %b) #0 !dbg !597 { +// CHECK:STDOUT: define i1 @_CTestEq_u16_u32.Main(i16 %a, i32 %b) #0 !dbg !599 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Eq_u16_u32.call.lhs = zext i16 %a to i32, !dbg !606 -// CHECK:STDOUT: %Eq_u16_u32.call = icmp eq i32 %Eq_u16_u32.call.lhs, %b, !dbg !606 -// CHECK:STDOUT: ret i1 %Eq_u16_u32.call, !dbg !607 +// CHECK:STDOUT: %Eq_u16_u32.call.lhs = zext i16 %a to i32, !dbg !608 +// CHECK:STDOUT: %Eq_u16_u32.call = icmp eq i32 %Eq_u16_u32.call.lhs, %b, !dbg !608 +// CHECK:STDOUT: ret i1 %Eq_u16_u32.call, !dbg !609 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestEq_i16_u32.Main(i16 %a, i32 %b) #0 !dbg !609 { +// CHECK:STDOUT: define i1 @_CTestEq_i16_u32.Main(i16 %a, i32 %b) #0 !dbg !611 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Eq_i16_u32.call.lhs = sext i16 %a to i33, !dbg !618 -// CHECK:STDOUT: %Eq_i16_u32.call.rhs = zext i32 %b to i33, !dbg !618 -// CHECK:STDOUT: %Eq_i16_u32.call = icmp eq i33 %Eq_i16_u32.call.lhs, %Eq_i16_u32.call.rhs, !dbg !618 -// CHECK:STDOUT: ret i1 %Eq_i16_u32.call, !dbg !619 +// CHECK:STDOUT: %Eq_i16_u32.call.lhs = sext i16 %a to i33, !dbg !620 +// CHECK:STDOUT: %Eq_i16_u32.call.rhs = zext i32 %b to i33, !dbg !620 +// CHECK:STDOUT: %Eq_i16_u32.call = icmp eq i33 %Eq_i16_u32.call.lhs, %Eq_i16_u32.call.rhs, !dbg !620 +// CHECK:STDOUT: ret i1 %Eq_i16_u32.call, !dbg !621 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestEq_u16_i32.Main(i16 %a, i32 %b) #0 !dbg !621 { +// CHECK:STDOUT: define i1 @_CTestEq_u16_i32.Main(i16 %a, i32 %b) #0 !dbg !623 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Eq_u16_i32.call.lhs = zext i16 %a to i32, !dbg !630 -// CHECK:STDOUT: %Eq_u16_i32.call = icmp eq i32 %Eq_u16_i32.call.lhs, %b, !dbg !630 -// CHECK:STDOUT: ret i1 %Eq_u16_i32.call, !dbg !631 +// CHECK:STDOUT: %Eq_u16_i32.call.lhs = zext i16 %a to i32, !dbg !632 +// CHECK:STDOUT: %Eq_u16_i32.call = icmp eq i32 %Eq_u16_i32.call.lhs, %b, !dbg !632 +// CHECK:STDOUT: ret i1 %Eq_u16_i32.call, !dbg !633 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestEq_i16_i32.Main(i16 %a, i32 %b) #0 !dbg !633 { +// CHECK:STDOUT: define i1 @_CTestEq_i16_i32.Main(i16 %a, i32 %b) #0 !dbg !635 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Eq_i16_i32.call.lhs = sext i16 %a to i32, !dbg !642 -// CHECK:STDOUT: %Eq_i16_i32.call = icmp eq i32 %Eq_i16_i32.call.lhs, %b, !dbg !642 -// CHECK:STDOUT: ret i1 %Eq_i16_i32.call, !dbg !643 +// CHECK:STDOUT: %Eq_i16_i32.call.lhs = sext i16 %a to i32, !dbg !644 +// CHECK:STDOUT: %Eq_i16_i32.call = icmp eq i32 %Eq_i16_i32.call.lhs, %b, !dbg !644 +// CHECK:STDOUT: ret i1 %Eq_i16_i32.call, !dbg !645 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestEq_i32_u32.Main(i32 %a, i32 %b) #0 !dbg !645 { +// CHECK:STDOUT: define i1 @_CTestEq_i32_u32.Main(i32 %a, i32 %b) #0 !dbg !647 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Eq_i32_u32.call.lhs = sext i32 %a to i33, !dbg !654 -// CHECK:STDOUT: %Eq_i32_u32.call.rhs = zext i32 %b to i33, !dbg !654 -// CHECK:STDOUT: %Eq_i32_u32.call = icmp eq i33 %Eq_i32_u32.call.lhs, %Eq_i32_u32.call.rhs, !dbg !654 -// CHECK:STDOUT: ret i1 %Eq_i32_u32.call, !dbg !655 +// CHECK:STDOUT: %Eq_i32_u32.call.lhs = sext i32 %a to i33, !dbg !656 +// CHECK:STDOUT: %Eq_i32_u32.call.rhs = zext i32 %b to i33, !dbg !656 +// CHECK:STDOUT: %Eq_i32_u32.call = icmp eq i33 %Eq_i32_u32.call.lhs, %Eq_i32_u32.call.rhs, !dbg !656 +// CHECK:STDOUT: ret i1 %Eq_i32_u32.call, !dbg !657 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestLess_u16_u32.Main(i16 %a, i32 %b) #0 !dbg !657 { +// CHECK:STDOUT: define i1 @_CTestLess_u16_u32.Main(i16 %a, i32 %b) #0 !dbg !659 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Less_u16_u32.call.lhs = zext i16 %a to i32, !dbg !666 -// CHECK:STDOUT: %Less_u16_u32.call = icmp ult i32 %Less_u16_u32.call.lhs, %b, !dbg !666 -// CHECK:STDOUT: ret i1 %Less_u16_u32.call, !dbg !667 +// CHECK:STDOUT: %Less_u16_u32.call.lhs = zext i16 %a to i32, !dbg !668 +// CHECK:STDOUT: %Less_u16_u32.call = icmp ult i32 %Less_u16_u32.call.lhs, %b, !dbg !668 +// CHECK:STDOUT: ret i1 %Less_u16_u32.call, !dbg !669 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestLess_i16_u32.Main(i16 %a, i32 %b) #0 !dbg !669 { +// CHECK:STDOUT: define i1 @_CTestLess_i16_u32.Main(i16 %a, i32 %b) #0 !dbg !671 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Less_i16_u32.call.lhs = sext i16 %a to i33, !dbg !678 -// CHECK:STDOUT: %Less_i16_u32.call.rhs = zext i32 %b to i33, !dbg !678 -// CHECK:STDOUT: %Less_i16_u32.call = icmp slt i33 %Less_i16_u32.call.lhs, %Less_i16_u32.call.rhs, !dbg !678 -// CHECK:STDOUT: ret i1 %Less_i16_u32.call, !dbg !679 +// CHECK:STDOUT: %Less_i16_u32.call.lhs = sext i16 %a to i33, !dbg !680 +// CHECK:STDOUT: %Less_i16_u32.call.rhs = zext i32 %b to i33, !dbg !680 +// CHECK:STDOUT: %Less_i16_u32.call = icmp slt i33 %Less_i16_u32.call.lhs, %Less_i16_u32.call.rhs, !dbg !680 +// CHECK:STDOUT: ret i1 %Less_i16_u32.call, !dbg !681 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestLess_u16_i32.Main(i16 %a, i32 %b) #0 !dbg !681 { +// CHECK:STDOUT: define i1 @_CTestLess_u16_i32.Main(i16 %a, i32 %b) #0 !dbg !683 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Less_u16_i32.call.lhs = zext i16 %a to i32, !dbg !690 -// CHECK:STDOUT: %Less_u16_i32.call = icmp slt i32 %Less_u16_i32.call.lhs, %b, !dbg !690 -// CHECK:STDOUT: ret i1 %Less_u16_i32.call, !dbg !691 +// CHECK:STDOUT: %Less_u16_i32.call.lhs = zext i16 %a to i32, !dbg !692 +// CHECK:STDOUT: %Less_u16_i32.call = icmp slt i32 %Less_u16_i32.call.lhs, %b, !dbg !692 +// CHECK:STDOUT: ret i1 %Less_u16_i32.call, !dbg !693 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestLess_i16_i32.Main(i16 %a, i32 %b) #0 !dbg !693 { +// CHECK:STDOUT: define i1 @_CTestLess_i16_i32.Main(i16 %a, i32 %b) #0 !dbg !695 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Less_i16_i32.call.lhs = sext i16 %a to i32, !dbg !702 -// CHECK:STDOUT: %Less_i16_i32.call = icmp slt i32 %Less_i16_i32.call.lhs, %b, !dbg !702 -// CHECK:STDOUT: ret i1 %Less_i16_i32.call, !dbg !703 +// CHECK:STDOUT: %Less_i16_i32.call.lhs = sext i16 %a to i32, !dbg !704 +// CHECK:STDOUT: %Less_i16_i32.call = icmp slt i32 %Less_i16_i32.call.lhs, %b, !dbg !704 +// CHECK:STDOUT: ret i1 %Less_i16_i32.call, !dbg !705 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestLess_i32_u32.Main(i32 %a, i32 %b) #0 !dbg !705 { +// CHECK:STDOUT: define i1 @_CTestLess_i32_u32.Main(i32 %a, i32 %b) #0 !dbg !707 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Less_i32_u32.call.lhs = sext i32 %a to i33, !dbg !714 -// CHECK:STDOUT: %Less_i32_u32.call.rhs = zext i32 %b to i33, !dbg !714 -// CHECK:STDOUT: %Less_i32_u32.call = icmp slt i33 %Less_i32_u32.call.lhs, %Less_i32_u32.call.rhs, !dbg !714 -// CHECK:STDOUT: ret i1 %Less_i32_u32.call, !dbg !715 +// CHECK:STDOUT: %Less_i32_u32.call.lhs = sext i32 %a to i33, !dbg !716 +// CHECK:STDOUT: %Less_i32_u32.call.rhs = zext i32 %b to i33, !dbg !716 +// CHECK:STDOUT: %Less_i32_u32.call = icmp slt i33 %Less_i32_u32.call.lhs, %Less_i32_u32.call.rhs, !dbg !716 +// CHECK:STDOUT: ret i1 %Less_i32_u32.call, !dbg !717 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!586} +// CHECK:STDOUT: !llvm.dbg.cu = !{!588} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !453 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) -// CHECK:STDOUT: !454 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !585 = !DIFile(filename: "mixed_compare.carbon", directory: "") -// CHECK:STDOUT: !586 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !585, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !587 = !{!42, !454, !35} -// CHECK:STDOUT: !588 = !DISubroutineType(types: !587) -// CHECK:STDOUT: !589 = !{!42, !453, !35} +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !455 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) +// CHECK:STDOUT: !456 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !587 = !DIFile(filename: "mixed_compare.carbon", directory: "") +// CHECK:STDOUT: !588 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !587, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !589 = !{!44, !456, !37} // CHECK:STDOUT: !590 = !DISubroutineType(types: !589) -// CHECK:STDOUT: !591 = !{!42, !454, !34} +// CHECK:STDOUT: !591 = !{!44, !455, !37} // CHECK:STDOUT: !592 = !DISubroutineType(types: !591) -// CHECK:STDOUT: !593 = !{!42, !453, !34} +// CHECK:STDOUT: !593 = !{!44, !456, !36} // CHECK:STDOUT: !594 = !DISubroutineType(types: !593) -// CHECK:STDOUT: !595 = !{!42, !34, !35} +// CHECK:STDOUT: !595 = !{!44, !455, !36} // CHECK:STDOUT: !596 = !DISubroutineType(types: !595) -// CHECK:STDOUT: !597 = distinct !DISubprogram(name: "TestEq_u16_u32", linkageName: "_CTestEq_u16_u32.Main", scope: null, file: !585, line: 10, type: !588, spFlags: DISPFlagDefinition, unit: !586, retainedNodes: !608) -// CHECK:STDOUT: !598 = !DILocalVariable(arg: 1, scope: !597, type: !454) -// CHECK:STDOUT: !599 = !DILocalVariable(arg: 2, scope: !597, type: !35) -// CHECK:STDOUT: !606 = !DILocation(line: 10, column: 52, scope: !597) -// CHECK:STDOUT: !607 = !DILocation(line: 10, column: 45, scope: !597) -// CHECK:STDOUT: !608 = !{!598, !599} -// CHECK:STDOUT: !609 = distinct !DISubprogram(name: "TestEq_i16_u32", linkageName: "_CTestEq_i16_u32.Main", scope: null, file: !585, line: 11, type: !590, spFlags: DISPFlagDefinition, unit: !586, retainedNodes: !620) -// CHECK:STDOUT: !610 = !DILocalVariable(arg: 1, scope: !609, type: !453) -// CHECK:STDOUT: !611 = !DILocalVariable(arg: 2, scope: !609, type: !35) -// CHECK:STDOUT: !618 = !DILocation(line: 11, column: 52, scope: !609) -// CHECK:STDOUT: !619 = !DILocation(line: 11, column: 45, scope: !609) -// CHECK:STDOUT: !620 = !{!610, !611} -// CHECK:STDOUT: !621 = distinct !DISubprogram(name: "TestEq_u16_i32", linkageName: "_CTestEq_u16_i32.Main", scope: null, file: !585, line: 12, type: !592, spFlags: DISPFlagDefinition, unit: !586, retainedNodes: !632) -// CHECK:STDOUT: !622 = !DILocalVariable(arg: 1, scope: !621, type: !454) -// CHECK:STDOUT: !623 = !DILocalVariable(arg: 2, scope: !621, type: !34) -// CHECK:STDOUT: !630 = !DILocation(line: 12, column: 52, scope: !621) -// CHECK:STDOUT: !631 = !DILocation(line: 12, column: 45, scope: !621) -// CHECK:STDOUT: !632 = !{!622, !623} -// CHECK:STDOUT: !633 = distinct !DISubprogram(name: "TestEq_i16_i32", linkageName: "_CTestEq_i16_i32.Main", scope: null, file: !585, line: 13, type: !594, spFlags: DISPFlagDefinition, unit: !586, retainedNodes: !644) -// CHECK:STDOUT: !634 = !DILocalVariable(arg: 1, scope: !633, type: !453) -// CHECK:STDOUT: !635 = !DILocalVariable(arg: 2, scope: !633, type: !34) -// CHECK:STDOUT: !642 = !DILocation(line: 13, column: 52, scope: !633) -// CHECK:STDOUT: !643 = !DILocation(line: 13, column: 45, scope: !633) -// CHECK:STDOUT: !644 = !{!634, !635} -// CHECK:STDOUT: !645 = distinct !DISubprogram(name: "TestEq_i32_u32", linkageName: "_CTestEq_i32_u32.Main", scope: null, file: !585, line: 14, type: !596, spFlags: DISPFlagDefinition, unit: !586, retainedNodes: !656) -// CHECK:STDOUT: !646 = !DILocalVariable(arg: 1, scope: !645, type: !34) -// CHECK:STDOUT: !647 = !DILocalVariable(arg: 2, scope: !645, type: !35) -// CHECK:STDOUT: !654 = !DILocation(line: 14, column: 52, scope: !645) -// CHECK:STDOUT: !655 = !DILocation(line: 14, column: 45, scope: !645) -// CHECK:STDOUT: !656 = !{!646, !647} -// CHECK:STDOUT: !657 = distinct !DISubprogram(name: "TestLess_u16_u32", linkageName: "_CTestLess_u16_u32.Main", scope: null, file: !585, line: 22, type: !588, spFlags: DISPFlagDefinition, unit: !586, retainedNodes: !668) -// CHECK:STDOUT: !658 = !DILocalVariable(arg: 1, scope: !657, type: !454) -// CHECK:STDOUT: !659 = !DILocalVariable(arg: 2, scope: !657, type: !35) -// CHECK:STDOUT: !666 = !DILocation(line: 22, column: 54, scope: !657) -// CHECK:STDOUT: !667 = !DILocation(line: 22, column: 47, scope: !657) -// CHECK:STDOUT: !668 = !{!658, !659} -// CHECK:STDOUT: !669 = distinct !DISubprogram(name: "TestLess_i16_u32", linkageName: "_CTestLess_i16_u32.Main", scope: null, file: !585, line: 23, type: !590, spFlags: DISPFlagDefinition, unit: !586, retainedNodes: !680) -// CHECK:STDOUT: !670 = !DILocalVariable(arg: 1, scope: !669, type: !453) -// CHECK:STDOUT: !671 = !DILocalVariable(arg: 2, scope: !669, type: !35) -// CHECK:STDOUT: !678 = !DILocation(line: 23, column: 54, scope: !669) -// CHECK:STDOUT: !679 = !DILocation(line: 23, column: 47, scope: !669) -// CHECK:STDOUT: !680 = !{!670, !671} -// CHECK:STDOUT: !681 = distinct !DISubprogram(name: "TestLess_u16_i32", linkageName: "_CTestLess_u16_i32.Main", scope: null, file: !585, line: 24, type: !592, spFlags: DISPFlagDefinition, unit: !586, retainedNodes: !692) -// CHECK:STDOUT: !682 = !DILocalVariable(arg: 1, scope: !681, type: !454) -// CHECK:STDOUT: !683 = !DILocalVariable(arg: 2, scope: !681, type: !34) -// CHECK:STDOUT: !690 = !DILocation(line: 24, column: 54, scope: !681) -// CHECK:STDOUT: !691 = !DILocation(line: 24, column: 47, scope: !681) -// CHECK:STDOUT: !692 = !{!682, !683} -// CHECK:STDOUT: !693 = distinct !DISubprogram(name: "TestLess_i16_i32", linkageName: "_CTestLess_i16_i32.Main", scope: null, file: !585, line: 25, type: !594, spFlags: DISPFlagDefinition, unit: !586, retainedNodes: !704) -// CHECK:STDOUT: !694 = !DILocalVariable(arg: 1, scope: !693, type: !453) -// CHECK:STDOUT: !695 = !DILocalVariable(arg: 2, scope: !693, type: !34) -// CHECK:STDOUT: !702 = !DILocation(line: 25, column: 54, scope: !693) -// CHECK:STDOUT: !703 = !DILocation(line: 25, column: 47, scope: !693) -// CHECK:STDOUT: !704 = !{!694, !695} -// CHECK:STDOUT: !705 = distinct !DISubprogram(name: "TestLess_i32_u32", linkageName: "_CTestLess_i32_u32.Main", scope: null, file: !585, line: 26, type: !596, spFlags: DISPFlagDefinition, unit: !586, retainedNodes: !716) -// CHECK:STDOUT: !706 = !DILocalVariable(arg: 1, scope: !705, type: !34) -// CHECK:STDOUT: !707 = !DILocalVariable(arg: 2, scope: !705, type: !35) -// CHECK:STDOUT: !714 = !DILocation(line: 26, column: 54, scope: !705) -// CHECK:STDOUT: !715 = !DILocation(line: 26, column: 47, scope: !705) -// CHECK:STDOUT: !716 = !{!706, !707} +// CHECK:STDOUT: !597 = !{!44, !36, !37} +// CHECK:STDOUT: !598 = !DISubroutineType(types: !597) +// CHECK:STDOUT: !599 = distinct !DISubprogram(name: "TestEq_u16_u32", linkageName: "_CTestEq_u16_u32.Main", scope: null, file: !587, line: 10, type: !590, spFlags: DISPFlagDefinition, unit: !588, retainedNodes: !610) +// CHECK:STDOUT: !600 = !DILocalVariable(arg: 1, scope: !599, type: !456) +// CHECK:STDOUT: !601 = !DILocalVariable(arg: 2, scope: !599, type: !37) +// CHECK:STDOUT: !608 = !DILocation(line: 10, column: 52, scope: !599) +// CHECK:STDOUT: !609 = !DILocation(line: 10, column: 45, scope: !599) +// CHECK:STDOUT: !610 = !{!600, !601} +// CHECK:STDOUT: !611 = distinct !DISubprogram(name: "TestEq_i16_u32", linkageName: "_CTestEq_i16_u32.Main", scope: null, file: !587, line: 11, type: !592, spFlags: DISPFlagDefinition, unit: !588, retainedNodes: !622) +// CHECK:STDOUT: !612 = !DILocalVariable(arg: 1, scope: !611, type: !455) +// CHECK:STDOUT: !613 = !DILocalVariable(arg: 2, scope: !611, type: !37) +// CHECK:STDOUT: !620 = !DILocation(line: 11, column: 52, scope: !611) +// CHECK:STDOUT: !621 = !DILocation(line: 11, column: 45, scope: !611) +// CHECK:STDOUT: !622 = !{!612, !613} +// CHECK:STDOUT: !623 = distinct !DISubprogram(name: "TestEq_u16_i32", linkageName: "_CTestEq_u16_i32.Main", scope: null, file: !587, line: 12, type: !594, spFlags: DISPFlagDefinition, unit: !588, retainedNodes: !634) +// CHECK:STDOUT: !624 = !DILocalVariable(arg: 1, scope: !623, type: !456) +// CHECK:STDOUT: !625 = !DILocalVariable(arg: 2, scope: !623, type: !36) +// CHECK:STDOUT: !632 = !DILocation(line: 12, column: 52, scope: !623) +// CHECK:STDOUT: !633 = !DILocation(line: 12, column: 45, scope: !623) +// CHECK:STDOUT: !634 = !{!624, !625} +// CHECK:STDOUT: !635 = distinct !DISubprogram(name: "TestEq_i16_i32", linkageName: "_CTestEq_i16_i32.Main", scope: null, file: !587, line: 13, type: !596, spFlags: DISPFlagDefinition, unit: !588, retainedNodes: !646) +// CHECK:STDOUT: !636 = !DILocalVariable(arg: 1, scope: !635, type: !455) +// CHECK:STDOUT: !637 = !DILocalVariable(arg: 2, scope: !635, type: !36) +// CHECK:STDOUT: !644 = !DILocation(line: 13, column: 52, scope: !635) +// CHECK:STDOUT: !645 = !DILocation(line: 13, column: 45, scope: !635) +// CHECK:STDOUT: !646 = !{!636, !637} +// CHECK:STDOUT: !647 = distinct !DISubprogram(name: "TestEq_i32_u32", linkageName: "_CTestEq_i32_u32.Main", scope: null, file: !587, line: 14, type: !598, spFlags: DISPFlagDefinition, unit: !588, retainedNodes: !658) +// CHECK:STDOUT: !648 = !DILocalVariable(arg: 1, scope: !647, type: !36) +// CHECK:STDOUT: !649 = !DILocalVariable(arg: 2, scope: !647, type: !37) +// CHECK:STDOUT: !656 = !DILocation(line: 14, column: 52, scope: !647) +// CHECK:STDOUT: !657 = !DILocation(line: 14, column: 45, scope: !647) +// CHECK:STDOUT: !658 = !{!648, !649} +// CHECK:STDOUT: !659 = distinct !DISubprogram(name: "TestLess_u16_u32", linkageName: "_CTestLess_u16_u32.Main", scope: null, file: !587, line: 22, type: !590, spFlags: DISPFlagDefinition, unit: !588, retainedNodes: !670) +// CHECK:STDOUT: !660 = !DILocalVariable(arg: 1, scope: !659, type: !456) +// CHECK:STDOUT: !661 = !DILocalVariable(arg: 2, scope: !659, type: !37) +// CHECK:STDOUT: !668 = !DILocation(line: 22, column: 54, scope: !659) +// CHECK:STDOUT: !669 = !DILocation(line: 22, column: 47, scope: !659) +// CHECK:STDOUT: !670 = !{!660, !661} +// CHECK:STDOUT: !671 = distinct !DISubprogram(name: "TestLess_i16_u32", linkageName: "_CTestLess_i16_u32.Main", scope: null, file: !587, line: 23, type: !592, spFlags: DISPFlagDefinition, unit: !588, retainedNodes: !682) +// CHECK:STDOUT: !672 = !DILocalVariable(arg: 1, scope: !671, type: !455) +// CHECK:STDOUT: !673 = !DILocalVariable(arg: 2, scope: !671, type: !37) +// CHECK:STDOUT: !680 = !DILocation(line: 23, column: 54, scope: !671) +// CHECK:STDOUT: !681 = !DILocation(line: 23, column: 47, scope: !671) +// CHECK:STDOUT: !682 = !{!672, !673} +// CHECK:STDOUT: !683 = distinct !DISubprogram(name: "TestLess_u16_i32", linkageName: "_CTestLess_u16_i32.Main", scope: null, file: !587, line: 24, type: !594, spFlags: DISPFlagDefinition, unit: !588, retainedNodes: !694) +// CHECK:STDOUT: !684 = !DILocalVariable(arg: 1, scope: !683, type: !456) +// CHECK:STDOUT: !685 = !DILocalVariable(arg: 2, scope: !683, type: !36) +// CHECK:STDOUT: !692 = !DILocation(line: 24, column: 54, scope: !683) +// CHECK:STDOUT: !693 = !DILocation(line: 24, column: 47, scope: !683) +// CHECK:STDOUT: !694 = !{!684, !685} +// CHECK:STDOUT: !695 = distinct !DISubprogram(name: "TestLess_i16_i32", linkageName: "_CTestLess_i16_i32.Main", scope: null, file: !587, line: 25, type: !596, spFlags: DISPFlagDefinition, unit: !588, retainedNodes: !706) +// CHECK:STDOUT: !696 = !DILocalVariable(arg: 1, scope: !695, type: !455) +// CHECK:STDOUT: !697 = !DILocalVariable(arg: 2, scope: !695, type: !36) +// CHECK:STDOUT: !704 = !DILocation(line: 25, column: 54, scope: !695) +// CHECK:STDOUT: !705 = !DILocation(line: 25, column: 47, scope: !695) +// CHECK:STDOUT: !706 = !{!696, !697} +// CHECK:STDOUT: !707 = distinct !DISubprogram(name: "TestLess_i32_u32", linkageName: "_CTestLess_i32_u32.Main", scope: null, file: !587, line: 26, type: !598, spFlags: DISPFlagDefinition, unit: !588, retainedNodes: !718) +// CHECK:STDOUT: !708 = !DILocalVariable(arg: 1, scope: !707, type: !36) +// CHECK:STDOUT: !709 = !DILocalVariable(arg: 2, scope: !707, type: !37) +// CHECK:STDOUT: !716 = !DILocation(line: 26, column: 54, scope: !707) +// CHECK:STDOUT: !717 = !DILocation(line: 26, column: 47, scope: !707) +// CHECK:STDOUT: !718 = !{!708, !709} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'convert.carbon' // CHECK:STDOUT: source_filename = "convert.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestInt32ToInt32.Main(i32 %a) #0 !dbg !742 { +// CHECK:STDOUT: define i32 @_CTestInt32ToInt32.Main(i32 %a) #0 !dbg !744 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %a, !dbg !749 +// CHECK:STDOUT: ret i32 %a, !dbg !751 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestInt32ToUint32.Main(i32 %a) #0 !dbg !751 { +// CHECK:STDOUT: define i32 @_CTestInt32ToUint32.Main(i32 %a) #0 !dbg !753 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %a, !dbg !758 +// CHECK:STDOUT: ret i32 %a, !dbg !760 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestUint32ToInt32.Main(i32 %a) #0 !dbg !760 { +// CHECK:STDOUT: define i32 @_CTestUint32ToInt32.Main(i32 %a) #0 !dbg !762 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %a, !dbg !767 +// CHECK:STDOUT: ret i32 %a, !dbg !769 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestUint32ToUint32.Main(i32 %a) #0 !dbg !769 { +// CHECK:STDOUT: define i32 @_CTestUint32ToUint32.Main(i32 %a) #0 !dbg !771 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %a, !dbg !776 +// CHECK:STDOUT: ret i32 %a, !dbg !778 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i16 @_CTestInt32ToInt16.Main(i32 %a) #0 !dbg !778 { +// CHECK:STDOUT: define i16 @_CTestInt32ToInt16.Main(i32 %a) #0 !dbg !780 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int32ToInt16.call = trunc i32 %a to i16, !dbg !784 -// CHECK:STDOUT: ret i16 %Int32ToInt16.call, !dbg !785 +// CHECK:STDOUT: %Int32ToInt16.call = trunc i32 %a to i16, !dbg !786 +// CHECK:STDOUT: ret i16 %Int32ToInt16.call, !dbg !787 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i16 @_CTestInt32ToUint16.Main(i32 %a) #0 !dbg !787 { +// CHECK:STDOUT: define i16 @_CTestInt32ToUint16.Main(i32 %a) #0 !dbg !789 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int32ToUint16.call = trunc i32 %a to i16, !dbg !793 -// CHECK:STDOUT: ret i16 %Int32ToUint16.call, !dbg !794 +// CHECK:STDOUT: %Int32ToUint16.call = trunc i32 %a to i16, !dbg !795 +// CHECK:STDOUT: ret i16 %Int32ToUint16.call, !dbg !796 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i16 @_CTestUint32ToInt16.Main(i32 %a) #0 !dbg !796 { +// CHECK:STDOUT: define i16 @_CTestUint32ToInt16.Main(i32 %a) #0 !dbg !798 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Uint32ToInt16.call = trunc i32 %a to i16, !dbg !802 -// CHECK:STDOUT: ret i16 %Uint32ToInt16.call, !dbg !803 +// CHECK:STDOUT: %Uint32ToInt16.call = trunc i32 %a to i16, !dbg !804 +// CHECK:STDOUT: ret i16 %Uint32ToInt16.call, !dbg !805 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i16 @_CTestUint32ToUint16.Main(i32 %a) #0 !dbg !805 { +// CHECK:STDOUT: define i16 @_CTestUint32ToUint16.Main(i32 %a) #0 !dbg !807 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Uint32ToUint16.call = trunc i32 %a to i16, !dbg !811 -// CHECK:STDOUT: ret i16 %Uint32ToUint16.call, !dbg !812 +// CHECK:STDOUT: %Uint32ToUint16.call = trunc i32 %a to i16, !dbg !813 +// CHECK:STDOUT: ret i16 %Uint32ToUint16.call, !dbg !814 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestInt32ToInt64.Main(i32 %a) #0 !dbg !814 { +// CHECK:STDOUT: define i64 @_CTestInt32ToInt64.Main(i32 %a) #0 !dbg !816 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int32ToInt64.call = sext i32 %a to i64, !dbg !820 -// CHECK:STDOUT: ret i64 %Int32ToInt64.call, !dbg !821 +// CHECK:STDOUT: %Int32ToInt64.call = sext i32 %a to i64, !dbg !822 +// CHECK:STDOUT: ret i64 %Int32ToInt64.call, !dbg !823 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestInt32ToUint64.Main(i32 %a) #0 !dbg !823 { +// CHECK:STDOUT: define i64 @_CTestInt32ToUint64.Main(i32 %a) #0 !dbg !825 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int32ToUint64.call = sext i32 %a to i64, !dbg !829 -// CHECK:STDOUT: ret i64 %Int32ToUint64.call, !dbg !830 +// CHECK:STDOUT: %Int32ToUint64.call = sext i32 %a to i64, !dbg !831 +// CHECK:STDOUT: ret i64 %Int32ToUint64.call, !dbg !832 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestUint32ToInt64.Main(i32 %a) #0 !dbg !832 { +// CHECK:STDOUT: define i64 @_CTestUint32ToInt64.Main(i32 %a) #0 !dbg !834 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Uint32ToInt64.call = zext i32 %a to i64, !dbg !838 -// CHECK:STDOUT: ret i64 %Uint32ToInt64.call, !dbg !839 +// CHECK:STDOUT: %Uint32ToInt64.call = zext i32 %a to i64, !dbg !840 +// CHECK:STDOUT: ret i64 %Uint32ToInt64.call, !dbg !841 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestUint32ToUint64.Main(i32 %a) #0 !dbg !841 { +// CHECK:STDOUT: define i64 @_CTestUint32ToUint64.Main(i32 %a) #0 !dbg !843 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Uint32ToUint64.call = zext i32 %a to i64, !dbg !847 -// CHECK:STDOUT: ret i64 %Uint32ToUint64.call, !dbg !848 +// CHECK:STDOUT: %Uint32ToUint64.call = zext i32 %a to i64, !dbg !849 +// CHECK:STDOUT: ret i64 %Uint32ToUint64.call, !dbg !850 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!718} +// CHECK:STDOUT: !llvm.dbg.cu = !{!720} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !17 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !36 = !{!34, !34} -// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !453 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) -// CHECK:STDOUT: !454 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !717 = !DIFile(filename: "convert.carbon", directory: "") -// CHECK:STDOUT: !718 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !717, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !719 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) -// CHECK:STDOUT: !720 = !{!35, !34} -// CHECK:STDOUT: !721 = !DISubroutineType(types: !720) -// CHECK:STDOUT: !722 = !{!34, !35} +// CHECK:STDOUT: !19 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !38 = !{!36, !36} +// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) +// CHECK:STDOUT: !455 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) +// CHECK:STDOUT: !456 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !719 = !DIFile(filename: "convert.carbon", directory: "") +// CHECK:STDOUT: !720 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !719, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !721 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) +// CHECK:STDOUT: !722 = !{!37, !36} // CHECK:STDOUT: !723 = !DISubroutineType(types: !722) -// CHECK:STDOUT: !724 = !{!35, !35} +// CHECK:STDOUT: !724 = !{!36, !37} // CHECK:STDOUT: !725 = !DISubroutineType(types: !724) -// CHECK:STDOUT: !726 = !{!453, !34} +// CHECK:STDOUT: !726 = !{!37, !37} // CHECK:STDOUT: !727 = !DISubroutineType(types: !726) -// CHECK:STDOUT: !728 = !{!454, !34} +// CHECK:STDOUT: !728 = !{!455, !36} // CHECK:STDOUT: !729 = !DISubroutineType(types: !728) -// CHECK:STDOUT: !730 = !{!453, !35} +// CHECK:STDOUT: !730 = !{!456, !36} // CHECK:STDOUT: !731 = !DISubroutineType(types: !730) -// CHECK:STDOUT: !732 = !{!454, !35} +// CHECK:STDOUT: !732 = !{!455, !37} // CHECK:STDOUT: !733 = !DISubroutineType(types: !732) -// CHECK:STDOUT: !734 = !{!719, !34} +// CHECK:STDOUT: !734 = !{!456, !37} // CHECK:STDOUT: !735 = !DISubroutineType(types: !734) -// CHECK:STDOUT: !736 = !{!17, !34} +// CHECK:STDOUT: !736 = !{!721, !36} // CHECK:STDOUT: !737 = !DISubroutineType(types: !736) -// CHECK:STDOUT: !738 = !{!719, !35} +// CHECK:STDOUT: !738 = !{!19, !36} // CHECK:STDOUT: !739 = !DISubroutineType(types: !738) -// CHECK:STDOUT: !740 = !{!17, !35} +// CHECK:STDOUT: !740 = !{!721, !37} // CHECK:STDOUT: !741 = !DISubroutineType(types: !740) -// CHECK:STDOUT: !742 = distinct !DISubprogram(name: "TestInt32ToInt32", linkageName: "_CTestInt32ToInt32.Main", scope: null, file: !717, line: 10, type: !37, spFlags: DISPFlagDefinition, unit: !718, retainedNodes: !750) -// CHECK:STDOUT: !743 = !DILocalVariable(arg: 1, scope: !742, type: !34) -// CHECK:STDOUT: !749 = !DILocation(line: 10, column: 38, scope: !742) -// CHECK:STDOUT: !750 = !{!743} -// CHECK:STDOUT: !751 = distinct !DISubprogram(name: "TestInt32ToUint32", linkageName: "_CTestInt32ToUint32.Main", scope: null, file: !717, line: 11, type: !721, spFlags: DISPFlagDefinition, unit: !718, retainedNodes: !759) -// CHECK:STDOUT: !752 = !DILocalVariable(arg: 1, scope: !751, type: !34) -// CHECK:STDOUT: !758 = !DILocation(line: 11, column: 39, scope: !751) -// CHECK:STDOUT: !759 = !{!752} -// CHECK:STDOUT: !760 = distinct !DISubprogram(name: "TestUint32ToInt32", linkageName: "_CTestUint32ToInt32.Main", scope: null, file: !717, line: 12, type: !723, spFlags: DISPFlagDefinition, unit: !718, retainedNodes: !768) -// CHECK:STDOUT: !761 = !DILocalVariable(arg: 1, scope: !760, type: !35) -// CHECK:STDOUT: !767 = !DILocation(line: 12, column: 39, scope: !760) -// CHECK:STDOUT: !768 = !{!761} -// CHECK:STDOUT: !769 = distinct !DISubprogram(name: "TestUint32ToUint32", linkageName: "_CTestUint32ToUint32.Main", scope: null, file: !717, line: 13, type: !725, spFlags: DISPFlagDefinition, unit: !718, retainedNodes: !777) -// CHECK:STDOUT: !770 = !DILocalVariable(arg: 1, scope: !769, type: !35) -// CHECK:STDOUT: !776 = !DILocation(line: 13, column: 40, scope: !769) -// CHECK:STDOUT: !777 = !{!770} -// CHECK:STDOUT: !778 = distinct !DISubprogram(name: "TestInt32ToInt16", linkageName: "_CTestInt32ToInt16.Main", scope: null, file: !717, line: 21, type: !727, spFlags: DISPFlagDefinition, unit: !718, retainedNodes: !786) -// CHECK:STDOUT: !779 = !DILocalVariable(arg: 1, scope: !778, type: !34) -// CHECK:STDOUT: !784 = !DILocation(line: 21, column: 45, scope: !778) -// CHECK:STDOUT: !785 = !DILocation(line: 21, column: 38, scope: !778) -// CHECK:STDOUT: !786 = !{!779} -// CHECK:STDOUT: !787 = distinct !DISubprogram(name: "TestInt32ToUint16", linkageName: "_CTestInt32ToUint16.Main", scope: null, file: !717, line: 22, type: !729, spFlags: DISPFlagDefinition, unit: !718, retainedNodes: !795) -// CHECK:STDOUT: !788 = !DILocalVariable(arg: 1, scope: !787, type: !34) -// CHECK:STDOUT: !793 = !DILocation(line: 22, column: 46, scope: !787) -// CHECK:STDOUT: !794 = !DILocation(line: 22, column: 39, scope: !787) -// CHECK:STDOUT: !795 = !{!788} -// CHECK:STDOUT: !796 = distinct !DISubprogram(name: "TestUint32ToInt16", linkageName: "_CTestUint32ToInt16.Main", scope: null, file: !717, line: 23, type: !731, spFlags: DISPFlagDefinition, unit: !718, retainedNodes: !804) -// CHECK:STDOUT: !797 = !DILocalVariable(arg: 1, scope: !796, type: !35) -// CHECK:STDOUT: !802 = !DILocation(line: 23, column: 46, scope: !796) -// CHECK:STDOUT: !803 = !DILocation(line: 23, column: 39, scope: !796) -// CHECK:STDOUT: !804 = !{!797} -// CHECK:STDOUT: !805 = distinct !DISubprogram(name: "TestUint32ToUint16", linkageName: "_CTestUint32ToUint16.Main", scope: null, file: !717, line: 24, type: !733, spFlags: DISPFlagDefinition, unit: !718, retainedNodes: !813) -// CHECK:STDOUT: !806 = !DILocalVariable(arg: 1, scope: !805, type: !35) -// CHECK:STDOUT: !811 = !DILocation(line: 24, column: 47, scope: !805) -// CHECK:STDOUT: !812 = !DILocation(line: 24, column: 40, scope: !805) -// CHECK:STDOUT: !813 = !{!806} -// CHECK:STDOUT: !814 = distinct !DISubprogram(name: "TestInt32ToInt64", linkageName: "_CTestInt32ToInt64.Main", scope: null, file: !717, line: 32, type: !735, spFlags: DISPFlagDefinition, unit: !718, retainedNodes: !822) -// CHECK:STDOUT: !815 = !DILocalVariable(arg: 1, scope: !814, type: !34) -// CHECK:STDOUT: !820 = !DILocation(line: 32, column: 45, scope: !814) -// CHECK:STDOUT: !821 = !DILocation(line: 32, column: 38, scope: !814) -// CHECK:STDOUT: !822 = !{!815} -// CHECK:STDOUT: !823 = distinct !DISubprogram(name: "TestInt32ToUint64", linkageName: "_CTestInt32ToUint64.Main", scope: null, file: !717, line: 33, type: !737, spFlags: DISPFlagDefinition, unit: !718, retainedNodes: !831) -// CHECK:STDOUT: !824 = !DILocalVariable(arg: 1, scope: !823, type: !34) -// CHECK:STDOUT: !829 = !DILocation(line: 33, column: 46, scope: !823) -// CHECK:STDOUT: !830 = !DILocation(line: 33, column: 39, scope: !823) -// CHECK:STDOUT: !831 = !{!824} -// CHECK:STDOUT: !832 = distinct !DISubprogram(name: "TestUint32ToInt64", linkageName: "_CTestUint32ToInt64.Main", scope: null, file: !717, line: 34, type: !739, spFlags: DISPFlagDefinition, unit: !718, retainedNodes: !840) -// CHECK:STDOUT: !833 = !DILocalVariable(arg: 1, scope: !832, type: !35) -// CHECK:STDOUT: !838 = !DILocation(line: 34, column: 46, scope: !832) -// CHECK:STDOUT: !839 = !DILocation(line: 34, column: 39, scope: !832) -// CHECK:STDOUT: !840 = !{!833} -// CHECK:STDOUT: !841 = distinct !DISubprogram(name: "TestUint32ToUint64", linkageName: "_CTestUint32ToUint64.Main", scope: null, file: !717, line: 35, type: !741, spFlags: DISPFlagDefinition, unit: !718, retainedNodes: !849) -// CHECK:STDOUT: !842 = !DILocalVariable(arg: 1, scope: !841, type: !35) -// CHECK:STDOUT: !847 = !DILocation(line: 35, column: 47, scope: !841) -// CHECK:STDOUT: !848 = !DILocation(line: 35, column: 40, scope: !841) -// CHECK:STDOUT: !849 = !{!842} +// CHECK:STDOUT: !742 = !{!19, !37} +// CHECK:STDOUT: !743 = !DISubroutineType(types: !742) +// CHECK:STDOUT: !744 = distinct !DISubprogram(name: "TestInt32ToInt32", linkageName: "_CTestInt32ToInt32.Main", scope: null, file: !719, line: 10, type: !39, spFlags: DISPFlagDefinition, unit: !720, retainedNodes: !752) +// CHECK:STDOUT: !745 = !DILocalVariable(arg: 1, scope: !744, type: !36) +// CHECK:STDOUT: !751 = !DILocation(line: 10, column: 38, scope: !744) +// CHECK:STDOUT: !752 = !{!745} +// CHECK:STDOUT: !753 = distinct !DISubprogram(name: "TestInt32ToUint32", linkageName: "_CTestInt32ToUint32.Main", scope: null, file: !719, line: 11, type: !723, spFlags: DISPFlagDefinition, unit: !720, retainedNodes: !761) +// CHECK:STDOUT: !754 = !DILocalVariable(arg: 1, scope: !753, type: !36) +// CHECK:STDOUT: !760 = !DILocation(line: 11, column: 39, scope: !753) +// CHECK:STDOUT: !761 = !{!754} +// CHECK:STDOUT: !762 = distinct !DISubprogram(name: "TestUint32ToInt32", linkageName: "_CTestUint32ToInt32.Main", scope: null, file: !719, line: 12, type: !725, spFlags: DISPFlagDefinition, unit: !720, retainedNodes: !770) +// CHECK:STDOUT: !763 = !DILocalVariable(arg: 1, scope: !762, type: !37) +// CHECK:STDOUT: !769 = !DILocation(line: 12, column: 39, scope: !762) +// CHECK:STDOUT: !770 = !{!763} +// CHECK:STDOUT: !771 = distinct !DISubprogram(name: "TestUint32ToUint32", linkageName: "_CTestUint32ToUint32.Main", scope: null, file: !719, line: 13, type: !727, spFlags: DISPFlagDefinition, unit: !720, retainedNodes: !779) +// CHECK:STDOUT: !772 = !DILocalVariable(arg: 1, scope: !771, type: !37) +// CHECK:STDOUT: !778 = !DILocation(line: 13, column: 40, scope: !771) +// CHECK:STDOUT: !779 = !{!772} +// CHECK:STDOUT: !780 = distinct !DISubprogram(name: "TestInt32ToInt16", linkageName: "_CTestInt32ToInt16.Main", scope: null, file: !719, line: 21, type: !729, spFlags: DISPFlagDefinition, unit: !720, retainedNodes: !788) +// CHECK:STDOUT: !781 = !DILocalVariable(arg: 1, scope: !780, type: !36) +// CHECK:STDOUT: !786 = !DILocation(line: 21, column: 45, scope: !780) +// CHECK:STDOUT: !787 = !DILocation(line: 21, column: 38, scope: !780) +// CHECK:STDOUT: !788 = !{!781} +// CHECK:STDOUT: !789 = distinct !DISubprogram(name: "TestInt32ToUint16", linkageName: "_CTestInt32ToUint16.Main", scope: null, file: !719, line: 22, type: !731, spFlags: DISPFlagDefinition, unit: !720, retainedNodes: !797) +// CHECK:STDOUT: !790 = !DILocalVariable(arg: 1, scope: !789, type: !36) +// CHECK:STDOUT: !795 = !DILocation(line: 22, column: 46, scope: !789) +// CHECK:STDOUT: !796 = !DILocation(line: 22, column: 39, scope: !789) +// CHECK:STDOUT: !797 = !{!790} +// CHECK:STDOUT: !798 = distinct !DISubprogram(name: "TestUint32ToInt16", linkageName: "_CTestUint32ToInt16.Main", scope: null, file: !719, line: 23, type: !733, spFlags: DISPFlagDefinition, unit: !720, retainedNodes: !806) +// CHECK:STDOUT: !799 = !DILocalVariable(arg: 1, scope: !798, type: !37) +// CHECK:STDOUT: !804 = !DILocation(line: 23, column: 46, scope: !798) +// CHECK:STDOUT: !805 = !DILocation(line: 23, column: 39, scope: !798) +// CHECK:STDOUT: !806 = !{!799} +// CHECK:STDOUT: !807 = distinct !DISubprogram(name: "TestUint32ToUint16", linkageName: "_CTestUint32ToUint16.Main", scope: null, file: !719, line: 24, type: !735, spFlags: DISPFlagDefinition, unit: !720, retainedNodes: !815) +// CHECK:STDOUT: !808 = !DILocalVariable(arg: 1, scope: !807, type: !37) +// CHECK:STDOUT: !813 = !DILocation(line: 24, column: 47, scope: !807) +// CHECK:STDOUT: !814 = !DILocation(line: 24, column: 40, scope: !807) +// CHECK:STDOUT: !815 = !{!808} +// CHECK:STDOUT: !816 = distinct !DISubprogram(name: "TestInt32ToInt64", linkageName: "_CTestInt32ToInt64.Main", scope: null, file: !719, line: 32, type: !737, spFlags: DISPFlagDefinition, unit: !720, retainedNodes: !824) +// CHECK:STDOUT: !817 = !DILocalVariable(arg: 1, scope: !816, type: !36) +// CHECK:STDOUT: !822 = !DILocation(line: 32, column: 45, scope: !816) +// CHECK:STDOUT: !823 = !DILocation(line: 32, column: 38, scope: !816) +// CHECK:STDOUT: !824 = !{!817} +// CHECK:STDOUT: !825 = distinct !DISubprogram(name: "TestInt32ToUint64", linkageName: "_CTestInt32ToUint64.Main", scope: null, file: !719, line: 33, type: !739, spFlags: DISPFlagDefinition, unit: !720, retainedNodes: !833) +// CHECK:STDOUT: !826 = !DILocalVariable(arg: 1, scope: !825, type: !36) +// CHECK:STDOUT: !831 = !DILocation(line: 33, column: 46, scope: !825) +// CHECK:STDOUT: !832 = !DILocation(line: 33, column: 39, scope: !825) +// CHECK:STDOUT: !833 = !{!826} +// CHECK:STDOUT: !834 = distinct !DISubprogram(name: "TestUint32ToInt64", linkageName: "_CTestUint32ToInt64.Main", scope: null, file: !719, line: 34, type: !741, spFlags: DISPFlagDefinition, unit: !720, retainedNodes: !842) +// CHECK:STDOUT: !835 = !DILocalVariable(arg: 1, scope: !834, type: !37) +// CHECK:STDOUT: !840 = !DILocation(line: 34, column: 46, scope: !834) +// CHECK:STDOUT: !841 = !DILocation(line: 34, column: 39, scope: !834) +// CHECK:STDOUT: !842 = !{!835} +// CHECK:STDOUT: !843 = distinct !DISubprogram(name: "TestUint32ToUint64", linkageName: "_CTestUint32ToUint64.Main", scope: null, file: !719, line: 35, type: !743, spFlags: DISPFlagDefinition, unit: !720, retainedNodes: !851) +// CHECK:STDOUT: !844 = !DILocalVariable(arg: 1, scope: !843, type: !37) +// CHECK:STDOUT: !849 = !DILocation(line: 35, column: 47, scope: !843) +// CHECK:STDOUT: !850 = !DILocation(line: 35, column: 40, scope: !843) +// CHECK:STDOUT: !851 = !{!844} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/int_to_float.carbon b/toolchain/lower/testdata/builtins/int_to_float.carbon index 3128c15023e4..f85745b18ba9 100644 --- a/toolchain/lower/testdata/builtins/int_to_float.carbon +++ b/toolchain/lower/testdata/builtins/int_to_float.carbon @@ -36,97 +36,97 @@ fn TestConvertU64ToF128(a: u64) -> f128 { return ConvertU64ToF128(a); } // CHECK:STDOUT: source_filename = "int_to_float.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define float @_CTestConvertI32ToF32.Main(i32 %a) #0 !dbg !46 { +// CHECK:STDOUT: define float @_CTestConvertI32ToF32.Main(i32 %a) #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertI32ToF32.call = sitofp i32 %a to float, !dbg !52 -// CHECK:STDOUT: ret float %ConvertI32ToF32.call, !dbg !53 +// CHECK:STDOUT: %ConvertI32ToF32.call = sitofp i32 %a to float, !dbg !54 +// CHECK:STDOUT: ret float %ConvertI32ToF32.call, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define float @_CTestConvertU32ToF32.Main(i32 %a) #0 !dbg !55 { +// CHECK:STDOUT: define float @_CTestConvertU32ToF32.Main(i32 %a) #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertU32ToF32.call = uitofp i32 %a to float, !dbg !61 -// CHECK:STDOUT: ret float %ConvertU32ToF32.call, !dbg !62 +// CHECK:STDOUT: %ConvertU32ToF32.call = uitofp i32 %a to float, !dbg !63 +// CHECK:STDOUT: ret float %ConvertU32ToF32.call, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define double @_CTestConvertI32ToF64.Main(i32 %a) #0 !dbg !64 { +// CHECK:STDOUT: define double @_CTestConvertI32ToF64.Main(i32 %a) #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertI32ToF64.call = sitofp i32 %a to double, !dbg !70 -// CHECK:STDOUT: ret double %ConvertI32ToF64.call, !dbg !71 +// CHECK:STDOUT: %ConvertI32ToF64.call = sitofp i32 %a to double, !dbg !72 +// CHECK:STDOUT: ret double %ConvertI32ToF64.call, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define double @_CTestConvertU32ToF64.Main(i32 %a) #0 !dbg !73 { +// CHECK:STDOUT: define double @_CTestConvertU32ToF64.Main(i32 %a) #0 !dbg !75 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertU32ToF64.call = uitofp i32 %a to double, !dbg !79 -// CHECK:STDOUT: ret double %ConvertU32ToF64.call, !dbg !80 +// CHECK:STDOUT: %ConvertU32ToF64.call = uitofp i32 %a to double, !dbg !81 +// CHECK:STDOUT: ret double %ConvertU32ToF64.call, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define fp128 @_CTestConvertI64ToF128.Main(i64 %a) #0 !dbg !82 { +// CHECK:STDOUT: define fp128 @_CTestConvertI64ToF128.Main(i64 %a) #0 !dbg !84 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertI64ToF128.call = sitofp i64 %a to fp128, !dbg !88 -// CHECK:STDOUT: ret fp128 %ConvertI64ToF128.call, !dbg !89 +// CHECK:STDOUT: %ConvertI64ToF128.call = sitofp i64 %a to fp128, !dbg !90 +// CHECK:STDOUT: ret fp128 %ConvertI64ToF128.call, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define fp128 @_CTestConvertU64ToF128.Main(i64 %a) #0 !dbg !91 { +// CHECK:STDOUT: define fp128 @_CTestConvertU64ToF128.Main(i64 %a) #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ConvertU64ToF128.call = uitofp i64 %a to fp128, !dbg !97 -// CHECK:STDOUT: ret fp128 %ConvertU64ToF128.call, !dbg !98 +// CHECK:STDOUT: %ConvertU64ToF128.call = uitofp i64 %a to fp128, !dbg !99 +// CHECK:STDOUT: ret fp128 %ConvertU64ToF128.call, !dbg !100 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !17 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !32 = !DIFile(filename: "int_to_float.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) -// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !38 = !{!37, !34} -// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{!37, !35} +// CHECK:STDOUT: !19 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !34 = !DIFile(filename: "int_to_float.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !38 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !40 = !{!39, !36} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = !{!37, !36} +// CHECK:STDOUT: !42 = !{!39, !37} // CHECK:STDOUT: !43 = !DISubroutineType(types: !42) -// CHECK:STDOUT: !44 = !{!37, !17} +// CHECK:STDOUT: !44 = !{!39, !38} // CHECK:STDOUT: !45 = !DISubroutineType(types: !44) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "TestConvertI32ToF32", linkageName: "_CTestConvertI32ToF32.Main", scope: null, file: !32, line: 4, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !54) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !34) -// CHECK:STDOUT: !52 = !DILocation(line: 4, column: 48, scope: !46) -// CHECK:STDOUT: !53 = !DILocation(line: 4, column: 41, scope: !46) -// CHECK:STDOUT: !54 = !{!47} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "TestConvertU32ToF32", linkageName: "_CTestConvertU32ToF32.Main", scope: null, file: !32, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !63) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !35) -// CHECK:STDOUT: !61 = !DILocation(line: 7, column: 48, scope: !55) -// CHECK:STDOUT: !62 = !DILocation(line: 7, column: 41, scope: !55) -// CHECK:STDOUT: !63 = !{!56} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "TestConvertI32ToF64", linkageName: "_CTestConvertI32ToF64.Main", scope: null, file: !32, line: 10, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !72) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !34) -// CHECK:STDOUT: !70 = !DILocation(line: 10, column: 48, scope: !64) -// CHECK:STDOUT: !71 = !DILocation(line: 10, column: 41, scope: !64) -// CHECK:STDOUT: !72 = !{!65} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "TestConvertU32ToF64", linkageName: "_CTestConvertU32ToF64.Main", scope: null, file: !32, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !81) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !35) -// CHECK:STDOUT: !79 = !DILocation(line: 13, column: 48, scope: !73) -// CHECK:STDOUT: !80 = !DILocation(line: 13, column: 41, scope: !73) -// CHECK:STDOUT: !81 = !{!74} -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "TestConvertI64ToF128", linkageName: "_CTestConvertI64ToF128.Main", scope: null, file: !32, line: 16, type: !43, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !90) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !36) -// CHECK:STDOUT: !88 = !DILocation(line: 16, column: 50, scope: !82) -// CHECK:STDOUT: !89 = !DILocation(line: 16, column: 43, scope: !82) -// CHECK:STDOUT: !90 = !{!83} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "TestConvertU64ToF128", linkageName: "_CTestConvertU64ToF128.Main", scope: null, file: !32, line: 19, type: !45, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !99) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !17) -// CHECK:STDOUT: !97 = !DILocation(line: 19, column: 50, scope: !91) -// CHECK:STDOUT: !98 = !DILocation(line: 19, column: 43, scope: !91) -// CHECK:STDOUT: !99 = !{!92} +// CHECK:STDOUT: !46 = !{!39, !19} +// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "TestConvertI32ToF32", linkageName: "_CTestConvertI32ToF32.Main", scope: null, file: !34, line: 4, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !56) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !36) +// CHECK:STDOUT: !54 = !DILocation(line: 4, column: 48, scope: !48) +// CHECK:STDOUT: !55 = !DILocation(line: 4, column: 41, scope: !48) +// CHECK:STDOUT: !56 = !{!49} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "TestConvertU32ToF32", linkageName: "_CTestConvertU32ToF32.Main", scope: null, file: !34, line: 7, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !65) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !37) +// CHECK:STDOUT: !63 = !DILocation(line: 7, column: 48, scope: !57) +// CHECK:STDOUT: !64 = !DILocation(line: 7, column: 41, scope: !57) +// CHECK:STDOUT: !65 = !{!58} +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "TestConvertI32ToF64", linkageName: "_CTestConvertI32ToF64.Main", scope: null, file: !34, line: 10, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !74) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !36) +// CHECK:STDOUT: !72 = !DILocation(line: 10, column: 48, scope: !66) +// CHECK:STDOUT: !73 = !DILocation(line: 10, column: 41, scope: !66) +// CHECK:STDOUT: !74 = !{!67} +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "TestConvertU32ToF64", linkageName: "_CTestConvertU32ToF64.Main", scope: null, file: !34, line: 13, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !83) +// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !37) +// CHECK:STDOUT: !81 = !DILocation(line: 13, column: 48, scope: !75) +// CHECK:STDOUT: !82 = !DILocation(line: 13, column: 41, scope: !75) +// CHECK:STDOUT: !83 = !{!76} +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "TestConvertI64ToF128", linkageName: "_CTestConvertI64ToF128.Main", scope: null, file: !34, line: 16, type: !45, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !92) +// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !38) +// CHECK:STDOUT: !90 = !DILocation(line: 16, column: 50, scope: !84) +// CHECK:STDOUT: !91 = !DILocation(line: 16, column: 43, scope: !84) +// CHECK:STDOUT: !92 = !{!85} +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "TestConvertU64ToF128", linkageName: "_CTestConvertU64ToF128.Main", scope: null, file: !34, line: 19, type: !47, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !101) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !19) +// CHECK:STDOUT: !99 = !DILocation(line: 19, column: 50, scope: !93) +// CHECK:STDOUT: !100 = !DILocation(line: 19, column: 43, scope: !93) +// CHECK:STDOUT: !101 = !{!94} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/maybe_unformed.carbon b/toolchain/lower/testdata/builtins/maybe_unformed.carbon index ab64e0a85803..408d2b2e82e9 100644 --- a/toolchain/lower/testdata/builtins/maybe_unformed.carbon +++ b/toolchain/lower/testdata/builtins/maybe_unformed.carbon @@ -60,122 +60,122 @@ fn PassAdapterBool() { // CHECK:STDOUT: source_filename = "maybe_unformed.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTakeI32.Main(i32 %_) #0 !dbg !46 { +// CHECK:STDOUT: define void @_CTakeI32.Main(i32 %_) #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare i32 @_CMakeI32.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTakeBool.Main(ptr %_) #0 !dbg !51 { +// CHECK:STDOUT: define void @_CTakeBool.Main(ptr %_) #0 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CMakeBool.Main(ptr sret(i1)) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassI32.Main() #0 !dbg !56 { +// CHECK:STDOUT: define void @_CPassI32.Main() #0 !dbg !58 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %MakeI32.call = call i32 @_CMakeI32.Main(), !dbg !57 -// CHECK:STDOUT: call void @_CTakeI32.Main(i32 %MakeI32.call), !dbg !58 -// CHECK:STDOUT: ret void, !dbg !59 +// CHECK:STDOUT: %MakeI32.call = call i32 @_CMakeI32.Main(), !dbg !59 +// CHECK:STDOUT: call void @_CTakeI32.Main(i32 %MakeI32.call), !dbg !60 +// CHECK:STDOUT: ret void, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassBool.Main() #0 !dbg !60 { +// CHECK:STDOUT: define void @_CPassBool.Main() #0 !dbg !62 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc28_21.1.temp = alloca i1, align 1, !dbg !61 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc28_21.1.temp), !dbg !61 -// CHECK:STDOUT: call void @_CMakeBool.Main(ptr %.loc28_21.1.temp), !dbg !61 -// CHECK:STDOUT: call void @_CTakeBool.Main(ptr %.loc28_21.1.temp), !dbg !62 -// CHECK:STDOUT: call void @"_CSelfDestruct.2ec8e1132c6ccd4f:core.Destroy.Core"(ptr %.loc28_21.1.temp), !dbg !61 -// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: %.loc28_21.1.temp = alloca i1, align 1, !dbg !63 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc28_21.1.temp), !dbg !63 +// CHECK:STDOUT: call void @_CMakeBool.Main(ptr %.loc28_21.1.temp), !dbg !63 +// CHECK:STDOUT: call void @_CTakeBool.Main(ptr %.loc28_21.1.temp), !dbg !64 +// CHECK:STDOUT: call void @"_CSelfDestruct.2ec8e1132c6ccd4f:core.Destroy.Core"(ptr %.loc28_21.1.temp), !dbg !63 +// CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2ec8e1132c6ccd4f:core.Destroy.Core"(ptr %self) #0 !dbg !64 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2ec8e1132c6ccd4f:core.Destroy.Core"(ptr %self) #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !66 +// CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CConvertBoolToUnformedBool.Main(ptr %b) #0 !dbg !68 { +// CHECK:STDOUT: define void @_CConvertBoolToUnformedBool.Main(ptr %b) #0 !dbg !70 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CTakeBool.Main(ptr %b), !dbg !73 -// CHECK:STDOUT: ret void, !dbg !74 +// CHECK:STDOUT: call void @_CTakeBool.Main(ptr %b), !dbg !75 +// CHECK:STDOUT: ret void, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTakeAdapterI32.Main(i32 %_) #0 !dbg !76 { +// CHECK:STDOUT: define void @_CTakeAdapterI32.Main(i32 %_) #0 !dbg !78 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !79 +// CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare i32 @_CMakeAdapterI32.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassAdapterI32.Main() #0 !dbg !81 { +// CHECK:STDOUT: define void @_CPassAdapterI32.Main() #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc48_33.1.temp = alloca i32, align 4, !dbg !82 -// CHECK:STDOUT: %MakeAdapterI32.call = call i32 @_CMakeAdapterI32.Main(), !dbg !82 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc48_33.1.temp), !dbg !82 -// CHECK:STDOUT: store i32 %MakeAdapterI32.call, ptr %.loc48_33.1.temp, align 4, !dbg !82 -// CHECK:STDOUT: %.loc48_33.3 = load i32, ptr %.loc48_33.1.temp, align 4, !dbg !82 -// CHECK:STDOUT: call void @_CTakeAdapterI32.Main(i32 %.loc48_33.3), !dbg !83 -// CHECK:STDOUT: call void @"_CSelfDestruct.4615e23332cd8b4c:core.Destroy.Core"(ptr %.loc48_33.1.temp), !dbg !82 -// CHECK:STDOUT: ret void, !dbg !84 +// CHECK:STDOUT: %.loc48_33.1.temp = alloca i32, align 4, !dbg !84 +// CHECK:STDOUT: %MakeAdapterI32.call = call i32 @_CMakeAdapterI32.Main(), !dbg !84 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc48_33.1.temp), !dbg !84 +// CHECK:STDOUT: store i32 %MakeAdapterI32.call, ptr %.loc48_33.1.temp, align 4, !dbg !84 +// CHECK:STDOUT: %.loc48_33.3 = load i32, ptr %.loc48_33.1.temp, align 4, !dbg !84 +// CHECK:STDOUT: call void @_CTakeAdapterI32.Main(i32 %.loc48_33.3), !dbg !85 +// CHECK:STDOUT: call void @"_CSelfDestruct.4615e23332cd8b4c:core.Destroy.Core"(ptr %.loc48_33.1.temp), !dbg !84 +// CHECK:STDOUT: ret void, !dbg !86 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !85 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !87 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !87 +// CHECK:STDOUT: ret void, !dbg !89 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self) #0 !dbg !89 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self) #0 !dbg !91 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !91 +// CHECK:STDOUT: ret void, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self) #0 !dbg !93 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self) #0 !dbg !95 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self), !dbg !95 -// CHECK:STDOUT: ret void, !dbg !95 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self), !dbg !97 +// CHECK:STDOUT: ret void, !dbg !97 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4615e23332cd8b4c:core.Destroy.Core"(ptr %self) #0 !dbg !97 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4615e23332cd8b4c:core.Destroy.Core"(ptr %self) #0 !dbg !99 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTakeAdapterBool.Main(ptr %_) #0 !dbg !101 { +// CHECK:STDOUT: define void @_CTakeAdapterBool.Main(ptr %_) #0 !dbg !103 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !104 +// CHECK:STDOUT: ret void, !dbg !106 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CMakeAdapterBool.Main(ptr sret(i1)) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassAdapterBool.Main() #0 !dbg !106 { +// CHECK:STDOUT: define void @_CPassAdapterBool.Main() #0 !dbg !108 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc55_35.1.temp = alloca i1, align 1, !dbg !107 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc55_35.1.temp), !dbg !107 -// CHECK:STDOUT: call void @_CMakeAdapterBool.Main(ptr %.loc55_35.1.temp), !dbg !107 -// CHECK:STDOUT: call void @_CTakeAdapterBool.Main(ptr %.loc55_35.1.temp), !dbg !108 -// CHECK:STDOUT: call void @"_CSelfDestruct.c9abcd82dd2173d7:core.Destroy.Core"(ptr %.loc55_35.1.temp), !dbg !107 -// CHECK:STDOUT: ret void, !dbg !109 +// CHECK:STDOUT: %.loc55_35.1.temp = alloca i1, align 1, !dbg !109 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc55_35.1.temp), !dbg !109 +// CHECK:STDOUT: call void @_CMakeAdapterBool.Main(ptr %.loc55_35.1.temp), !dbg !109 +// CHECK:STDOUT: call void @_CTakeAdapterBool.Main(ptr %.loc55_35.1.temp), !dbg !110 +// CHECK:STDOUT: call void @"_CSelfDestruct.c9abcd82dd2173d7:core.Destroy.Core"(ptr %.loc55_35.1.temp), !dbg !109 +// CHECK:STDOUT: ret void, !dbg !111 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c9abcd82dd2173d7:core.Destroy.Core"(ptr %self) #0 !dbg !110 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c9abcd82dd2173d7:core.Destroy.Core"(ptr %self) #0 !dbg !112 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !112 +// CHECK:STDOUT: ret void, !dbg !114 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -187,80 +187,80 @@ fn PassAdapterBool() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "maybe_unformed.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !{null, !34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !40 = !{null, !37} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = !{null} +// CHECK:STDOUT: !34 = !DIFile(filename: "maybe_unformed.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !{null, !36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !42 = !{null, !39} // CHECK:STDOUT: !43 = !DISubroutineType(types: !42) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "TakeI32", linkageName: "_CTakeI32.Main", scope: null, file: !32, line: 15, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !50) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !34) -// CHECK:STDOUT: !49 = !DILocation(line: 15, column: 1, scope: !46) -// CHECK:STDOUT: !50 = !{!47} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "TakeBool", linkageName: "_CTakeBool.Main", scope: null, file: !32, line: 18, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !55) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !37) -// CHECK:STDOUT: !54 = !DILocation(line: 18, column: 1, scope: !51) -// CHECK:STDOUT: !55 = !{!52} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "PassI32", linkageName: "_CPassI32.Main", scope: null, file: !32, line: 21, type: !43, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !57 = !DILocation(line: 23, column: 11, scope: !56) -// CHECK:STDOUT: !58 = !DILocation(line: 23, column: 3, scope: !56) -// CHECK:STDOUT: !59 = !DILocation(line: 21, column: 1, scope: !56) -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "PassBool", linkageName: "_CPassBool.Main", scope: null, file: !32, line: 26, type: !43, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !61 = !DILocation(line: 28, column: 12, scope: !60) -// CHECK:STDOUT: !62 = !DILocation(line: 28, column: 3, scope: !60) -// CHECK:STDOUT: !63 = !DILocation(line: 26, column: 1, scope: !60) -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2ec8e1132c6ccd4f:core.Destroy.Core", scope: null, file: !32, line: 28, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !67) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !37) -// CHECK:STDOUT: !66 = !DILocation(line: 28, column: 12, scope: !64) -// CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "ConvertBoolToUnformedBool", linkageName: "_CConvertBoolToUnformedBool.Main", scope: null, file: !32, line: 31, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !75) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !37) -// CHECK:STDOUT: !73 = !DILocation(line: 32, column: 3, scope: !68) -// CHECK:STDOUT: !74 = !DILocation(line: 31, column: 1, scope: !68) -// CHECK:STDOUT: !75 = !{!69} -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "TakeAdapterI32", linkageName: "_CTakeAdapterI32.Main", scope: null, file: !32, line: 42, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !80) -// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !34) -// CHECK:STDOUT: !79 = !DILocation(line: 42, column: 1, scope: !76) -// CHECK:STDOUT: !80 = !{!77} -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "PassAdapterI32", linkageName: "_CPassAdapterI32.Main", scope: null, file: !32, line: 45, type: !43, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !82 = !DILocation(line: 48, column: 18, scope: !81) -// CHECK:STDOUT: !83 = !DILocation(line: 48, column: 3, scope: !81) -// CHECK:STDOUT: !84 = !DILocation(line: 45, column: 1, scope: !81) -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 48, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !88) -// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !34) -// CHECK:STDOUT: !87 = !DILocation(line: 48, column: 18, scope: !85) -// CHECK:STDOUT: !88 = !{!86} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core", scope: null, file: !32, line: 48, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !92) -// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !37) -// CHECK:STDOUT: !91 = !DILocation(line: 48, column: 18, scope: !89) -// CHECK:STDOUT: !92 = !{!90} -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1d6a7672bf2f14c6:core.Destroy.Core", scope: null, file: !32, line: 48, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !96) -// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !37) -// CHECK:STDOUT: !95 = !DILocation(line: 48, column: 18, scope: !93) -// CHECK:STDOUT: !96 = !{!94} -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4615e23332cd8b4c:core.Destroy.Core", scope: null, file: !32, line: 48, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !100) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !34) -// CHECK:STDOUT: !99 = !DILocation(line: 48, column: 18, scope: !97) -// CHECK:STDOUT: !100 = !{!98} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "TakeAdapterBool", linkageName: "_CTakeAdapterBool.Main", scope: null, file: !32, line: 51, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !105) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !37) -// CHECK:STDOUT: !104 = !DILocation(line: 51, column: 1, scope: !101) -// CHECK:STDOUT: !105 = !{!102} -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "PassAdapterBool", linkageName: "_CPassAdapterBool.Main", scope: null, file: !32, line: 54, type: !43, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !107 = !DILocation(line: 55, column: 19, scope: !106) -// CHECK:STDOUT: !108 = !DILocation(line: 55, column: 3, scope: !106) -// CHECK:STDOUT: !109 = !DILocation(line: 54, column: 1, scope: !106) -// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c9abcd82dd2173d7:core.Destroy.Core", scope: null, file: !32, line: 55, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !113) -// CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !37) -// CHECK:STDOUT: !112 = !DILocation(line: 55, column: 19, scope: !110) -// CHECK:STDOUT: !113 = !{!111} +// CHECK:STDOUT: !44 = !{null} +// CHECK:STDOUT: !45 = !DISubroutineType(types: !44) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "TakeI32", linkageName: "_CTakeI32.Main", scope: null, file: !34, line: 15, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !52) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !36) +// CHECK:STDOUT: !51 = !DILocation(line: 15, column: 1, scope: !48) +// CHECK:STDOUT: !52 = !{!49} +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "TakeBool", linkageName: "_CTakeBool.Main", scope: null, file: !34, line: 18, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !57) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !39) +// CHECK:STDOUT: !56 = !DILocation(line: 18, column: 1, scope: !53) +// CHECK:STDOUT: !57 = !{!54} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "PassI32", linkageName: "_CPassI32.Main", scope: null, file: !34, line: 21, type: !45, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !59 = !DILocation(line: 23, column: 11, scope: !58) +// CHECK:STDOUT: !60 = !DILocation(line: 23, column: 3, scope: !58) +// CHECK:STDOUT: !61 = !DILocation(line: 21, column: 1, scope: !58) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "PassBool", linkageName: "_CPassBool.Main", scope: null, file: !34, line: 26, type: !45, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !63 = !DILocation(line: 28, column: 12, scope: !62) +// CHECK:STDOUT: !64 = !DILocation(line: 28, column: 3, scope: !62) +// CHECK:STDOUT: !65 = !DILocation(line: 26, column: 1, scope: !62) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2ec8e1132c6ccd4f:core.Destroy.Core", scope: null, file: !34, line: 28, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !69) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !39) +// CHECK:STDOUT: !68 = !DILocation(line: 28, column: 12, scope: !66) +// CHECK:STDOUT: !69 = !{!67} +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "ConvertBoolToUnformedBool", linkageName: "_CConvertBoolToUnformedBool.Main", scope: null, file: !34, line: 31, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !77) +// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !39) +// CHECK:STDOUT: !75 = !DILocation(line: 32, column: 3, scope: !70) +// CHECK:STDOUT: !76 = !DILocation(line: 31, column: 1, scope: !70) +// CHECK:STDOUT: !77 = !{!71} +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "TakeAdapterI32", linkageName: "_CTakeAdapterI32.Main", scope: null, file: !34, line: 42, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !82) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !36) +// CHECK:STDOUT: !81 = !DILocation(line: 42, column: 1, scope: !78) +// CHECK:STDOUT: !82 = !{!79} +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "PassAdapterI32", linkageName: "_CPassAdapterI32.Main", scope: null, file: !34, line: 45, type: !45, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !84 = !DILocation(line: 48, column: 18, scope: !83) +// CHECK:STDOUT: !85 = !DILocation(line: 48, column: 3, scope: !83) +// CHECK:STDOUT: !86 = !DILocation(line: 45, column: 1, scope: !83) +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !34, line: 48, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !90) +// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !36) +// CHECK:STDOUT: !89 = !DILocation(line: 48, column: 18, scope: !87) +// CHECK:STDOUT: !90 = !{!88} +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core", scope: null, file: !34, line: 48, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !94) +// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !39) +// CHECK:STDOUT: !93 = !DILocation(line: 48, column: 18, scope: !91) +// CHECK:STDOUT: !94 = !{!92} +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1d6a7672bf2f14c6:core.Destroy.Core", scope: null, file: !34, line: 48, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !98) +// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !39) +// CHECK:STDOUT: !97 = !DILocation(line: 48, column: 18, scope: !95) +// CHECK:STDOUT: !98 = !{!96} +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4615e23332cd8b4c:core.Destroy.Core", scope: null, file: !34, line: 48, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !102) +// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !36) +// CHECK:STDOUT: !101 = !DILocation(line: 48, column: 18, scope: !99) +// CHECK:STDOUT: !102 = !{!100} +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "TakeAdapterBool", linkageName: "_CTakeAdapterBool.Main", scope: null, file: !34, line: 51, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !107) +// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !39) +// CHECK:STDOUT: !106 = !DILocation(line: 51, column: 1, scope: !103) +// CHECK:STDOUT: !107 = !{!104} +// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "PassAdapterBool", linkageName: "_CPassAdapterBool.Main", scope: null, file: !34, line: 54, type: !45, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !109 = !DILocation(line: 55, column: 19, scope: !108) +// CHECK:STDOUT: !110 = !DILocation(line: 55, column: 3, scope: !108) +// CHECK:STDOUT: !111 = !DILocation(line: 54, column: 1, scope: !108) +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c9abcd82dd2173d7:core.Destroy.Core", scope: null, file: !34, line: 55, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !115) +// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !39) +// CHECK:STDOUT: !114 = !DILocation(line: 55, column: 19, scope: !112) +// CHECK:STDOUT: !115 = !{!113} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/uint.carbon b/toolchain/lower/testdata/builtins/uint.carbon index ddcea30832cf..ef524d6702af 100644 --- a/toolchain/lower/testdata/builtins/uint.carbon +++ b/toolchain/lower/testdata/builtins/uint.carbon @@ -69,252 +69,252 @@ fn TestGreaterEq(a: u64, b: u64) -> bool { return GreaterEq(a, b); } // CHECK:STDOUT: source_filename = "uint.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestNegate.Main(i64 %a) #0 !dbg !41 { +// CHECK:STDOUT: define i64 @_CTestNegate.Main(i64 %a) #0 !dbg !43 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Negate.call = sub i64 0, %a, !dbg !47 -// CHECK:STDOUT: ret i64 %Negate.call, !dbg !48 +// CHECK:STDOUT: %Negate.call = sub i64 0, %a, !dbg !49 +// CHECK:STDOUT: ret i64 %Negate.call, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestAdd.Main(i64 %a, i64 %b) #0 !dbg !50 { +// CHECK:STDOUT: define i64 @_CTestAdd.Main(i64 %a, i64 %b) #0 !dbg !52 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Add.call = add i64 %a, %b, !dbg !59 -// CHECK:STDOUT: ret i64 %Add.call, !dbg !60 +// CHECK:STDOUT: %Add.call = add i64 %a, %b, !dbg !61 +// CHECK:STDOUT: ret i64 %Add.call, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestSub.Main(i64 %a, i64 %b) #0 !dbg !62 { +// CHECK:STDOUT: define i64 @_CTestSub.Main(i64 %a, i64 %b) #0 !dbg !64 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Sub.call = sub i64 %a, %b, !dbg !71 -// CHECK:STDOUT: ret i64 %Sub.call, !dbg !72 +// CHECK:STDOUT: %Sub.call = sub i64 %a, %b, !dbg !73 +// CHECK:STDOUT: ret i64 %Sub.call, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestMul.Main(i64 %a, i64 %b) #0 !dbg !74 { +// CHECK:STDOUT: define i64 @_CTestMul.Main(i64 %a, i64 %b) #0 !dbg !76 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Mul.call = mul i64 %a, %b, !dbg !83 -// CHECK:STDOUT: ret i64 %Mul.call, !dbg !84 +// CHECK:STDOUT: %Mul.call = mul i64 %a, %b, !dbg !85 +// CHECK:STDOUT: ret i64 %Mul.call, !dbg !86 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestDiv.Main(i64 %a, i64 %b) #0 !dbg !86 { +// CHECK:STDOUT: define i64 @_CTestDiv.Main(i64 %a, i64 %b) #0 !dbg !88 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Div.call = udiv i64 %a, %b, !dbg !95 -// CHECK:STDOUT: ret i64 %Div.call, !dbg !96 +// CHECK:STDOUT: %Div.call = udiv i64 %a, %b, !dbg !97 +// CHECK:STDOUT: ret i64 %Div.call, !dbg !98 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestMod.Main(i64 %a, i64 %b) #0 !dbg !98 { +// CHECK:STDOUT: define i64 @_CTestMod.Main(i64 %a, i64 %b) #0 !dbg !100 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Mod.call = urem i64 %a, %b, !dbg !107 -// CHECK:STDOUT: ret i64 %Mod.call, !dbg !108 +// CHECK:STDOUT: %Mod.call = urem i64 %a, %b, !dbg !109 +// CHECK:STDOUT: ret i64 %Mod.call, !dbg !110 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestComplement.Main(i64 %a) #0 !dbg !110 { +// CHECK:STDOUT: define i64 @_CTestComplement.Main(i64 %a) #0 !dbg !112 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Complement.call = xor i64 -1, %a, !dbg !116 -// CHECK:STDOUT: ret i64 %Complement.call, !dbg !117 +// CHECK:STDOUT: %Complement.call = xor i64 -1, %a, !dbg !118 +// CHECK:STDOUT: ret i64 %Complement.call, !dbg !119 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestAnd.Main(i64 %a, i64 %b) #0 !dbg !119 { +// CHECK:STDOUT: define i64 @_CTestAnd.Main(i64 %a, i64 %b) #0 !dbg !121 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %And.call = and i64 %a, %b, !dbg !128 -// CHECK:STDOUT: ret i64 %And.call, !dbg !129 +// CHECK:STDOUT: %And.call = and i64 %a, %b, !dbg !130 +// CHECK:STDOUT: ret i64 %And.call, !dbg !131 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestOr.Main(i64 %a, i64 %b) #0 !dbg !131 { +// CHECK:STDOUT: define i64 @_CTestOr.Main(i64 %a, i64 %b) #0 !dbg !133 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Or.call = or i64 %a, %b, !dbg !140 -// CHECK:STDOUT: ret i64 %Or.call, !dbg !141 +// CHECK:STDOUT: %Or.call = or i64 %a, %b, !dbg !142 +// CHECK:STDOUT: ret i64 %Or.call, !dbg !143 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestXor.Main(i64 %a, i64 %b) #0 !dbg !143 { +// CHECK:STDOUT: define i64 @_CTestXor.Main(i64 %a, i64 %b) #0 !dbg !145 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Xor.call = xor i64 %a, %b, !dbg !152 -// CHECK:STDOUT: ret i64 %Xor.call, !dbg !153 +// CHECK:STDOUT: %Xor.call = xor i64 %a, %b, !dbg !154 +// CHECK:STDOUT: ret i64 %Xor.call, !dbg !155 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestLeftShift.Main(i64 %a, i64 %b) #0 !dbg !155 { +// CHECK:STDOUT: define i64 @_CTestLeftShift.Main(i64 %a, i64 %b) #0 !dbg !157 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %LeftShift.call = shl i64 %a, %b, !dbg !164 -// CHECK:STDOUT: ret i64 %LeftShift.call, !dbg !165 +// CHECK:STDOUT: %LeftShift.call = shl i64 %a, %b, !dbg !166 +// CHECK:STDOUT: ret i64 %LeftShift.call, !dbg !167 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CTestRightShift.Main(i64 %a, i64 %b) #0 !dbg !167 { +// CHECK:STDOUT: define i64 @_CTestRightShift.Main(i64 %a, i64 %b) #0 !dbg !169 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %RightShift.call = lshr i64 %a, %b, !dbg !176 -// CHECK:STDOUT: ret i64 %RightShift.call, !dbg !177 +// CHECK:STDOUT: %RightShift.call = lshr i64 %a, %b, !dbg !178 +// CHECK:STDOUT: ret i64 %RightShift.call, !dbg !179 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestEq.Main(i64 %a, i64 %b) #0 !dbg !179 { +// CHECK:STDOUT: define i1 @_CTestEq.Main(i64 %a, i64 %b) #0 !dbg !181 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Eq.call = icmp eq i64 %a, %b, !dbg !188 -// CHECK:STDOUT: ret i1 %Eq.call, !dbg !189 +// CHECK:STDOUT: %Eq.call = icmp eq i64 %a, %b, !dbg !190 +// CHECK:STDOUT: ret i1 %Eq.call, !dbg !191 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestNeq.Main(i64 %a, i64 %b) #0 !dbg !191 { +// CHECK:STDOUT: define i1 @_CTestNeq.Main(i64 %a, i64 %b) #0 !dbg !193 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Neq.call = icmp ne i64 %a, %b, !dbg !200 -// CHECK:STDOUT: ret i1 %Neq.call, !dbg !201 +// CHECK:STDOUT: %Neq.call = icmp ne i64 %a, %b, !dbg !202 +// CHECK:STDOUT: ret i1 %Neq.call, !dbg !203 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestLess.Main(i64 %a, i64 %b) #0 !dbg !203 { +// CHECK:STDOUT: define i1 @_CTestLess.Main(i64 %a, i64 %b) #0 !dbg !205 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Less.call = icmp ult i64 %a, %b, !dbg !212 -// CHECK:STDOUT: ret i1 %Less.call, !dbg !213 +// CHECK:STDOUT: %Less.call = icmp ult i64 %a, %b, !dbg !214 +// CHECK:STDOUT: ret i1 %Less.call, !dbg !215 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestLessEq.Main(i64 %a, i64 %b) #0 !dbg !215 { +// CHECK:STDOUT: define i1 @_CTestLessEq.Main(i64 %a, i64 %b) #0 !dbg !217 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %LessEq.call = icmp ule i64 %a, %b, !dbg !224 -// CHECK:STDOUT: ret i1 %LessEq.call, !dbg !225 +// CHECK:STDOUT: %LessEq.call = icmp ule i64 %a, %b, !dbg !226 +// CHECK:STDOUT: ret i1 %LessEq.call, !dbg !227 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestGreater.Main(i64 %a, i64 %b) #0 !dbg !227 { +// CHECK:STDOUT: define i1 @_CTestGreater.Main(i64 %a, i64 %b) #0 !dbg !229 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Greater.call = icmp ugt i64 %a, %b, !dbg !236 -// CHECK:STDOUT: ret i1 %Greater.call, !dbg !237 +// CHECK:STDOUT: %Greater.call = icmp ugt i64 %a, %b, !dbg !238 +// CHECK:STDOUT: ret i1 %Greater.call, !dbg !239 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CTestGreaterEq.Main(i64 %a, i64 %b) #0 !dbg !239 { +// CHECK:STDOUT: define i1 @_CTestGreaterEq.Main(i64 %a, i64 %b) #0 !dbg !241 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %GreaterEq.call = icmp uge i64 %a, %b, !dbg !248 -// CHECK:STDOUT: ret i1 %GreaterEq.call, !dbg !249 +// CHECK:STDOUT: %GreaterEq.call = icmp uge i64 %a, %b, !dbg !250 +// CHECK:STDOUT: ret i1 %GreaterEq.call, !dbg !251 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !17 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !32 = !DIFile(filename: "uint.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !{!17, !17} -// CHECK:STDOUT: !35 = !DISubroutineType(types: !34) -// CHECK:STDOUT: !36 = !{!17, !17, !17} +// CHECK:STDOUT: !19 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !34 = !DIFile(filename: "uint.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !{!19, !19} // CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !38 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !39 = !{!38, !17, !17} -// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "TestNegate", linkageName: "_CTestNegate.Main", scope: null, file: !32, line: 14, type: !35, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !49) -// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !17) -// CHECK:STDOUT: !47 = !DILocation(line: 14, column: 39, scope: !41) -// CHECK:STDOUT: !48 = !DILocation(line: 14, column: 32, scope: !41) -// CHECK:STDOUT: !49 = !{!42} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !32, line: 17, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !61) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !17) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 2, scope: !50, type: !17) -// CHECK:STDOUT: !59 = !DILocation(line: 17, column: 44, scope: !50) -// CHECK:STDOUT: !60 = !DILocation(line: 17, column: 37, scope: !50) -// CHECK:STDOUT: !61 = !{!51, !52} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !32, line: 20, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !73) -// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !17) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 2, scope: !62, type: !17) -// CHECK:STDOUT: !71 = !DILocation(line: 20, column: 44, scope: !62) -// CHECK:STDOUT: !72 = !DILocation(line: 20, column: 37, scope: !62) -// CHECK:STDOUT: !73 = !{!63, !64} -// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !32, line: 23, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !85) -// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !17) -// CHECK:STDOUT: !76 = !DILocalVariable(arg: 2, scope: !74, type: !17) -// CHECK:STDOUT: !83 = !DILocation(line: 23, column: 44, scope: !74) -// CHECK:STDOUT: !84 = !DILocation(line: 23, column: 37, scope: !74) -// CHECK:STDOUT: !85 = !{!75, !76} -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !32, line: 26, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !97) -// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !17) -// CHECK:STDOUT: !88 = !DILocalVariable(arg: 2, scope: !86, type: !17) -// CHECK:STDOUT: !95 = !DILocation(line: 26, column: 44, scope: !86) -// CHECK:STDOUT: !96 = !DILocation(line: 26, column: 37, scope: !86) -// CHECK:STDOUT: !97 = !{!87, !88} -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "TestMod", linkageName: "_CTestMod.Main", scope: null, file: !32, line: 29, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !109) -// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !17) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 2, scope: !98, type: !17) -// CHECK:STDOUT: !107 = !DILocation(line: 29, column: 44, scope: !98) -// CHECK:STDOUT: !108 = !DILocation(line: 29, column: 37, scope: !98) -// CHECK:STDOUT: !109 = !{!99, !100} -// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "TestComplement", linkageName: "_CTestComplement.Main", scope: null, file: !32, line: 32, type: !35, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !118) -// CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !17) -// CHECK:STDOUT: !116 = !DILocation(line: 32, column: 43, scope: !110) -// CHECK:STDOUT: !117 = !DILocation(line: 32, column: 36, scope: !110) -// CHECK:STDOUT: !118 = !{!111} -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "TestAnd", linkageName: "_CTestAnd.Main", scope: null, file: !32, line: 35, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !130) -// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !17) -// CHECK:STDOUT: !121 = !DILocalVariable(arg: 2, scope: !119, type: !17) -// CHECK:STDOUT: !128 = !DILocation(line: 35, column: 44, scope: !119) -// CHECK:STDOUT: !129 = !DILocation(line: 35, column: 37, scope: !119) -// CHECK:STDOUT: !130 = !{!120, !121} -// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "TestOr", linkageName: "_CTestOr.Main", scope: null, file: !32, line: 38, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !142) -// CHECK:STDOUT: !132 = !DILocalVariable(arg: 1, scope: !131, type: !17) -// CHECK:STDOUT: !133 = !DILocalVariable(arg: 2, scope: !131, type: !17) -// CHECK:STDOUT: !140 = !DILocation(line: 38, column: 43, scope: !131) -// CHECK:STDOUT: !141 = !DILocation(line: 38, column: 36, scope: !131) -// CHECK:STDOUT: !142 = !{!132, !133} -// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "TestXor", linkageName: "_CTestXor.Main", scope: null, file: !32, line: 41, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !154) -// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !17) -// CHECK:STDOUT: !145 = !DILocalVariable(arg: 2, scope: !143, type: !17) -// CHECK:STDOUT: !152 = !DILocation(line: 41, column: 44, scope: !143) -// CHECK:STDOUT: !153 = !DILocation(line: 41, column: 37, scope: !143) -// CHECK:STDOUT: !154 = !{!144, !145} -// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "TestLeftShift", linkageName: "_CTestLeftShift.Main", scope: null, file: !32, line: 44, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !166) -// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !17) -// CHECK:STDOUT: !157 = !DILocalVariable(arg: 2, scope: !155, type: !17) -// CHECK:STDOUT: !164 = !DILocation(line: 44, column: 50, scope: !155) -// CHECK:STDOUT: !165 = !DILocation(line: 44, column: 43, scope: !155) -// CHECK:STDOUT: !166 = !{!156, !157} -// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "TestRightShift", linkageName: "_CTestRightShift.Main", scope: null, file: !32, line: 47, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !178) -// CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !167, type: !17) -// CHECK:STDOUT: !169 = !DILocalVariable(arg: 2, scope: !167, type: !17) -// CHECK:STDOUT: !176 = !DILocation(line: 47, column: 51, scope: !167) -// CHECK:STDOUT: !177 = !DILocation(line: 47, column: 44, scope: !167) -// CHECK:STDOUT: !178 = !{!168, !169} -// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !32, line: 50, type: !40, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !190) -// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !17) -// CHECK:STDOUT: !181 = !DILocalVariable(arg: 2, scope: !179, type: !17) -// CHECK:STDOUT: !188 = !DILocation(line: 50, column: 44, scope: !179) -// CHECK:STDOUT: !189 = !DILocation(line: 50, column: 37, scope: !179) -// CHECK:STDOUT: !190 = !{!180, !181} -// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !32, line: 53, type: !40, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !202) -// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !17) -// CHECK:STDOUT: !193 = !DILocalVariable(arg: 2, scope: !191, type: !17) -// CHECK:STDOUT: !200 = !DILocation(line: 53, column: 45, scope: !191) -// CHECK:STDOUT: !201 = !DILocation(line: 53, column: 38, scope: !191) -// CHECK:STDOUT: !202 = !{!192, !193} -// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "TestLess", linkageName: "_CTestLess.Main", scope: null, file: !32, line: 56, type: !40, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !214) -// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !17) -// CHECK:STDOUT: !205 = !DILocalVariable(arg: 2, scope: !203, type: !17) -// CHECK:STDOUT: !212 = !DILocation(line: 56, column: 46, scope: !203) -// CHECK:STDOUT: !213 = !DILocation(line: 56, column: 39, scope: !203) -// CHECK:STDOUT: !214 = !{!204, !205} -// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "TestLessEq", linkageName: "_CTestLessEq.Main", scope: null, file: !32, line: 59, type: !40, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !226) -// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !17) -// CHECK:STDOUT: !217 = !DILocalVariable(arg: 2, scope: !215, type: !17) -// CHECK:STDOUT: !224 = !DILocation(line: 59, column: 48, scope: !215) -// CHECK:STDOUT: !225 = !DILocation(line: 59, column: 41, scope: !215) -// CHECK:STDOUT: !226 = !{!216, !217} -// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "TestGreater", linkageName: "_CTestGreater.Main", scope: null, file: !32, line: 62, type: !40, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !238) -// CHECK:STDOUT: !228 = !DILocalVariable(arg: 1, scope: !227, type: !17) -// CHECK:STDOUT: !229 = !DILocalVariable(arg: 2, scope: !227, type: !17) -// CHECK:STDOUT: !236 = !DILocation(line: 62, column: 49, scope: !227) -// CHECK:STDOUT: !237 = !DILocation(line: 62, column: 42, scope: !227) -// CHECK:STDOUT: !238 = !{!228, !229} -// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "TestGreaterEq", linkageName: "_CTestGreaterEq.Main", scope: null, file: !32, line: 65, type: !40, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !250) -// CHECK:STDOUT: !240 = !DILocalVariable(arg: 1, scope: !239, type: !17) -// CHECK:STDOUT: !241 = !DILocalVariable(arg: 2, scope: !239, type: !17) -// CHECK:STDOUT: !248 = !DILocation(line: 65, column: 51, scope: !239) -// CHECK:STDOUT: !249 = !DILocation(line: 65, column: 44, scope: !239) -// CHECK:STDOUT: !250 = !{!240, !241} +// CHECK:STDOUT: !38 = !{!19, !19, !19} +// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) +// CHECK:STDOUT: !40 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !41 = !{!40, !19, !19} +// CHECK:STDOUT: !42 = !DISubroutineType(types: !41) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "TestNegate", linkageName: "_CTestNegate.Main", scope: null, file: !34, line: 14, type: !37, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !51) +// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !19) +// CHECK:STDOUT: !49 = !DILocation(line: 14, column: 39, scope: !43) +// CHECK:STDOUT: !50 = !DILocation(line: 14, column: 32, scope: !43) +// CHECK:STDOUT: !51 = !{!44} +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !34, line: 17, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !63) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !19) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 2, scope: !52, type: !19) +// CHECK:STDOUT: !61 = !DILocation(line: 17, column: 44, scope: !52) +// CHECK:STDOUT: !62 = !DILocation(line: 17, column: 37, scope: !52) +// CHECK:STDOUT: !63 = !{!53, !54} +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !34, line: 20, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !75) +// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !19) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 2, scope: !64, type: !19) +// CHECK:STDOUT: !73 = !DILocation(line: 20, column: 44, scope: !64) +// CHECK:STDOUT: !74 = !DILocation(line: 20, column: 37, scope: !64) +// CHECK:STDOUT: !75 = !{!65, !66} +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !34, line: 23, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !87) +// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !19) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 2, scope: !76, type: !19) +// CHECK:STDOUT: !85 = !DILocation(line: 23, column: 44, scope: !76) +// CHECK:STDOUT: !86 = !DILocation(line: 23, column: 37, scope: !76) +// CHECK:STDOUT: !87 = !{!77, !78} +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !34, line: 26, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !99) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !19) +// CHECK:STDOUT: !90 = !DILocalVariable(arg: 2, scope: !88, type: !19) +// CHECK:STDOUT: !97 = !DILocation(line: 26, column: 44, scope: !88) +// CHECK:STDOUT: !98 = !DILocation(line: 26, column: 37, scope: !88) +// CHECK:STDOUT: !99 = !{!89, !90} +// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "TestMod", linkageName: "_CTestMod.Main", scope: null, file: !34, line: 29, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !111) +// CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !100, type: !19) +// CHECK:STDOUT: !102 = !DILocalVariable(arg: 2, scope: !100, type: !19) +// CHECK:STDOUT: !109 = !DILocation(line: 29, column: 44, scope: !100) +// CHECK:STDOUT: !110 = !DILocation(line: 29, column: 37, scope: !100) +// CHECK:STDOUT: !111 = !{!101, !102} +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "TestComplement", linkageName: "_CTestComplement.Main", scope: null, file: !34, line: 32, type: !37, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !120) +// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !19) +// CHECK:STDOUT: !118 = !DILocation(line: 32, column: 43, scope: !112) +// CHECK:STDOUT: !119 = !DILocation(line: 32, column: 36, scope: !112) +// CHECK:STDOUT: !120 = !{!113} +// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "TestAnd", linkageName: "_CTestAnd.Main", scope: null, file: !34, line: 35, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !132) +// CHECK:STDOUT: !122 = !DILocalVariable(arg: 1, scope: !121, type: !19) +// CHECK:STDOUT: !123 = !DILocalVariable(arg: 2, scope: !121, type: !19) +// CHECK:STDOUT: !130 = !DILocation(line: 35, column: 44, scope: !121) +// CHECK:STDOUT: !131 = !DILocation(line: 35, column: 37, scope: !121) +// CHECK:STDOUT: !132 = !{!122, !123} +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "TestOr", linkageName: "_CTestOr.Main", scope: null, file: !34, line: 38, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !144) +// CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !133, type: !19) +// CHECK:STDOUT: !135 = !DILocalVariable(arg: 2, scope: !133, type: !19) +// CHECK:STDOUT: !142 = !DILocation(line: 38, column: 43, scope: !133) +// CHECK:STDOUT: !143 = !DILocation(line: 38, column: 36, scope: !133) +// CHECK:STDOUT: !144 = !{!134, !135} +// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "TestXor", linkageName: "_CTestXor.Main", scope: null, file: !34, line: 41, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !156) +// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !19) +// CHECK:STDOUT: !147 = !DILocalVariable(arg: 2, scope: !145, type: !19) +// CHECK:STDOUT: !154 = !DILocation(line: 41, column: 44, scope: !145) +// CHECK:STDOUT: !155 = !DILocation(line: 41, column: 37, scope: !145) +// CHECK:STDOUT: !156 = !{!146, !147} +// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "TestLeftShift", linkageName: "_CTestLeftShift.Main", scope: null, file: !34, line: 44, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !168) +// CHECK:STDOUT: !158 = !DILocalVariable(arg: 1, scope: !157, type: !19) +// CHECK:STDOUT: !159 = !DILocalVariable(arg: 2, scope: !157, type: !19) +// CHECK:STDOUT: !166 = !DILocation(line: 44, column: 50, scope: !157) +// CHECK:STDOUT: !167 = !DILocation(line: 44, column: 43, scope: !157) +// CHECK:STDOUT: !168 = !{!158, !159} +// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "TestRightShift", linkageName: "_CTestRightShift.Main", scope: null, file: !34, line: 47, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !180) +// CHECK:STDOUT: !170 = !DILocalVariable(arg: 1, scope: !169, type: !19) +// CHECK:STDOUT: !171 = !DILocalVariable(arg: 2, scope: !169, type: !19) +// CHECK:STDOUT: !178 = !DILocation(line: 47, column: 51, scope: !169) +// CHECK:STDOUT: !179 = !DILocation(line: 47, column: 44, scope: !169) +// CHECK:STDOUT: !180 = !{!170, !171} +// CHECK:STDOUT: !181 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !34, line: 50, type: !42, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !192) +// CHECK:STDOUT: !182 = !DILocalVariable(arg: 1, scope: !181, type: !19) +// CHECK:STDOUT: !183 = !DILocalVariable(arg: 2, scope: !181, type: !19) +// CHECK:STDOUT: !190 = !DILocation(line: 50, column: 44, scope: !181) +// CHECK:STDOUT: !191 = !DILocation(line: 50, column: 37, scope: !181) +// CHECK:STDOUT: !192 = !{!182, !183} +// CHECK:STDOUT: !193 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !34, line: 53, type: !42, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !204) +// CHECK:STDOUT: !194 = !DILocalVariable(arg: 1, scope: !193, type: !19) +// CHECK:STDOUT: !195 = !DILocalVariable(arg: 2, scope: !193, type: !19) +// CHECK:STDOUT: !202 = !DILocation(line: 53, column: 45, scope: !193) +// CHECK:STDOUT: !203 = !DILocation(line: 53, column: 38, scope: !193) +// CHECK:STDOUT: !204 = !{!194, !195} +// CHECK:STDOUT: !205 = distinct !DISubprogram(name: "TestLess", linkageName: "_CTestLess.Main", scope: null, file: !34, line: 56, type: !42, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !216) +// CHECK:STDOUT: !206 = !DILocalVariable(arg: 1, scope: !205, type: !19) +// CHECK:STDOUT: !207 = !DILocalVariable(arg: 2, scope: !205, type: !19) +// CHECK:STDOUT: !214 = !DILocation(line: 56, column: 46, scope: !205) +// CHECK:STDOUT: !215 = !DILocation(line: 56, column: 39, scope: !205) +// CHECK:STDOUT: !216 = !{!206, !207} +// CHECK:STDOUT: !217 = distinct !DISubprogram(name: "TestLessEq", linkageName: "_CTestLessEq.Main", scope: null, file: !34, line: 59, type: !42, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !228) +// CHECK:STDOUT: !218 = !DILocalVariable(arg: 1, scope: !217, type: !19) +// CHECK:STDOUT: !219 = !DILocalVariable(arg: 2, scope: !217, type: !19) +// CHECK:STDOUT: !226 = !DILocation(line: 59, column: 48, scope: !217) +// CHECK:STDOUT: !227 = !DILocation(line: 59, column: 41, scope: !217) +// CHECK:STDOUT: !228 = !{!218, !219} +// CHECK:STDOUT: !229 = distinct !DISubprogram(name: "TestGreater", linkageName: "_CTestGreater.Main", scope: null, file: !34, line: 62, type: !42, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !240) +// CHECK:STDOUT: !230 = !DILocalVariable(arg: 1, scope: !229, type: !19) +// CHECK:STDOUT: !231 = !DILocalVariable(arg: 2, scope: !229, type: !19) +// CHECK:STDOUT: !238 = !DILocation(line: 62, column: 49, scope: !229) +// CHECK:STDOUT: !239 = !DILocation(line: 62, column: 42, scope: !229) +// CHECK:STDOUT: !240 = !{!230, !231} +// CHECK:STDOUT: !241 = distinct !DISubprogram(name: "TestGreaterEq", linkageName: "_CTestGreaterEq.Main", scope: null, file: !34, line: 65, type: !42, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !252) +// CHECK:STDOUT: !242 = !DILocalVariable(arg: 1, scope: !241, type: !19) +// CHECK:STDOUT: !243 = !DILocalVariable(arg: 2, scope: !241, type: !19) +// CHECK:STDOUT: !250 = !DILocation(line: 65, column: 51, scope: !241) +// CHECK:STDOUT: !251 = !DILocation(line: 65, column: 44, scope: !241) +// CHECK:STDOUT: !252 = !{!242, !243} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/generic.carbon b/toolchain/lower/testdata/class/generic.carbon index c0eb743cdd62..978c397486b7 100644 --- a/toolchain/lower/testdata/class/generic.carbon +++ b/toolchain/lower/testdata/class/generic.carbon @@ -106,13 +106,13 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: ; ModuleID = 'classes.carbon' // CHECK:STDOUT: source_filename = "classes.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "classes.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !34 = !DIFile(filename: "classes.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'create.carbon' @@ -121,20 +121,20 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: @Derived.val.loc7_36 = internal constant { { i32 }, i32 } { { i32 } { i32 1 }, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCreateDerived.Create(ptr sret({ { i32 }, i32 }) %return) #0 !dbg !40 { +// CHECK:STDOUT: define void @_CCreateDerived.Create(ptr sret({ { i32 }, i32 }) %return) #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_35.2.base = getelementptr inbounds nuw { { i32 }, i32 }, ptr %return, i32 0, i32 0, !dbg !43 -// CHECK:STDOUT: %.loc7_26.3.b = getelementptr inbounds nuw { i32 }, ptr %.loc7_35.2.base, i32 0, i32 0, !dbg !44 -// CHECK:STDOUT: %.loc7_35.6.d = getelementptr inbounds nuw { { i32 }, i32 }, ptr %return, i32 0, i32 1, !dbg !43 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @Derived.val.loc7_36, i64 8, i1 false), !dbg !45 -// CHECK:STDOUT: ret void, !dbg !45 +// CHECK:STDOUT: %.loc7_35.2.base = getelementptr inbounds nuw { { i32 }, i32 }, ptr %return, i32 0, i32 0, !dbg !45 +// CHECK:STDOUT: %.loc7_26.3.b = getelementptr inbounds nuw { i32 }, ptr %.loc7_35.2.base, i32 0, i32 0, !dbg !46 +// CHECK:STDOUT: %.loc7_35.6.d = getelementptr inbounds nuw { { i32 }, i32 }, ptr %return, i32 0, i32 1, !dbg !45 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @Derived.val.loc7_36, i64 8, i1 false), !dbg !47 +// CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCreateAdapter.Create(ptr sret({ { i32 }, i32 }) %return) #0 !dbg !46 { +// CHECK:STDOUT: define void @_CCreateAdapter.Create(ptr sret({ { i32 }, i32 }) %return) #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CCreateDerived.Create(ptr %return), !dbg !49 -// CHECK:STDOUT: ret void, !dbg !50 +// CHECK:STDOUT: call void @_CCreateDerived.Create(ptr %return), !dbg !51 +// CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -143,23 +143,23 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!35} +// CHECK:STDOUT: !llvm.dbg.cu = !{!37} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !34 = !DIFile(filename: "create.carbon", directory: "") -// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !38 = !{!37} -// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "CreateDerived", linkageName: "_CCreateDerived.Create", scope: null, file: !34, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !43 = !DILocation(line: 7, column: 10, scope: !40) -// CHECK:STDOUT: !44 = !DILocation(line: 7, column: 19, scope: !40) -// CHECK:STDOUT: !45 = !DILocation(line: 7, column: 3, scope: !40) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "CreateAdapter", linkageName: "_CCreateAdapter.Create", scope: null, file: !34, line: 10, type: !39, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !49 = !DILocation(line: 11, column: 10, scope: !46) -// CHECK:STDOUT: !50 = !DILocation(line: 11, column: 3, scope: !46) +// CHECK:STDOUT: !36 = !DIFile(filename: "create.carbon", directory: "") +// CHECK:STDOUT: !37 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !36, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !40 = !{!39} +// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "CreateDerived", linkageName: "_CCreateDerived.Create", scope: null, file: !36, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !37) +// CHECK:STDOUT: !45 = !DILocation(line: 7, column: 10, scope: !42) +// CHECK:STDOUT: !46 = !DILocation(line: 7, column: 19, scope: !42) +// CHECK:STDOUT: !47 = !DILocation(line: 7, column: 3, scope: !42) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "CreateAdapter", linkageName: "_CCreateAdapter.Create", scope: null, file: !36, line: 10, type: !41, spFlags: DISPFlagDefinition, unit: !37) +// CHECK:STDOUT: !51 = !DILocation(line: 11, column: 10, scope: !48) +// CHECK:STDOUT: !52 = !DILocation(line: 11, column: 3, scope: !48) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'create_generic.carbon' @@ -168,65 +168,65 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: @tuple.102.loc22_28.6 = internal constant { i32, i32 } { i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInts.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !53 { +// CHECK:STDOUT: define void @_CInts.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CMake.Main.4d6ceefeb7f772f4(ptr %return, i32 1, i32 2), !dbg !56 -// CHECK:STDOUT: ret void, !dbg !59 +// CHECK:STDOUT: call void @_CMake.Main.4d6ceefeb7f772f4(ptr %return, i32 1, i32 2), !dbg !58 +// CHECK:STDOUT: ret void, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CEmpty.Main(ptr sret({ {}, {} }) %return) #0 !dbg !60 { +// CHECK:STDOUT: define void @_CEmpty.Main(ptr sret({ {}, {} }) %return) #0 !dbg !62 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CMake.Main.22bf4b2f6c4322a2(ptr %return), !dbg !63 -// CHECK:STDOUT: ret void, !dbg !64 +// CHECK:STDOUT: call void @_CMake.Main.22bf4b2f6c4322a2(ptr %return), !dbg !65 +// CHECK:STDOUT: ret void, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTuples.Main(ptr sret({ { i32, i32 }, { i32, i32 } }) %return) #0 !dbg !65 { +// CHECK:STDOUT: define void @_CTuples.Main(ptr sret({ { i32, i32 }, { i32, i32 } }) %return) #0 !dbg !67 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CMake.Main.878c3517da47a752(ptr %return, ptr @tuple.102.loc22_28.6, ptr @tuple.102.loc22_28.6), !dbg !72 -// CHECK:STDOUT: ret void, !dbg !75 +// CHECK:STDOUT: call void @_CMake.Main.878c3517da47a752(ptr %return, ptr @tuple.102.loc22_28.6, ptr @tuple.102.loc22_28.6), !dbg !74 +// CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CMake.Main.4d6ceefeb7f772f4(ptr sret({ i32, i32 }) %return, i32 %x, i32 %y) #0 !dbg !76 { +// CHECK:STDOUT: define linkonce_odr void @_CMake.Main.4d6ceefeb7f772f4(ptr sret({ i32, i32 }) %return, i32 %x, i32 %y) #0 !dbg !78 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc10_25.2.x = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !85 -// CHECK:STDOUT: store i32 %x, ptr %.loc10_25.2.x, align 4, !dbg !85 -// CHECK:STDOUT: %.loc10_25.4.y = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !85 -// CHECK:STDOUT: store i32 %y, ptr %.loc10_25.4.y, align 4, !dbg !85 -// CHECK:STDOUT: ret void, !dbg !86 +// CHECK:STDOUT: %.loc10_25.2.x = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !87 +// CHECK:STDOUT: store i32 %x, ptr %.loc10_25.2.x, align 4, !dbg !87 +// CHECK:STDOUT: %.loc10_25.4.y = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !87 +// CHECK:STDOUT: store i32 %y, ptr %.loc10_25.4.y, align 4, !dbg !87 +// CHECK:STDOUT: ret void, !dbg !88 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CMake.Main.22bf4b2f6c4322a2(ptr sret({ {}, {} }) %return) #0 !dbg !88 { +// CHECK:STDOUT: define linkonce_odr void @_CMake.Main.22bf4b2f6c4322a2(ptr sret({ {}, {} }) %return) #0 !dbg !90 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc10_25.2.x = getelementptr inbounds nuw { {}, {} }, ptr %return, i32 0, i32 0, !dbg !95 -// CHECK:STDOUT: %.loc10_25.4.y = getelementptr inbounds nuw { {}, {} }, ptr %return, i32 0, i32 1, !dbg !95 -// CHECK:STDOUT: ret void, !dbg !96 +// CHECK:STDOUT: %.loc10_25.2.x = getelementptr inbounds nuw { {}, {} }, ptr %return, i32 0, i32 0, !dbg !97 +// CHECK:STDOUT: %.loc10_25.4.y = getelementptr inbounds nuw { {}, {} }, ptr %return, i32 0, i32 1, !dbg !97 +// CHECK:STDOUT: ret void, !dbg !98 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CMake.Main.878c3517da47a752(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %x, ptr %y) #0 !dbg !97 { +// CHECK:STDOUT: define linkonce_odr void @_CMake.Main.878c3517da47a752(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %x, ptr %y) #0 !dbg !99 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc10_25.2.x = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %return, i32 0, i32 0, !dbg !106 -// CHECK:STDOUT: call void @"_COp.4e4edddc7580c79b:Copy.Core.8608f3c6f62d80cb"(ptr %.loc10_25.2.x, ptr %x), !dbg !104 -// CHECK:STDOUT: %.loc10_25.4.y = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %return, i32 0, i32 1, !dbg !106 -// CHECK:STDOUT: call void @"_COp.4e4edddc7580c79b:Copy.Core.8608f3c6f62d80cb"(ptr %.loc10_25.4.y, ptr %y), !dbg !105 -// CHECK:STDOUT: ret void, !dbg !109 +// CHECK:STDOUT: %.loc10_25.2.x = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %return, i32 0, i32 0, !dbg !108 +// CHECK:STDOUT: call void @"_COp.4e4edddc7580c79b:Copy.Core.8608f3c6f62d80cb"(ptr %.loc10_25.2.x, ptr %x), !dbg !106 +// CHECK:STDOUT: %.loc10_25.4.y = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %return, i32 0, i32 1, !dbg !108 +// CHECK:STDOUT: call void @"_COp.4e4edddc7580c79b:Copy.Core.8608f3c6f62d80cb"(ptr %.loc10_25.4.y, ptr %y), !dbg !107 +// CHECK:STDOUT: ret void, !dbg !111 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.4e4edddc7580c79b:Copy.Core.8608f3c6f62d80cb"(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !111 { -// CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !116 -// CHECK:STDOUT: %tuple.elem.load = load i32, ptr %tuple.elem, align 4, !dbg !116 -// CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !117 -// CHECK:STDOUT: %tuple.elem2 = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !118 -// CHECK:STDOUT: %tuple.elem.load3 = load i32, ptr %tuple.elem2, align 4, !dbg !118 -// CHECK:STDOUT: %tuple.elem4 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !117 -// CHECK:STDOUT: store i32 %tuple.elem.load, ptr %tuple.elem1, align 4, !dbg !117 -// CHECK:STDOUT: store i32 %tuple.elem.load3, ptr %tuple.elem4, align 4, !dbg !117 -// CHECK:STDOUT: ret void, !dbg !119 +// CHECK:STDOUT: define linkonce_odr void @"_COp.4e4edddc7580c79b:Copy.Core.8608f3c6f62d80cb"(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !113 { +// CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !118 +// CHECK:STDOUT: %tuple.elem.load = load i32, ptr %tuple.elem, align 4, !dbg !118 +// CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !119 +// CHECK:STDOUT: %tuple.elem2 = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !120 +// CHECK:STDOUT: %tuple.elem.load3 = load i32, ptr %tuple.elem2, align 4, !dbg !120 +// CHECK:STDOUT: %tuple.elem4 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !119 +// CHECK:STDOUT: store i32 %tuple.elem.load, ptr %tuple.elem1, align 4, !dbg !119 +// CHECK:STDOUT: store i32 %tuple.elem.load3, ptr %tuple.elem4, align 4, !dbg !119 +// CHECK:STDOUT: ret void, !dbg !121 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -234,57 +234,57 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!52} +// CHECK:STDOUT: !llvm.dbg.cu = !{!54} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !9 = !DIFile(filename: "min_prelude/parts/copy.carbon", directory: "") -// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !38 = !{!37} -// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !51 = !DIFile(filename: "create_generic.carbon", directory: "") -// CHECK:STDOUT: !52 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !51, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Ints", linkageName: "_CInts.Main", scope: null, file: !51, line: 13, type: !39, spFlags: DISPFlagDefinition, unit: !52) -// CHECK:STDOUT: !56 = !DILocation(line: 14, column: 10, scope: !53) -// CHECK:STDOUT: !57 = !{!37, !36, !36} -// CHECK:STDOUT: !58 = !DISubroutineType(types: !57) -// CHECK:STDOUT: !59 = !DILocation(line: 14, column: 3, scope: !53) -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "Empty", linkageName: "_CEmpty.Main", scope: null, file: !51, line: 17, type: !39, spFlags: DISPFlagDefinition, unit: !52) -// CHECK:STDOUT: !63 = !DILocation(line: 18, column: 10, scope: !60) -// CHECK:STDOUT: !64 = !DILocation(line: 18, column: 3, scope: !60) -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Tuples", linkageName: "_CTuples.Main", scope: null, file: !51, line: 21, type: !39, spFlags: DISPFlagDefinition, unit: !52) -// CHECK:STDOUT: !72 = !DILocation(line: 23, column: 10, scope: !65) -// CHECK:STDOUT: !73 = !{!37, !37, !37} -// CHECK:STDOUT: !74 = !DISubroutineType(types: !73) -// CHECK:STDOUT: !75 = !DILocation(line: 23, column: 3, scope: !65) -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main.4d6ceefeb7f772f4", scope: null, file: !51, line: 9, type: !58, spFlags: DISPFlagDefinition, unit: !52, retainedNodes: !87) -// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !36) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 2, scope: !76, type: !36) -// CHECK:STDOUT: !85 = !DILocation(line: 10, column: 10, scope: !76) -// CHECK:STDOUT: !86 = !DILocation(line: 10, column: 3, scope: !76) -// CHECK:STDOUT: !87 = !{!77, !78} -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main.22bf4b2f6c4322a2", scope: null, file: !51, line: 9, type: !39, spFlags: DISPFlagDefinition, unit: !52) -// CHECK:STDOUT: !95 = !DILocation(line: 10, column: 10, scope: !88) -// CHECK:STDOUT: !96 = !DILocation(line: 10, column: 3, scope: !88) -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main.878c3517da47a752", scope: null, file: !51, line: 9, type: !74, spFlags: DISPFlagDefinition, unit: !52, retainedNodes: !110) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !37) -// CHECK:STDOUT: !99 = !DILocalVariable(arg: 2, scope: !97, type: !37) -// CHECK:STDOUT: !104 = !DILocation(line: 10, column: 16, scope: !97) -// CHECK:STDOUT: !105 = !DILocation(line: 10, column: 24, scope: !97) -// CHECK:STDOUT: !106 = !DILocation(line: 10, column: 10, scope: !97) -// CHECK:STDOUT: !107 = !{!37, !37} -// CHECK:STDOUT: !108 = !DISubroutineType(types: !107) -// CHECK:STDOUT: !109 = !DILocation(line: 10, column: 3, scope: !97) -// CHECK:STDOUT: !110 = !{!98, !99} -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e4edddc7580c79b:Copy.Core.8608f3c6f62d80cb", scope: null, file: !9, line: 52, type: !108, spFlags: DISPFlagDefinition, unit: !52, retainedNodes: !120) -// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !37) -// CHECK:STDOUT: !116 = !DILocation(line: 53, column: 13, scope: !111) -// CHECK:STDOUT: !117 = !DILocation(line: 53, column: 12, scope: !111) -// CHECK:STDOUT: !118 = !DILocation(line: 53, column: 26, scope: !111) -// CHECK:STDOUT: !119 = !DILocation(line: 53, column: 5, scope: !111) -// CHECK:STDOUT: !120 = !{!112} +// CHECK:STDOUT: !11 = !DIFile(filename: "min_prelude/parts/copy.carbon", directory: "") +// CHECK:STDOUT: !38 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !40 = !{!39} +// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) +// CHECK:STDOUT: !53 = !DIFile(filename: "create_generic.carbon", directory: "") +// CHECK:STDOUT: !54 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !53, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Ints", linkageName: "_CInts.Main", scope: null, file: !53, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !54) +// CHECK:STDOUT: !58 = !DILocation(line: 14, column: 10, scope: !55) +// CHECK:STDOUT: !59 = !{!39, !38, !38} +// CHECK:STDOUT: !60 = !DISubroutineType(types: !59) +// CHECK:STDOUT: !61 = !DILocation(line: 14, column: 3, scope: !55) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "Empty", linkageName: "_CEmpty.Main", scope: null, file: !53, line: 17, type: !41, spFlags: DISPFlagDefinition, unit: !54) +// CHECK:STDOUT: !65 = !DILocation(line: 18, column: 10, scope: !62) +// CHECK:STDOUT: !66 = !DILocation(line: 18, column: 3, scope: !62) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "Tuples", linkageName: "_CTuples.Main", scope: null, file: !53, line: 21, type: !41, spFlags: DISPFlagDefinition, unit: !54) +// CHECK:STDOUT: !74 = !DILocation(line: 23, column: 10, scope: !67) +// CHECK:STDOUT: !75 = !{!39, !39, !39} +// CHECK:STDOUT: !76 = !DISubroutineType(types: !75) +// CHECK:STDOUT: !77 = !DILocation(line: 23, column: 3, scope: !67) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main.4d6ceefeb7f772f4", scope: null, file: !53, line: 9, type: !60, spFlags: DISPFlagDefinition, unit: !54, retainedNodes: !89) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !38) +// CHECK:STDOUT: !80 = !DILocalVariable(arg: 2, scope: !78, type: !38) +// CHECK:STDOUT: !87 = !DILocation(line: 10, column: 10, scope: !78) +// CHECK:STDOUT: !88 = !DILocation(line: 10, column: 3, scope: !78) +// CHECK:STDOUT: !89 = !{!79, !80} +// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main.22bf4b2f6c4322a2", scope: null, file: !53, line: 9, type: !41, spFlags: DISPFlagDefinition, unit: !54) +// CHECK:STDOUT: !97 = !DILocation(line: 10, column: 10, scope: !90) +// CHECK:STDOUT: !98 = !DILocation(line: 10, column: 3, scope: !90) +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main.878c3517da47a752", scope: null, file: !53, line: 9, type: !76, spFlags: DISPFlagDefinition, unit: !54, retainedNodes: !112) +// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !39) +// CHECK:STDOUT: !101 = !DILocalVariable(arg: 2, scope: !99, type: !39) +// CHECK:STDOUT: !106 = !DILocation(line: 10, column: 16, scope: !99) +// CHECK:STDOUT: !107 = !DILocation(line: 10, column: 24, scope: !99) +// CHECK:STDOUT: !108 = !DILocation(line: 10, column: 10, scope: !99) +// CHECK:STDOUT: !109 = !{!39, !39} +// CHECK:STDOUT: !110 = !DISubroutineType(types: !109) +// CHECK:STDOUT: !111 = !DILocation(line: 10, column: 3, scope: !99) +// CHECK:STDOUT: !112 = !{!100, !101} +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e4edddc7580c79b:Copy.Core.8608f3c6f62d80cb", scope: null, file: !11, line: 52, type: !110, spFlags: DISPFlagDefinition, unit: !54, retainedNodes: !122) +// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !39) +// CHECK:STDOUT: !118 = !DILocation(line: 53, column: 13, scope: !113) +// CHECK:STDOUT: !119 = !DILocation(line: 53, column: 12, scope: !113) +// CHECK:STDOUT: !120 = !DILocation(line: 53, column: 26, scope: !113) +// CHECK:STDOUT: !121 = !DILocation(line: 53, column: 5, scope: !113) +// CHECK:STDOUT: !122 = !{!114} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'access.carbon' @@ -295,197 +295,197 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: @C.val.727.loc31_3 = internal constant { i1, { i32, i32, i32 } } { i1 true, { i32, i32, i32 } { i32 1, i32 2, i32 3 } } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CAccessBool.Main() #0 !dbg !131 { +// CHECK:STDOUT: define i1 @_CAccessBool.Main() #0 !dbg !133 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i1, i32 }, align 4, !dbg !134 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !134 -// CHECK:STDOUT: %.loc16_37.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 0, !dbg !135 -// CHECK:STDOUT: %.loc16_37.5.w = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 1, !dbg !135 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.29b.loc16_3, i64 8, i1 false), !dbg !134 -// CHECK:STDOUT: %C.GetBool.call = call i1 @_CGetBool.C.Main.4d6ceefeb7f772f4(ptr %c.var), !dbg !137 -// CHECK:STDOUT: call void @"_CSelfDestruct.d012f76a41f764ee:core.Destroy.Core"(ptr %c.var), !dbg !134 -// CHECK:STDOUT: ret i1 %C.GetBool.call, !dbg !138 +// CHECK:STDOUT: %c.var = alloca { i1, i32 }, align 4, !dbg !136 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !136 +// CHECK:STDOUT: %.loc16_37.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 0, !dbg !137 +// CHECK:STDOUT: %.loc16_37.5.w = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 1, !dbg !137 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.29b.loc16_3, i64 8, i1 false), !dbg !136 +// CHECK:STDOUT: %C.GetBool.call = call i1 @_CGetBool.C.Main.4d6ceefeb7f772f4(ptr %c.var), !dbg !139 +// CHECK:STDOUT: call void @"_CSelfDestruct.d012f76a41f764ee:core.Destroy.Core"(ptr %c.var), !dbg !136 +// CHECK:STDOUT: ret i1 %C.GetBool.call, !dbg !140 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !139 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !141 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !141 +// CHECK:STDOUT: ret void, !dbg !143 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !143 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !145 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !145 +// CHECK:STDOUT: ret void, !dbg !147 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.861652b2c489f7cc:core.Destroy.Core"(ptr %self) #0 !dbg !147 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.861652b2c489f7cc:core.Destroy.Core"(ptr %self) #0 !dbg !149 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.w = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 1, !dbg !149 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.1.w), !dbg !149 -// CHECK:STDOUT: %.loc16_3.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 0, !dbg !149 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc16_3.2.v), !dbg !149 -// CHECK:STDOUT: ret void, !dbg !149 +// CHECK:STDOUT: %.loc16_3.1.w = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 1, !dbg !151 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.1.w), !dbg !151 +// CHECK:STDOUT: %.loc16_3.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 0, !dbg !151 +// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc16_3.2.v), !dbg !151 +// CHECK:STDOUT: ret void, !dbg !151 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.861652b2c489f7cc:core.Destroy.Core"(ptr %self) #0 !dbg !151 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.861652b2c489f7cc:core.Destroy.Core"(ptr %self) #0 !dbg !153 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.861652b2c489f7cc:core.Destroy.Core"(ptr %self), !dbg !153 -// CHECK:STDOUT: ret void, !dbg !153 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.861652b2c489f7cc:core.Destroy.Core"(ptr %self), !dbg !155 +// CHECK:STDOUT: ret void, !dbg !155 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d012f76a41f764ee:core.Destroy.Core"(ptr %self) #0 !dbg !155 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d012f76a41f764ee:core.Destroy.Core"(ptr %self) #0 !dbg !157 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.w = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 1, !dbg !157 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.1.w), !dbg !157 -// CHECK:STDOUT: %.loc16_3.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 0, !dbg !157 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc16_3.2.v), !dbg !157 -// CHECK:STDOUT: ret void, !dbg !157 +// CHECK:STDOUT: %.loc16_3.1.w = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 1, !dbg !159 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.1.w), !dbg !159 +// CHECK:STDOUT: %.loc16_3.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 0, !dbg !159 +// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc16_3.2.v), !dbg !159 +// CHECK:STDOUT: ret void, !dbg !159 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d012f76a41f764ee:core.Destroy.Core"(ptr %self) #0 !dbg !159 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d012f76a41f764ee:core.Destroy.Core"(ptr %self) #0 !dbg !161 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d012f76a41f764ee:core.Destroy.Core"(ptr %self), !dbg !161 -// CHECK:STDOUT: ret void, !dbg !161 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d012f76a41f764ee:core.Destroy.Core"(ptr %self), !dbg !163 +// CHECK:STDOUT: ret void, !dbg !163 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CAccessInt.Main() #0 !dbg !163 { +// CHECK:STDOUT: define i32 @_CAccessInt.Main() #0 !dbg !165 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i1, i32 }, align 4, !dbg !166 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !166 -// CHECK:STDOUT: %.loc21_37.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 0, !dbg !167 -// CHECK:STDOUT: %.loc21_37.5.w = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 1, !dbg !167 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.29b.loc16_3, i64 8, i1 false), !dbg !166 -// CHECK:STDOUT: %C.GetT.call = call i32 @_CGetT.C.Main.4d6ceefeb7f772f4(ptr %c.var), !dbg !169 -// CHECK:STDOUT: call void @"_CSelfDestruct.d012f76a41f764ee:core.Destroy.Core"(ptr %c.var), !dbg !166 -// CHECK:STDOUT: ret i32 %C.GetT.call, !dbg !172 +// CHECK:STDOUT: %c.var = alloca { i1, i32 }, align 4, !dbg !168 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !168 +// CHECK:STDOUT: %.loc21_37.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 0, !dbg !169 +// CHECK:STDOUT: %.loc21_37.5.w = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 1, !dbg !169 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.29b.loc16_3, i64 8, i1 false), !dbg !168 +// CHECK:STDOUT: %C.GetT.call = call i32 @_CGetT.C.Main.4d6ceefeb7f772f4(ptr %c.var), !dbg !171 +// CHECK:STDOUT: call void @"_CSelfDestruct.d012f76a41f764ee:core.Destroy.Core"(ptr %c.var), !dbg !168 +// CHECK:STDOUT: ret i32 %C.GetT.call, !dbg !174 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CAccessEmpty.Main() #0 !dbg !173 { +// CHECK:STDOUT: define void @_CAccessEmpty.Main() #0 !dbg !175 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i1, {} }, align 1, !dbg !176 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !176 -// CHECK:STDOUT: %.loc26_37.2.v = getelementptr inbounds nuw { i1, {} }, ptr %c.var, i32 0, i32 0, !dbg !177 -// CHECK:STDOUT: %.loc26_37.4.w = getelementptr inbounds nuw { i1, {} }, ptr %c.var, i32 0, i32 1, !dbg !177 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.0ea.loc26_3, i64 1, i1 false), !dbg !176 -// CHECK:STDOUT: call void @_CGetT.C.Main.22bf4b2f6c4322a2(ptr %c.var), !dbg !179 -// CHECK:STDOUT: call void @"_CSelfDestruct.0477b985a5aa27cc:core.Destroy.Core"(ptr %c.var), !dbg !176 -// CHECK:STDOUT: ret void, !dbg !180 +// CHECK:STDOUT: %c.var = alloca { i1, {} }, align 1, !dbg !178 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !178 +// CHECK:STDOUT: %.loc26_37.2.v = getelementptr inbounds nuw { i1, {} }, ptr %c.var, i32 0, i32 0, !dbg !179 +// CHECK:STDOUT: %.loc26_37.4.w = getelementptr inbounds nuw { i1, {} }, ptr %c.var, i32 0, i32 1, !dbg !179 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.0ea.loc26_3, i64 1, i1 false), !dbg !178 +// CHECK:STDOUT: call void @_CGetT.C.Main.22bf4b2f6c4322a2(ptr %c.var), !dbg !181 +// CHECK:STDOUT: call void @"_CSelfDestruct.0477b985a5aa27cc:core.Destroy.Core"(ptr %c.var), !dbg !178 +// CHECK:STDOUT: ret void, !dbg !182 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %self) #0 !dbg !181 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %self) #0 !dbg !183 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !183 +// CHECK:STDOUT: ret void, !dbg !185 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core"(ptr %self) #0 !dbg !185 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core"(ptr %self) #0 !dbg !187 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc26_3.1.w = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 1, !dbg !187 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc26_3.1.w), !dbg !187 -// CHECK:STDOUT: %.loc26_3.2.v = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 0, !dbg !187 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc26_3.2.v), !dbg !187 -// CHECK:STDOUT: ret void, !dbg !187 +// CHECK:STDOUT: %.loc26_3.1.w = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 1, !dbg !189 +// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc26_3.1.w), !dbg !189 +// CHECK:STDOUT: %.loc26_3.2.v = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 0, !dbg !189 +// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc26_3.2.v), !dbg !189 +// CHECK:STDOUT: ret void, !dbg !189 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.82468d70c8d12e86:core.Destroy.Core"(ptr %self) #0 !dbg !189 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.82468d70c8d12e86:core.Destroy.Core"(ptr %self) #0 !dbg !191 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core"(ptr %self), !dbg !191 -// CHECK:STDOUT: ret void, !dbg !191 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core"(ptr %self), !dbg !193 +// CHECK:STDOUT: ret void, !dbg !193 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0477b985a5aa27cc:core.Destroy.Core"(ptr %self) #0 !dbg !193 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0477b985a5aa27cc:core.Destroy.Core"(ptr %self) #0 !dbg !195 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc26_3.1.w = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 1, !dbg !195 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc26_3.1.w), !dbg !195 -// CHECK:STDOUT: %.loc26_3.2.v = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 0, !dbg !195 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc26_3.2.v), !dbg !195 -// CHECK:STDOUT: ret void, !dbg !195 +// CHECK:STDOUT: %.loc26_3.1.w = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 1, !dbg !197 +// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc26_3.1.w), !dbg !197 +// CHECK:STDOUT: %.loc26_3.2.v = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 0, !dbg !197 +// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc26_3.2.v), !dbg !197 +// CHECK:STDOUT: ret void, !dbg !197 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0477b985a5aa27cc:core.Destroy.Core"(ptr %self) #0 !dbg !197 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0477b985a5aa27cc:core.Destroy.Core"(ptr %self) #0 !dbg !199 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0477b985a5aa27cc:core.Destroy.Core"(ptr %self), !dbg !199 -// CHECK:STDOUT: ret void, !dbg !199 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.0477b985a5aa27cc:core.Destroy.Core"(ptr %self), !dbg !201 +// CHECK:STDOUT: ret void, !dbg !201 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CAccessTuple.Main(ptr sret({ i32, i32, i32 }) %return) #0 !dbg !201 { +// CHECK:STDOUT: define void @_CAccessTuple.Main(ptr sret({ i32, i32, i32 }) %return) #0 !dbg !203 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i1, { i32, i32, i32 } }, align 4, !dbg !204 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !204 -// CHECK:STDOUT: %.loc31_57.2.v = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %c.var, i32 0, i32 0, !dbg !205 -// CHECK:STDOUT: %.loc31_57.4.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %c.var, i32 0, i32 1, !dbg !205 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 0, !dbg !206 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 1, !dbg !206 -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 2, !dbg !206 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.727.loc31_3, i64 16, i1 false), !dbg !204 -// CHECK:STDOUT: call void @_CGetT.C.Main.03220e6718a91584(ptr %return, ptr %c.var), !dbg !208 -// CHECK:STDOUT: call void @"_CSelfDestruct.3cffcf67f1271f67:core.Destroy.Core"(ptr %c.var), !dbg !204 -// CHECK:STDOUT: ret void, !dbg !209 +// CHECK:STDOUT: %c.var = alloca { i1, { i32, i32, i32 } }, align 4, !dbg !206 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !206 +// CHECK:STDOUT: %.loc31_57.2.v = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %c.var, i32 0, i32 0, !dbg !207 +// CHECK:STDOUT: %.loc31_57.4.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %c.var, i32 0, i32 1, !dbg !207 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 0, !dbg !208 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 1, !dbg !208 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 2, !dbg !208 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.727.loc31_3, i64 16, i1 false), !dbg !206 +// CHECK:STDOUT: call void @_CGetT.C.Main.03220e6718a91584(ptr %return, ptr %c.var), !dbg !210 +// CHECK:STDOUT: call void @"_CSelfDestruct.3cffcf67f1271f67:core.Destroy.Core"(ptr %c.var), !dbg !206 +// CHECK:STDOUT: ret void, !dbg !211 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !210 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !212 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !212 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !212 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !212 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !212 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !212 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !212 -// CHECK:STDOUT: ret void, !dbg !212 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !214 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !214 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !214 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !214 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !214 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !214 +// CHECK:STDOUT: ret void, !dbg !214 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !214 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !216 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !216 -// CHECK:STDOUT: ret void, !dbg !216 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !218 +// CHECK:STDOUT: ret void, !dbg !218 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.1ada7ed46fb16378:core.Destroy.Core"(ptr %self) #0 !dbg !218 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.1ada7ed46fb16378:core.Destroy.Core"(ptr %self) #0 !dbg !220 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc31_3.1.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !220 -// CHECK:STDOUT: call void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %.loc31_3.1.w), !dbg !220 -// CHECK:STDOUT: %.loc31_3.2.v = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 0, !dbg !220 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc31_3.2.v), !dbg !220 -// CHECK:STDOUT: ret void, !dbg !220 +// CHECK:STDOUT: %.loc31_3.1.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !222 +// CHECK:STDOUT: call void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %.loc31_3.1.w), !dbg !222 +// CHECK:STDOUT: %.loc31_3.2.v = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 0, !dbg !222 +// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc31_3.2.v), !dbg !222 +// CHECK:STDOUT: ret void, !dbg !222 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1ada7ed46fb16378:core.Destroy.Core"(ptr %self) #0 !dbg !222 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1ada7ed46fb16378:core.Destroy.Core"(ptr %self) #0 !dbg !224 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.1ada7ed46fb16378:core.Destroy.Core"(ptr %self), !dbg !224 -// CHECK:STDOUT: ret void, !dbg !224 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.1ada7ed46fb16378:core.Destroy.Core"(ptr %self), !dbg !226 +// CHECK:STDOUT: ret void, !dbg !226 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.3cffcf67f1271f67:core.Destroy.Core"(ptr %self) #0 !dbg !226 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.3cffcf67f1271f67:core.Destroy.Core"(ptr %self) #0 !dbg !228 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc31_3.1.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !228 -// CHECK:STDOUT: call void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %.loc31_3.1.w), !dbg !228 -// CHECK:STDOUT: %.loc31_3.2.v = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 0, !dbg !228 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc31_3.2.v), !dbg !228 -// CHECK:STDOUT: ret void, !dbg !228 +// CHECK:STDOUT: %.loc31_3.1.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !230 +// CHECK:STDOUT: call void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %.loc31_3.1.w), !dbg !230 +// CHECK:STDOUT: %.loc31_3.2.v = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 0, !dbg !230 +// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc31_3.2.v), !dbg !230 +// CHECK:STDOUT: ret void, !dbg !230 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3cffcf67f1271f67:core.Destroy.Core"(ptr %self) #0 !dbg !230 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3cffcf67f1271f67:core.Destroy.Core"(ptr %self) #0 !dbg !232 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.3cffcf67f1271f67:core.Destroy.Core"(ptr %self), !dbg !232 -// CHECK:STDOUT: ret void, !dbg !232 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.3cffcf67f1271f67:core.Destroy.Core"(ptr %self), !dbg !234 +// CHECK:STDOUT: ret void, !dbg !234 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -495,52 +495,52 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CGetBool.C.Main.4d6ceefeb7f772f4(ptr %self) #0 !dbg !234 { +// CHECK:STDOUT: define linkonce_odr i1 @_CGetBool.C.Main.4d6ceefeb7f772f4(ptr %self) #0 !dbg !236 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc6_16.1.v = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 0, !dbg !239 -// CHECK:STDOUT: %.loc6_16.2 = load i8, ptr %.loc6_16.1.v, align 1, !dbg !239 -// CHECK:STDOUT: %.loc6_16.21 = trunc i8 %.loc6_16.2 to i1, !dbg !239 -// CHECK:STDOUT: ret i1 %.loc6_16.21, !dbg !240 +// CHECK:STDOUT: %.loc6_16.1.v = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 0, !dbg !241 +// CHECK:STDOUT: %.loc6_16.2 = load i8, ptr %.loc6_16.1.v, align 1, !dbg !241 +// CHECK:STDOUT: %.loc6_16.21 = trunc i8 %.loc6_16.2 to i1, !dbg !241 +// CHECK:STDOUT: ret i1 %.loc6_16.21, !dbg !242 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CGetT.C.Main.4d6ceefeb7f772f4(ptr %self) #0 !dbg !242 { +// CHECK:STDOUT: define linkonce_odr i32 @_CGetT.C.Main.4d6ceefeb7f772f4(ptr %self) #0 !dbg !244 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 1, !dbg !247 -// CHECK:STDOUT: %.loc9_16.2 = load i32, ptr %.loc9_16.1.w, align 4, !dbg !247 -// CHECK:STDOUT: ret i32 %.loc9_16.2, !dbg !248 +// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 1, !dbg !249 +// CHECK:STDOUT: %.loc9_16.2 = load i32, ptr %.loc9_16.1.w, align 4, !dbg !249 +// CHECK:STDOUT: ret i32 %.loc9_16.2, !dbg !250 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CGetT.C.Main.22bf4b2f6c4322a2(ptr %self) #0 !dbg !250 { +// CHECK:STDOUT: define linkonce_odr void @_CGetT.C.Main.22bf4b2f6c4322a2(ptr %self) #0 !dbg !252 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 1, !dbg !255 -// CHECK:STDOUT: ret void, !dbg !256 +// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 1, !dbg !257 +// CHECK:STDOUT: ret void, !dbg !258 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CGetT.C.Main.03220e6718a91584(ptr sret({ i32, i32, i32 }) %return, ptr %self) #0 !dbg !258 { +// CHECK:STDOUT: define linkonce_odr void @_CGetT.C.Main.03220e6718a91584(ptr sret({ i32, i32, i32 }) %return, ptr %self) #0 !dbg !260 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !263 -// CHECK:STDOUT: call void @"_COp.6753b13effab4291:Copy.Core.c9f31a0e20c75302"(ptr %return, ptr %.loc9_16.1.w), !dbg !263 -// CHECK:STDOUT: ret void, !dbg !264 +// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !265 +// CHECK:STDOUT: call void @"_COp.6753b13effab4291:Copy.Core.c9f31a0e20c75302"(ptr %return, ptr %.loc9_16.1.w), !dbg !265 +// CHECK:STDOUT: ret void, !dbg !266 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.6753b13effab4291:Copy.Core.c9f31a0e20c75302"(ptr sret({ i32, i32, i32 }) %return, ptr %self) #0 !dbg !266 { -// CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !271 -// CHECK:STDOUT: %tuple.elem.load = load i32, ptr %tuple.elem, align 4, !dbg !271 -// CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !272 -// CHECK:STDOUT: %tuple.elem2 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !273 -// CHECK:STDOUT: %tuple.elem.load3 = load i32, ptr %tuple.elem2, align 4, !dbg !273 -// CHECK:STDOUT: %tuple.elem4 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !272 -// CHECK:STDOUT: %tuple.elem5 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !274 -// CHECK:STDOUT: %tuple.elem.load6 = load i32, ptr %tuple.elem5, align 4, !dbg !274 -// CHECK:STDOUT: %tuple.elem7 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !272 -// CHECK:STDOUT: store i32 %tuple.elem.load, ptr %tuple.elem1, align 4, !dbg !272 -// CHECK:STDOUT: store i32 %tuple.elem.load3, ptr %tuple.elem4, align 4, !dbg !272 -// CHECK:STDOUT: store i32 %tuple.elem.load6, ptr %tuple.elem7, align 4, !dbg !272 -// CHECK:STDOUT: ret void, !dbg !275 +// CHECK:STDOUT: define linkonce_odr void @"_COp.6753b13effab4291:Copy.Core.c9f31a0e20c75302"(ptr sret({ i32, i32, i32 }) %return, ptr %self) #0 !dbg !268 { +// CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !273 +// CHECK:STDOUT: %tuple.elem.load = load i32, ptr %tuple.elem, align 4, !dbg !273 +// CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !274 +// CHECK:STDOUT: %tuple.elem2 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !275 +// CHECK:STDOUT: %tuple.elem.load3 = load i32, ptr %tuple.elem2, align 4, !dbg !275 +// CHECK:STDOUT: %tuple.elem4 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !274 +// CHECK:STDOUT: %tuple.elem5 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !276 +// CHECK:STDOUT: %tuple.elem.load6 = load i32, ptr %tuple.elem5, align 4, !dbg !276 +// CHECK:STDOUT: %tuple.elem7 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !274 +// CHECK:STDOUT: store i32 %tuple.elem.load, ptr %tuple.elem1, align 4, !dbg !274 +// CHECK:STDOUT: store i32 %tuple.elem.load3, ptr %tuple.elem4, align 4, !dbg !274 +// CHECK:STDOUT: store i32 %tuple.elem.load6, ptr %tuple.elem7, align 4, !dbg !274 +// CHECK:STDOUT: ret void, !dbg !277 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -550,145 +550,145 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!122} +// CHECK:STDOUT: !llvm.dbg.cu = !{!124} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !9 = !DIFile(filename: "min_prelude/parts/copy.carbon", directory: "") -// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !38 = !{!37} -// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !107 = !{!37, !37} -// CHECK:STDOUT: !108 = !DISubroutineType(types: !107) -// CHECK:STDOUT: !121 = !DIFile(filename: "access.carbon", directory: "") -// CHECK:STDOUT: !122 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !121, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !123 = !{null, !37} -// CHECK:STDOUT: !124 = !DISubroutineType(types: !123) -// CHECK:STDOUT: !125 = !{null, !36} +// CHECK:STDOUT: !11 = !DIFile(filename: "min_prelude/parts/copy.carbon", directory: "") +// CHECK:STDOUT: !38 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !40 = !{!39} +// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) +// CHECK:STDOUT: !109 = !{!39, !39} +// CHECK:STDOUT: !110 = !DISubroutineType(types: !109) +// CHECK:STDOUT: !123 = !DIFile(filename: "access.carbon", directory: "") +// CHECK:STDOUT: !124 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !123, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !125 = !{null, !39} // CHECK:STDOUT: !126 = !DISubroutineType(types: !125) -// CHECK:STDOUT: !127 = !{!36} +// CHECK:STDOUT: !127 = !{null, !38} // CHECK:STDOUT: !128 = !DISubroutineType(types: !127) -// CHECK:STDOUT: !129 = !{null} +// CHECK:STDOUT: !129 = !{!38} // CHECK:STDOUT: !130 = !DISubroutineType(types: !129) -// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "AccessBool", linkageName: "_CAccessBool.Main", scope: null, file: !121, line: 15, type: !39, spFlags: DISPFlagDefinition, unit: !122) -// CHECK:STDOUT: !134 = !DILocation(line: 16, column: 3, scope: !131) -// CHECK:STDOUT: !135 = !DILocation(line: 16, column: 19, scope: !131) -// CHECK:STDOUT: !137 = !DILocation(line: 17, column: 10, scope: !131) -// CHECK:STDOUT: !138 = !DILocation(line: 17, column: 3, scope: !131) -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !121, line: 16, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !142) -// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !37) -// CHECK:STDOUT: !141 = !DILocation(line: 16, column: 3, scope: !139) -// CHECK:STDOUT: !142 = !{!140} -// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !121, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !146) -// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !36) -// CHECK:STDOUT: !145 = !DILocation(line: 16, column: 3, scope: !143) -// CHECK:STDOUT: !146 = !{!144} -// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.861652b2c489f7cc:core.Destroy.Core", scope: null, file: !121, line: 16, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !150) -// CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !37) -// CHECK:STDOUT: !149 = !DILocation(line: 16, column: 3, scope: !147) -// CHECK:STDOUT: !150 = !{!148} -// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.861652b2c489f7cc:core.Destroy.Core", scope: null, file: !121, line: 16, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !154) -// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !37) -// CHECK:STDOUT: !153 = !DILocation(line: 16, column: 3, scope: !151) -// CHECK:STDOUT: !154 = !{!152} -// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d012f76a41f764ee:core.Destroy.Core", scope: null, file: !121, line: 16, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !158) -// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !37) -// CHECK:STDOUT: !157 = !DILocation(line: 16, column: 3, scope: !155) -// CHECK:STDOUT: !158 = !{!156} -// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d012f76a41f764ee:core.Destroy.Core", scope: null, file: !121, line: 16, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !162) -// CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !37) -// CHECK:STDOUT: !161 = !DILocation(line: 16, column: 3, scope: !159) -// CHECK:STDOUT: !162 = !{!160} -// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "AccessInt", linkageName: "_CAccessInt.Main", scope: null, file: !121, line: 20, type: !128, spFlags: DISPFlagDefinition, unit: !122) -// CHECK:STDOUT: !166 = !DILocation(line: 21, column: 3, scope: !163) -// CHECK:STDOUT: !167 = !DILocation(line: 21, column: 19, scope: !163) -// CHECK:STDOUT: !169 = !DILocation(line: 22, column: 10, scope: !163) -// CHECK:STDOUT: !170 = !{!36, !37} -// CHECK:STDOUT: !171 = !DISubroutineType(types: !170) -// CHECK:STDOUT: !172 = !DILocation(line: 22, column: 3, scope: !163) -// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "AccessEmpty", linkageName: "_CAccessEmpty.Main", scope: null, file: !121, line: 25, type: !130, spFlags: DISPFlagDefinition, unit: !122) -// CHECK:STDOUT: !176 = !DILocation(line: 26, column: 3, scope: !173) -// CHECK:STDOUT: !177 = !DILocation(line: 26, column: 18, scope: !173) -// CHECK:STDOUT: !179 = !DILocation(line: 27, column: 10, scope: !173) -// CHECK:STDOUT: !180 = !DILocation(line: 27, column: 3, scope: !173) -// CHECK:STDOUT: !181 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !184) -// CHECK:STDOUT: !182 = !DILocalVariable(arg: 1, scope: !181, type: !37) -// CHECK:STDOUT: !183 = !DILocation(line: 26, column: 3, scope: !181) -// CHECK:STDOUT: !184 = !{!182} -// CHECK:STDOUT: !185 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !188) -// CHECK:STDOUT: !186 = !DILocalVariable(arg: 1, scope: !185, type: !37) -// CHECK:STDOUT: !187 = !DILocation(line: 26, column: 3, scope: !185) -// CHECK:STDOUT: !188 = !{!186} -// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.82468d70c8d12e86:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !192) -// CHECK:STDOUT: !190 = !DILocalVariable(arg: 1, scope: !189, type: !37) -// CHECK:STDOUT: !191 = !DILocation(line: 26, column: 3, scope: !189) -// CHECK:STDOUT: !192 = !{!190} -// CHECK:STDOUT: !193 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0477b985a5aa27cc:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !196) -// CHECK:STDOUT: !194 = !DILocalVariable(arg: 1, scope: !193, type: !37) -// CHECK:STDOUT: !195 = !DILocation(line: 26, column: 3, scope: !193) -// CHECK:STDOUT: !196 = !{!194} -// CHECK:STDOUT: !197 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0477b985a5aa27cc:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !200) -// CHECK:STDOUT: !198 = !DILocalVariable(arg: 1, scope: !197, type: !37) -// CHECK:STDOUT: !199 = !DILocation(line: 26, column: 3, scope: !197) -// CHECK:STDOUT: !200 = !{!198} -// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "AccessTuple", linkageName: "_CAccessTuple.Main", scope: null, file: !121, line: 30, type: !39, spFlags: DISPFlagDefinition, unit: !122) -// CHECK:STDOUT: !204 = !DILocation(line: 31, column: 3, scope: !201) -// CHECK:STDOUT: !205 = !DILocation(line: 31, column: 31, scope: !201) -// CHECK:STDOUT: !206 = !DILocation(line: 31, column: 48, scope: !201) -// CHECK:STDOUT: !208 = !DILocation(line: 32, column: 10, scope: !201) -// CHECK:STDOUT: !209 = !DILocation(line: 32, column: 3, scope: !201) -// CHECK:STDOUT: !210 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !213) -// CHECK:STDOUT: !211 = !DILocalVariable(arg: 1, scope: !210, type: !37) -// CHECK:STDOUT: !212 = !DILocation(line: 31, column: 3, scope: !210) -// CHECK:STDOUT: !213 = !{!211} -// CHECK:STDOUT: !214 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !217) -// CHECK:STDOUT: !215 = !DILocalVariable(arg: 1, scope: !214, type: !37) -// CHECK:STDOUT: !216 = !DILocation(line: 31, column: 3, scope: !214) -// CHECK:STDOUT: !217 = !{!215} -// CHECK:STDOUT: !218 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.1ada7ed46fb16378:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !221) -// CHECK:STDOUT: !219 = !DILocalVariable(arg: 1, scope: !218, type: !37) -// CHECK:STDOUT: !220 = !DILocation(line: 31, column: 3, scope: !218) -// CHECK:STDOUT: !221 = !{!219} -// CHECK:STDOUT: !222 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1ada7ed46fb16378:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !225) -// CHECK:STDOUT: !223 = !DILocalVariable(arg: 1, scope: !222, type: !37) -// CHECK:STDOUT: !224 = !DILocation(line: 31, column: 3, scope: !222) -// CHECK:STDOUT: !225 = !{!223} -// CHECK:STDOUT: !226 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.3cffcf67f1271f67:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !229) -// CHECK:STDOUT: !227 = !DILocalVariable(arg: 1, scope: !226, type: !37) -// CHECK:STDOUT: !228 = !DILocation(line: 31, column: 3, scope: !226) -// CHECK:STDOUT: !229 = !{!227} -// CHECK:STDOUT: !230 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3cffcf67f1271f67:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !233) -// CHECK:STDOUT: !231 = !DILocalVariable(arg: 1, scope: !230, type: !37) -// CHECK:STDOUT: !232 = !DILocation(line: 31, column: 3, scope: !230) -// CHECK:STDOUT: !233 = !{!231} -// CHECK:STDOUT: !234 = distinct !DISubprogram(name: "GetBool", linkageName: "_CGetBool.C.Main.4d6ceefeb7f772f4", scope: null, file: !121, line: 5, type: !108, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !241) -// CHECK:STDOUT: !235 = !DILocalVariable(arg: 1, scope: !234, type: !37) -// CHECK:STDOUT: !239 = !DILocation(line: 6, column: 12, scope: !234) -// CHECK:STDOUT: !240 = !DILocation(line: 6, column: 5, scope: !234) -// CHECK:STDOUT: !241 = !{!235} -// CHECK:STDOUT: !242 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.4d6ceefeb7f772f4", scope: null, file: !121, line: 8, type: !171, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !249) -// CHECK:STDOUT: !243 = !DILocalVariable(arg: 1, scope: !242, type: !37) -// CHECK:STDOUT: !247 = !DILocation(line: 9, column: 12, scope: !242) -// CHECK:STDOUT: !248 = !DILocation(line: 9, column: 5, scope: !242) -// CHECK:STDOUT: !249 = !{!243} -// CHECK:STDOUT: !250 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.22bf4b2f6c4322a2", scope: null, file: !121, line: 8, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !257) -// CHECK:STDOUT: !251 = !DILocalVariable(arg: 1, scope: !250, type: !37) -// CHECK:STDOUT: !255 = !DILocation(line: 9, column: 12, scope: !250) -// CHECK:STDOUT: !256 = !DILocation(line: 9, column: 5, scope: !250) -// CHECK:STDOUT: !257 = !{!251} -// CHECK:STDOUT: !258 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.03220e6718a91584", scope: null, file: !121, line: 8, type: !108, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !265) -// CHECK:STDOUT: !259 = !DILocalVariable(arg: 1, scope: !258, type: !37) -// CHECK:STDOUT: !263 = !DILocation(line: 9, column: 12, scope: !258) -// CHECK:STDOUT: !264 = !DILocation(line: 9, column: 5, scope: !258) -// CHECK:STDOUT: !265 = !{!259} -// CHECK:STDOUT: !266 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6753b13effab4291:Copy.Core.c9f31a0e20c75302", scope: null, file: !9, line: 58, type: !108, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !276) -// CHECK:STDOUT: !267 = !DILocalVariable(arg: 1, scope: !266, type: !37) -// CHECK:STDOUT: !271 = !DILocation(line: 59, column: 13, scope: !266) -// CHECK:STDOUT: !272 = !DILocation(line: 59, column: 12, scope: !266) -// CHECK:STDOUT: !273 = !DILocation(line: 59, column: 26, scope: !266) -// CHECK:STDOUT: !274 = !DILocation(line: 59, column: 39, scope: !266) -// CHECK:STDOUT: !275 = !DILocation(line: 59, column: 5, scope: !266) -// CHECK:STDOUT: !276 = !{!267} +// CHECK:STDOUT: !131 = !{null} +// CHECK:STDOUT: !132 = !DISubroutineType(types: !131) +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "AccessBool", linkageName: "_CAccessBool.Main", scope: null, file: !123, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !124) +// CHECK:STDOUT: !136 = !DILocation(line: 16, column: 3, scope: !133) +// CHECK:STDOUT: !137 = !DILocation(line: 16, column: 19, scope: !133) +// CHECK:STDOUT: !139 = !DILocation(line: 17, column: 10, scope: !133) +// CHECK:STDOUT: !140 = !DILocation(line: 17, column: 3, scope: !133) +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !123, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !144) +// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !39) +// CHECK:STDOUT: !143 = !DILocation(line: 16, column: 3, scope: !141) +// CHECK:STDOUT: !144 = !{!142} +// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !123, line: 16, type: !128, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !148) +// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !38) +// CHECK:STDOUT: !147 = !DILocation(line: 16, column: 3, scope: !145) +// CHECK:STDOUT: !148 = !{!146} +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.861652b2c489f7cc:core.Destroy.Core", scope: null, file: !123, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !152) +// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !39) +// CHECK:STDOUT: !151 = !DILocation(line: 16, column: 3, scope: !149) +// CHECK:STDOUT: !152 = !{!150} +// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.861652b2c489f7cc:core.Destroy.Core", scope: null, file: !123, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !156) +// CHECK:STDOUT: !154 = !DILocalVariable(arg: 1, scope: !153, type: !39) +// CHECK:STDOUT: !155 = !DILocation(line: 16, column: 3, scope: !153) +// CHECK:STDOUT: !156 = !{!154} +// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d012f76a41f764ee:core.Destroy.Core", scope: null, file: !123, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !160) +// CHECK:STDOUT: !158 = !DILocalVariable(arg: 1, scope: !157, type: !39) +// CHECK:STDOUT: !159 = !DILocation(line: 16, column: 3, scope: !157) +// CHECK:STDOUT: !160 = !{!158} +// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d012f76a41f764ee:core.Destroy.Core", scope: null, file: !123, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !164) +// CHECK:STDOUT: !162 = !DILocalVariable(arg: 1, scope: !161, type: !39) +// CHECK:STDOUT: !163 = !DILocation(line: 16, column: 3, scope: !161) +// CHECK:STDOUT: !164 = !{!162} +// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "AccessInt", linkageName: "_CAccessInt.Main", scope: null, file: !123, line: 20, type: !130, spFlags: DISPFlagDefinition, unit: !124) +// CHECK:STDOUT: !168 = !DILocation(line: 21, column: 3, scope: !165) +// CHECK:STDOUT: !169 = !DILocation(line: 21, column: 19, scope: !165) +// CHECK:STDOUT: !171 = !DILocation(line: 22, column: 10, scope: !165) +// CHECK:STDOUT: !172 = !{!38, !39} +// CHECK:STDOUT: !173 = !DISubroutineType(types: !172) +// CHECK:STDOUT: !174 = !DILocation(line: 22, column: 3, scope: !165) +// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "AccessEmpty", linkageName: "_CAccessEmpty.Main", scope: null, file: !123, line: 25, type: !132, spFlags: DISPFlagDefinition, unit: !124) +// CHECK:STDOUT: !178 = !DILocation(line: 26, column: 3, scope: !175) +// CHECK:STDOUT: !179 = !DILocation(line: 26, column: 18, scope: !175) +// CHECK:STDOUT: !181 = !DILocation(line: 27, column: 10, scope: !175) +// CHECK:STDOUT: !182 = !DILocation(line: 27, column: 3, scope: !175) +// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !123, line: 26, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !186) +// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !39) +// CHECK:STDOUT: !185 = !DILocation(line: 26, column: 3, scope: !183) +// CHECK:STDOUT: !186 = !{!184} +// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core", scope: null, file: !123, line: 26, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !190) +// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !39) +// CHECK:STDOUT: !189 = !DILocation(line: 26, column: 3, scope: !187) +// CHECK:STDOUT: !190 = !{!188} +// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.82468d70c8d12e86:core.Destroy.Core", scope: null, file: !123, line: 26, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !194) +// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !39) +// CHECK:STDOUT: !193 = !DILocation(line: 26, column: 3, scope: !191) +// CHECK:STDOUT: !194 = !{!192} +// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0477b985a5aa27cc:core.Destroy.Core", scope: null, file: !123, line: 26, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !198) +// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !39) +// CHECK:STDOUT: !197 = !DILocation(line: 26, column: 3, scope: !195) +// CHECK:STDOUT: !198 = !{!196} +// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0477b985a5aa27cc:core.Destroy.Core", scope: null, file: !123, line: 26, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !202) +// CHECK:STDOUT: !200 = !DILocalVariable(arg: 1, scope: !199, type: !39) +// CHECK:STDOUT: !201 = !DILocation(line: 26, column: 3, scope: !199) +// CHECK:STDOUT: !202 = !{!200} +// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "AccessTuple", linkageName: "_CAccessTuple.Main", scope: null, file: !123, line: 30, type: !41, spFlags: DISPFlagDefinition, unit: !124) +// CHECK:STDOUT: !206 = !DILocation(line: 31, column: 3, scope: !203) +// CHECK:STDOUT: !207 = !DILocation(line: 31, column: 31, scope: !203) +// CHECK:STDOUT: !208 = !DILocation(line: 31, column: 48, scope: !203) +// CHECK:STDOUT: !210 = !DILocation(line: 32, column: 10, scope: !203) +// CHECK:STDOUT: !211 = !DILocation(line: 32, column: 3, scope: !203) +// CHECK:STDOUT: !212 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !215) +// CHECK:STDOUT: !213 = !DILocalVariable(arg: 1, scope: !212, type: !39) +// CHECK:STDOUT: !214 = !DILocation(line: 31, column: 3, scope: !212) +// CHECK:STDOUT: !215 = !{!213} +// CHECK:STDOUT: !216 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !219) +// CHECK:STDOUT: !217 = !DILocalVariable(arg: 1, scope: !216, type: !39) +// CHECK:STDOUT: !218 = !DILocation(line: 31, column: 3, scope: !216) +// CHECK:STDOUT: !219 = !{!217} +// CHECK:STDOUT: !220 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.1ada7ed46fb16378:core.Destroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !223) +// CHECK:STDOUT: !221 = !DILocalVariable(arg: 1, scope: !220, type: !39) +// CHECK:STDOUT: !222 = !DILocation(line: 31, column: 3, scope: !220) +// CHECK:STDOUT: !223 = !{!221} +// CHECK:STDOUT: !224 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1ada7ed46fb16378:core.Destroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !227) +// CHECK:STDOUT: !225 = !DILocalVariable(arg: 1, scope: !224, type: !39) +// CHECK:STDOUT: !226 = !DILocation(line: 31, column: 3, scope: !224) +// CHECK:STDOUT: !227 = !{!225} +// CHECK:STDOUT: !228 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.3cffcf67f1271f67:core.Destroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !231) +// CHECK:STDOUT: !229 = !DILocalVariable(arg: 1, scope: !228, type: !39) +// CHECK:STDOUT: !230 = !DILocation(line: 31, column: 3, scope: !228) +// CHECK:STDOUT: !231 = !{!229} +// CHECK:STDOUT: !232 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3cffcf67f1271f67:core.Destroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !235) +// CHECK:STDOUT: !233 = !DILocalVariable(arg: 1, scope: !232, type: !39) +// CHECK:STDOUT: !234 = !DILocation(line: 31, column: 3, scope: !232) +// CHECK:STDOUT: !235 = !{!233} +// CHECK:STDOUT: !236 = distinct !DISubprogram(name: "GetBool", linkageName: "_CGetBool.C.Main.4d6ceefeb7f772f4", scope: null, file: !123, line: 5, type: !110, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !243) +// CHECK:STDOUT: !237 = !DILocalVariable(arg: 1, scope: !236, type: !39) +// CHECK:STDOUT: !241 = !DILocation(line: 6, column: 12, scope: !236) +// CHECK:STDOUT: !242 = !DILocation(line: 6, column: 5, scope: !236) +// CHECK:STDOUT: !243 = !{!237} +// CHECK:STDOUT: !244 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.4d6ceefeb7f772f4", scope: null, file: !123, line: 8, type: !173, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !251) +// CHECK:STDOUT: !245 = !DILocalVariable(arg: 1, scope: !244, type: !39) +// CHECK:STDOUT: !249 = !DILocation(line: 9, column: 12, scope: !244) +// CHECK:STDOUT: !250 = !DILocation(line: 9, column: 5, scope: !244) +// CHECK:STDOUT: !251 = !{!245} +// CHECK:STDOUT: !252 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.22bf4b2f6c4322a2", scope: null, file: !123, line: 8, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !259) +// CHECK:STDOUT: !253 = !DILocalVariable(arg: 1, scope: !252, type: !39) +// CHECK:STDOUT: !257 = !DILocation(line: 9, column: 12, scope: !252) +// CHECK:STDOUT: !258 = !DILocation(line: 9, column: 5, scope: !252) +// CHECK:STDOUT: !259 = !{!253} +// CHECK:STDOUT: !260 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.03220e6718a91584", scope: null, file: !123, line: 8, type: !110, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !267) +// CHECK:STDOUT: !261 = !DILocalVariable(arg: 1, scope: !260, type: !39) +// CHECK:STDOUT: !265 = !DILocation(line: 9, column: 12, scope: !260) +// CHECK:STDOUT: !266 = !DILocation(line: 9, column: 5, scope: !260) +// CHECK:STDOUT: !267 = !{!261} +// CHECK:STDOUT: !268 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6753b13effab4291:Copy.Core.c9f31a0e20c75302", scope: null, file: !11, line: 58, type: !110, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !278) +// CHECK:STDOUT: !269 = !DILocalVariable(arg: 1, scope: !268, type: !39) +// CHECK:STDOUT: !273 = !DILocation(line: 59, column: 13, scope: !268) +// CHECK:STDOUT: !274 = !DILocation(line: 59, column: 12, scope: !268) +// CHECK:STDOUT: !275 = !DILocation(line: 59, column: 26, scope: !268) +// CHECK:STDOUT: !276 = !DILocation(line: 59, column: 39, scope: !268) +// CHECK:STDOUT: !277 = !DILocation(line: 59, column: 5, scope: !268) +// CHECK:STDOUT: !278 = !{!269} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call.carbon b/toolchain/lower/testdata/function/generic/call.carbon index c56022ff5c6f..918f3cb2c871 100644 --- a/toolchain/lower/testdata/function/generic/call.carbon +++ b/toolchain/lower/testdata/function/generic/call.carbon @@ -33,68 +33,68 @@ fn G() { // CHECK:STDOUT: ; ModuleID = 'call.carbon' // CHECK:STDOUT: source_filename = "call.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: %type.26 = type {} +// CHECK:STDOUT: %type.28 = type {} // CHECK:STDOUT: // CHECK:STDOUT: @C.val.loc20_3 = internal constant {} zeroinitializer // CHECK:STDOUT: @D.val.loc21_3 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !42 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !43 -// CHECK:STDOUT: %d.var = alloca {}, align 1, !dbg !45 -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !47 -// CHECK:STDOUT: %m.var = alloca double, align 8, !dbg !49 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !43 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.loc20_3, i64 0, i1 false), !dbg !43 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !45 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %d.var, ptr align 1 @D.val.loc21_3, i64 0, i1 false), !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !47 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !47 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !49 -// CHECK:STDOUT: store double 0.000000e+00, ptr %m.var, align 8, !dbg !49 -// CHECK:STDOUT: call void @_CF.Main.9522ff908e97e267(ptr %c.var), !dbg !52 -// CHECK:STDOUT: call void @_CF.Main.9522ff908e97e267(ptr %d.var), !dbg !54 -// CHECK:STDOUT: %.loc27 = load i32, ptr %n.var, align 4, !dbg !55 -// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 %.loc27), !dbg !56 -// CHECK:STDOUT: %.loc28 = load double, ptr %m.var, align 8, !dbg !57 -// CHECK:STDOUT: call void @_CF.Main.073fbce68be6103e(double %.loc28), !dbg !58 -// CHECK:STDOUT: call void @_CF.Main.99ea8cc237f84c8d(%type.26 zeroinitializer), !dbg !59 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %m.var), !dbg !49 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %n.var), !dbg !47 -// CHECK:STDOUT: call void @"_CSelfDestruct.a50fd899f969e609:core.Destroy.Core"(ptr %d.var), !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !43 -// CHECK:STDOUT: ret void, !dbg !60 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !45 +// CHECK:STDOUT: %d.var = alloca {}, align 1, !dbg !47 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !49 +// CHECK:STDOUT: %m.var = alloca double, align 8, !dbg !51 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !45 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.loc20_3, i64 0, i1 false), !dbg !45 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !47 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %d.var, ptr align 1 @D.val.loc21_3, i64 0, i1 false), !dbg !47 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !49 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !49 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !51 +// CHECK:STDOUT: store double 0.000000e+00, ptr %m.var, align 8, !dbg !51 +// CHECK:STDOUT: call void @_CF.Main.9522ff908e97e267(ptr %c.var), !dbg !54 +// CHECK:STDOUT: call void @_CF.Main.9522ff908e97e267(ptr %d.var), !dbg !56 +// CHECK:STDOUT: %.loc27 = load i32, ptr %n.var, align 4, !dbg !57 +// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 %.loc27), !dbg !58 +// CHECK:STDOUT: %.loc28 = load double, ptr %m.var, align 8, !dbg !59 +// CHECK:STDOUT: call void @_CF.Main.073fbce68be6103e(double %.loc28), !dbg !60 +// CHECK:STDOUT: call void @_CF.Main.99ea8cc237f84c8d(%type.28 zeroinitializer), !dbg !61 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %m.var), !dbg !51 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %n.var), !dbg !49 +// CHECK:STDOUT: call void @"_CSelfDestruct.a50fd899f969e609:core.Destroy.Core"(ptr %d.var), !dbg !47 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !45 +// CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !61 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !63 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !65 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !67 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !67 +// CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !69 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !71 +// CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a50fd899f969e609:core.Destroy.Core"(ptr %self) #0 !dbg !73 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a50fd899f969e609:core.Destroy.Core"(ptr %self) #0 !dbg !75 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !75 +// CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !77 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !79 +// CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -104,27 +104,27 @@ fn G() { // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.9522ff908e97e267(ptr %_) #0 !dbg !81 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.9522ff908e97e267(ptr %_) #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !84 +// CHECK:STDOUT: ret void, !dbg !86 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba(i32 %_) #0 !dbg !91 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba(i32 %_) #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !94 +// CHECK:STDOUT: ret void, !dbg !96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.073fbce68be6103e(double %_) #0 !dbg !96 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.073fbce68be6103e(double %_) #0 !dbg !98 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.99ea8cc237f84c8d(%type.26 %_) #0 !dbg !101 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.99ea8cc237f84c8d(%type.28 %_) #0 !dbg !103 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !104 +// CHECK:STDOUT: ret void, !dbg !106 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -135,68 +135,68 @@ fn G() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "call.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !{null} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !38 = !{null, !37} -// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{null, !34} +// CHECK:STDOUT: !34 = !DIFile(filename: "call.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !{null} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !40 = !{null, !39} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !32, line: 19, type: !36, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !43 = !DILocation(line: 20, column: 3, scope: !42) -// CHECK:STDOUT: !45 = !DILocation(line: 21, column: 3, scope: !42) -// CHECK:STDOUT: !47 = !DILocation(line: 22, column: 3, scope: !42) -// CHECK:STDOUT: !49 = !DILocation(line: 23, column: 3, scope: !42) -// CHECK:STDOUT: !52 = !DILocation(line: 25, column: 3, scope: !42) -// CHECK:STDOUT: !54 = !DILocation(line: 26, column: 3, scope: !42) -// CHECK:STDOUT: !55 = !DILocation(line: 27, column: 5, scope: !42) -// CHECK:STDOUT: !56 = !DILocation(line: 27, column: 3, scope: !42) -// CHECK:STDOUT: !57 = !DILocation(line: 28, column: 5, scope: !42) -// CHECK:STDOUT: !58 = !DILocation(line: 28, column: 3, scope: !42) -// CHECK:STDOUT: !59 = !DILocation(line: 29, column: 3, scope: !42) -// CHECK:STDOUT: !60 = !DILocation(line: 19, column: 1, scope: !42) -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 23, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !64) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !37) -// CHECK:STDOUT: !63 = !DILocation(line: 23, column: 3, scope: !61) -// CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !68) -// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !34) -// CHECK:STDOUT: !67 = !DILocation(line: 22, column: 3, scope: !65) -// CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !32, line: 21, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !72) -// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !37) -// CHECK:STDOUT: !71 = !DILocation(line: 21, column: 3, scope: !69) -// CHECK:STDOUT: !72 = !{!70} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a50fd899f969e609:core.Destroy.Core", scope: null, file: !32, line: 21, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !76) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !37) -// CHECK:STDOUT: !75 = !DILocation(line: 21, column: 3, scope: !73) -// CHECK:STDOUT: !76 = !{!74} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !32, line: 20, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !80) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !37) -// CHECK:STDOUT: !79 = !DILocation(line: 20, column: 3, scope: !77) -// CHECK:STDOUT: !80 = !{!78} -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !32, line: 13, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !85) -// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !37) -// CHECK:STDOUT: !84 = !DILocation(line: 13, column: 1, scope: !81) -// CHECK:STDOUT: !85 = !{!82} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !32, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !95) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !34) -// CHECK:STDOUT: !94 = !DILocation(line: 13, column: 1, scope: !91) -// CHECK:STDOUT: !95 = !{!92} -// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.073fbce68be6103e", scope: null, file: !32, line: 13, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !100) -// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !37) -// CHECK:STDOUT: !99 = !DILocation(line: 13, column: 1, scope: !96) -// CHECK:STDOUT: !100 = !{!97} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.99ea8cc237f84c8d", scope: null, file: !32, line: 13, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !105) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !37) -// CHECK:STDOUT: !104 = !DILocation(line: 13, column: 1, scope: !101) -// CHECK:STDOUT: !105 = !{!102} +// CHECK:STDOUT: !42 = !{null, !36} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !34, line: 19, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !45 = !DILocation(line: 20, column: 3, scope: !44) +// CHECK:STDOUT: !47 = !DILocation(line: 21, column: 3, scope: !44) +// CHECK:STDOUT: !49 = !DILocation(line: 22, column: 3, scope: !44) +// CHECK:STDOUT: !51 = !DILocation(line: 23, column: 3, scope: !44) +// CHECK:STDOUT: !54 = !DILocation(line: 25, column: 3, scope: !44) +// CHECK:STDOUT: !56 = !DILocation(line: 26, column: 3, scope: !44) +// CHECK:STDOUT: !57 = !DILocation(line: 27, column: 5, scope: !44) +// CHECK:STDOUT: !58 = !DILocation(line: 27, column: 3, scope: !44) +// CHECK:STDOUT: !59 = !DILocation(line: 28, column: 5, scope: !44) +// CHECK:STDOUT: !60 = !DILocation(line: 28, column: 3, scope: !44) +// CHECK:STDOUT: !61 = !DILocation(line: 29, column: 3, scope: !44) +// CHECK:STDOUT: !62 = !DILocation(line: 19, column: 1, scope: !44) +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !34, line: 23, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !66) +// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !39) +// CHECK:STDOUT: !65 = !DILocation(line: 23, column: 3, scope: !63) +// CHECK:STDOUT: !66 = !{!64} +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !34, line: 22, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !70) +// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !36) +// CHECK:STDOUT: !69 = !DILocation(line: 22, column: 3, scope: !67) +// CHECK:STDOUT: !70 = !{!68} +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !34, line: 21, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !74) +// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !39) +// CHECK:STDOUT: !73 = !DILocation(line: 21, column: 3, scope: !71) +// CHECK:STDOUT: !74 = !{!72} +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a50fd899f969e609:core.Destroy.Core", scope: null, file: !34, line: 21, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !78) +// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !39) +// CHECK:STDOUT: !77 = !DILocation(line: 21, column: 3, scope: !75) +// CHECK:STDOUT: !78 = !{!76} +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !34, line: 20, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !82) +// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !39) +// CHECK:STDOUT: !81 = !DILocation(line: 20, column: 3, scope: !79) +// CHECK:STDOUT: !82 = !{!80} +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !34, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !87) +// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !39) +// CHECK:STDOUT: !86 = !DILocation(line: 13, column: 1, scope: !83) +// CHECK:STDOUT: !87 = !{!84} +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !34, line: 13, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !97) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !36) +// CHECK:STDOUT: !96 = !DILocation(line: 13, column: 1, scope: !93) +// CHECK:STDOUT: !97 = !{!94} +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.073fbce68be6103e", scope: null, file: !34, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !102) +// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !39) +// CHECK:STDOUT: !101 = !DILocation(line: 13, column: 1, scope: !98) +// CHECK:STDOUT: !102 = !{!99} +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.99ea8cc237f84c8d", scope: null, file: !34, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !107) +// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !39) +// CHECK:STDOUT: !106 = !DILocation(line: 13, column: 1, scope: !103) +// CHECK:STDOUT: !107 = !{!104} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_basic.carbon b/toolchain/lower/testdata/function/generic/call_basic.carbon index 5104582e5da1..e2b5d6efb6fb 100644 --- a/toolchain/lower/testdata/function/generic/call_basic.carbon +++ b/toolchain/lower/testdata/function/generic/call_basic.carbon @@ -59,79 +59,79 @@ fn M() { // CHECK:STDOUT: ; ModuleID = 'call_basic.carbon' // CHECK:STDOUT: source_filename = "call_basic.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: %type.26 = type {} +// CHECK:STDOUT: %type.28 = type {} // CHECK:STDOUT: // CHECK:STDOUT: @C.val.loc15_43 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_COp.C.Main:Copy.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define void @"_COp.C.Main:Copy.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @C.val.loc15_43, i64 0, i1 false), !dbg !49 -// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @C.val.loc15_43, i64 0, i1 false), !dbg !51 +// CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !51 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !53 +// CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %self) #0 !dbg !61 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !61 +// CHECK:STDOUT: ret void, !dbg !63 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !63 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !65 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !69 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: ret void, !dbg !71 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !71 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !73 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !73 +// CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !75 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !77 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !76 -// CHECK:STDOUT: %p.var = alloca double, align 8, !dbg !78 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !76 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !76 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %p.var), !dbg !78 -// CHECK:STDOUT: store double 1.000000e+00, ptr %p.var, align 8, !dbg !78 -// CHECK:STDOUT: %.loc52 = load i32, ptr %n.var, align 4, !dbg !80 -// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 %.loc52), !dbg !81 -// CHECK:STDOUT: %.loc53_18 = load i32, ptr %n.var, align 4, !dbg !82 -// CHECK:STDOUT: %G.call.loc53 = call i32 @_CG.Main.4d9f279dbc2b9f6f(i32 %.loc53_18), !dbg !83 -// CHECK:STDOUT: %.loc54 = load double, ptr %p.var, align 8, !dbg !88 -// CHECK:STDOUT: call void @_CF.Main.073fbce68be6103e(double %.loc54), !dbg !89 -// CHECK:STDOUT: %.loc55_18 = load double, ptr %p.var, align 8, !dbg !90 -// CHECK:STDOUT: %G.call.loc55 = call double @_CG.Main.cfa50e0c7743522e(double %.loc55_18), !dbg !91 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %p.var), !dbg !78 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %n.var), !dbg !76 -// CHECK:STDOUT: ret void, !dbg !94 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !78 +// CHECK:STDOUT: %p.var = alloca double, align 8, !dbg !80 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !78 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !78 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %p.var), !dbg !80 +// CHECK:STDOUT: store double 1.000000e+00, ptr %p.var, align 8, !dbg !80 +// CHECK:STDOUT: %.loc52 = load i32, ptr %n.var, align 4, !dbg !82 +// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 %.loc52), !dbg !83 +// CHECK:STDOUT: %.loc53_18 = load i32, ptr %n.var, align 4, !dbg !84 +// CHECK:STDOUT: %G.call.loc53 = call i32 @_CG.Main.4d9f279dbc2b9f6f(i32 %.loc53_18), !dbg !85 +// CHECK:STDOUT: %.loc54 = load double, ptr %p.var, align 8, !dbg !90 +// CHECK:STDOUT: call void @_CF.Main.073fbce68be6103e(double %.loc54), !dbg !91 +// CHECK:STDOUT: %.loc55_18 = load double, ptr %p.var, align 8, !dbg !92 +// CHECK:STDOUT: %G.call.loc55 = call double @_CG.Main.cfa50e0c7743522e(double %.loc55_18), !dbg !93 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %p.var), !dbg !80 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %n.var), !dbg !78 +// CHECK:STDOUT: ret void, !dbg !96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !95 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !97 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !97 +// CHECK:STDOUT: ret void, !dbg !99 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -141,154 +141,154 @@ fn M() { // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba(i32 %_) #0 !dbg !99 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba(i32 %_) #0 !dbg !101 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !102 +// CHECK:STDOUT: ret void, !dbg !104 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.4d9f279dbc2b9f6f(i32 %x) #0 !dbg !104 { +// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.4d9f279dbc2b9f6f(i32 %x) #0 !dbg !106 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc29_6.3.temp = alloca i32, align 4, !dbg !110 -// CHECK:STDOUT: %.loc31_8.3.temp = alloca i32, align 4, !dbg !113 -// CHECK:STDOUT: %.loc31_9.3.temp = alloca i32, align 4, !dbg !114 -// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !115 -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !119 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !123 -// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !127 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !131 -// CHECK:STDOUT: %.loc43_6.3.temp = alloca {}, align 1, !dbg !134 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_6.3.temp), !dbg !110 -// CHECK:STDOUT: %H.call.loc29 = call i32 @_CH.Main.4d6ceefeb7f772f4(i32 %x), !dbg !110 -// CHECK:STDOUT: store i32 %H.call.loc29, ptr %.loc29_6.3.temp, align 4, !dbg !110 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc29_6.3.temp), !dbg !110 -// CHECK:STDOUT: %H.call.loc30 = call %type.26 @_CH.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !111 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !113 -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.4d9f279dbc2b9f6f(i32 %x), !dbg !113 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_9.3.temp), !dbg !114 -// CHECK:STDOUT: store i32 %G.call, ptr %.loc31_8.3.temp, align 4, !dbg !113 -// CHECK:STDOUT: %.loc31_8.5 = load i32, ptr %.loc31_8.3.temp, align 4, !dbg !113 -// CHECK:STDOUT: %H.call.loc31 = call i32 @_CH.Main.4d6ceefeb7f772f4(i32 %.loc31_8.5), !dbg !114 -// CHECK:STDOUT: store i32 %H.call.loc31, ptr %.loc31_9.3.temp, align 4, !dbg !114 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc31_9.3.temp), !dbg !114 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc31_8.3.temp), !dbg !113 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !115 -// CHECK:STDOUT: store double poison, ptr %var_f64.var, align 8, !dbg !115 -// CHECK:STDOUT: %.loc35_5 = load double, ptr %var_f64.var, align 8, !dbg !117 -// CHECK:STDOUT: %H.call.loc35 = call double @_CH.Main.c5e4ba542a56b71f(double %.loc35_5), !dbg !118 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !119 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !119 -// CHECK:STDOUT: %.loc37_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !121 -// CHECK:STDOUT: %H.call.loc37 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc37_5), !dbg !122 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !123 -// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !123 -// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !125 -// CHECK:STDOUT: %H.call.loc39 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc39_5), !dbg !126 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !127 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !127 -// CHECK:STDOUT: %.loc41_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !129 -// CHECK:STDOUT: %H.call.loc41 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc41_5), !dbg !130 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !131 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc43_6.3.temp), !dbg !134 -// CHECK:STDOUT: call void @_CH.Main.42513763e01cba2c(ptr %.loc43_6.3.temp, ptr %c.var), !dbg !134 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc43_6.3.temp), !dbg !134 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !131 -// CHECK:STDOUT: call void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !127 -// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !123 -// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !119 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %var_f64.var), !dbg !115 -// CHECK:STDOUT: ret i32 %x, !dbg !136 +// CHECK:STDOUT: %.loc29_6.3.temp = alloca i32, align 4, !dbg !112 +// CHECK:STDOUT: %.loc31_8.3.temp = alloca i32, align 4, !dbg !115 +// CHECK:STDOUT: %.loc31_9.3.temp = alloca i32, align 4, !dbg !116 +// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !117 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !121 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !125 +// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !129 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !133 +// CHECK:STDOUT: %.loc43_6.3.temp = alloca {}, align 1, !dbg !136 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_6.3.temp), !dbg !112 +// CHECK:STDOUT: %H.call.loc29 = call i32 @_CH.Main.4d6ceefeb7f772f4(i32 %x), !dbg !112 +// CHECK:STDOUT: store i32 %H.call.loc29, ptr %.loc29_6.3.temp, align 4, !dbg !112 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc29_6.3.temp), !dbg !112 +// CHECK:STDOUT: %H.call.loc30 = call %type.28 @_CH.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !113 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !115 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.4d9f279dbc2b9f6f(i32 %x), !dbg !115 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_9.3.temp), !dbg !116 +// CHECK:STDOUT: store i32 %G.call, ptr %.loc31_8.3.temp, align 4, !dbg !115 +// CHECK:STDOUT: %.loc31_8.5 = load i32, ptr %.loc31_8.3.temp, align 4, !dbg !115 +// CHECK:STDOUT: %H.call.loc31 = call i32 @_CH.Main.4d6ceefeb7f772f4(i32 %.loc31_8.5), !dbg !116 +// CHECK:STDOUT: store i32 %H.call.loc31, ptr %.loc31_9.3.temp, align 4, !dbg !116 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc31_9.3.temp), !dbg !116 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc31_8.3.temp), !dbg !115 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !117 +// CHECK:STDOUT: store double poison, ptr %var_f64.var, align 8, !dbg !117 +// CHECK:STDOUT: %.loc35_5 = load double, ptr %var_f64.var, align 8, !dbg !119 +// CHECK:STDOUT: %H.call.loc35 = call double @_CH.Main.c5e4ba542a56b71f(double %.loc35_5), !dbg !120 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !121 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !121 +// CHECK:STDOUT: %.loc37_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !123 +// CHECK:STDOUT: %H.call.loc37 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc37_5), !dbg !124 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !125 +// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !125 +// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !127 +// CHECK:STDOUT: %H.call.loc39 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc39_5), !dbg !128 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !129 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !129 +// CHECK:STDOUT: %.loc41_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !131 +// CHECK:STDOUT: %H.call.loc41 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc41_5), !dbg !132 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !133 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc43_6.3.temp), !dbg !136 +// CHECK:STDOUT: call void @_CH.Main.42513763e01cba2c(ptr %.loc43_6.3.temp, ptr %c.var), !dbg !136 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc43_6.3.temp), !dbg !136 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !133 +// CHECK:STDOUT: call void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !129 +// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !125 +// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !121 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %var_f64.var), !dbg !117 +// CHECK:STDOUT: ret i32 %x, !dbg !138 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.073fbce68be6103e(double %_) #0 !dbg !138 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.073fbce68be6103e(double %_) #0 !dbg !140 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !141 +// CHECK:STDOUT: ret void, !dbg !143 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CG.Main.cfa50e0c7743522e(double %x) #0 !dbg !143 { +// CHECK:STDOUT: define linkonce_odr double @_CG.Main.cfa50e0c7743522e(double %x) #0 !dbg !145 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc29_6.3.temp = alloca double, align 8, !dbg !149 -// CHECK:STDOUT: %.loc31_8.3.temp = alloca double, align 8, !dbg !152 -// CHECK:STDOUT: %.loc31_9.3.temp = alloca double, align 8, !dbg !153 -// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !154 -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !158 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !162 -// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !166 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !170 -// CHECK:STDOUT: %.loc43_6.3.temp = alloca {}, align 1, !dbg !173 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_6.3.temp), !dbg !149 -// CHECK:STDOUT: %H.call.loc29 = call double @_CH.Main.c5e4ba542a56b71f(double %x), !dbg !149 -// CHECK:STDOUT: store double %H.call.loc29, ptr %.loc29_6.3.temp, align 8, !dbg !149 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc29_6.3.temp), !dbg !149 -// CHECK:STDOUT: %H.call.loc30 = call %type.26 @_CH.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !150 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !152 -// CHECK:STDOUT: %G.call = call double @_CG.Main.cfa50e0c7743522e(double %x), !dbg !152 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_9.3.temp), !dbg !153 -// CHECK:STDOUT: store double %G.call, ptr %.loc31_8.3.temp, align 8, !dbg !152 -// CHECK:STDOUT: %.loc31_8.5 = load double, ptr %.loc31_8.3.temp, align 8, !dbg !152 -// CHECK:STDOUT: %H.call.loc31 = call double @_CH.Main.c5e4ba542a56b71f(double %.loc31_8.5), !dbg !153 -// CHECK:STDOUT: store double %H.call.loc31, ptr %.loc31_9.3.temp, align 8, !dbg !153 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc31_9.3.temp), !dbg !153 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc31_8.3.temp), !dbg !152 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !154 -// CHECK:STDOUT: store double poison, ptr %var_f64.var, align 8, !dbg !154 -// CHECK:STDOUT: %.loc35_5 = load double, ptr %var_f64.var, align 8, !dbg !156 -// CHECK:STDOUT: %H.call.loc35 = call double @_CH.Main.c5e4ba542a56b71f(double %.loc35_5), !dbg !157 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !158 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !158 -// CHECK:STDOUT: %.loc37_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !160 -// CHECK:STDOUT: %H.call.loc37 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc37_5), !dbg !161 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !162 -// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !162 -// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !164 -// CHECK:STDOUT: %H.call.loc39 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc39_5), !dbg !165 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !166 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !166 -// CHECK:STDOUT: %.loc41_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !168 -// CHECK:STDOUT: %H.call.loc41 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc41_5), !dbg !169 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !170 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc43_6.3.temp), !dbg !173 -// CHECK:STDOUT: call void @_CH.Main.42513763e01cba2c(ptr %.loc43_6.3.temp, ptr %c.var), !dbg !173 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc43_6.3.temp), !dbg !173 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !170 -// CHECK:STDOUT: call void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !166 -// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !162 -// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !158 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %var_f64.var), !dbg !154 -// CHECK:STDOUT: ret double %x, !dbg !175 +// CHECK:STDOUT: %.loc29_6.3.temp = alloca double, align 8, !dbg !151 +// CHECK:STDOUT: %.loc31_8.3.temp = alloca double, align 8, !dbg !154 +// CHECK:STDOUT: %.loc31_9.3.temp = alloca double, align 8, !dbg !155 +// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !156 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !160 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !164 +// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !168 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !172 +// CHECK:STDOUT: %.loc43_6.3.temp = alloca {}, align 1, !dbg !175 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_6.3.temp), !dbg !151 +// CHECK:STDOUT: %H.call.loc29 = call double @_CH.Main.c5e4ba542a56b71f(double %x), !dbg !151 +// CHECK:STDOUT: store double %H.call.loc29, ptr %.loc29_6.3.temp, align 8, !dbg !151 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc29_6.3.temp), !dbg !151 +// CHECK:STDOUT: %H.call.loc30 = call %type.28 @_CH.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !152 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !154 +// CHECK:STDOUT: %G.call = call double @_CG.Main.cfa50e0c7743522e(double %x), !dbg !154 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_9.3.temp), !dbg !155 +// CHECK:STDOUT: store double %G.call, ptr %.loc31_8.3.temp, align 8, !dbg !154 +// CHECK:STDOUT: %.loc31_8.5 = load double, ptr %.loc31_8.3.temp, align 8, !dbg !154 +// CHECK:STDOUT: %H.call.loc31 = call double @_CH.Main.c5e4ba542a56b71f(double %.loc31_8.5), !dbg !155 +// CHECK:STDOUT: store double %H.call.loc31, ptr %.loc31_9.3.temp, align 8, !dbg !155 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc31_9.3.temp), !dbg !155 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc31_8.3.temp), !dbg !154 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !156 +// CHECK:STDOUT: store double poison, ptr %var_f64.var, align 8, !dbg !156 +// CHECK:STDOUT: %.loc35_5 = load double, ptr %var_f64.var, align 8, !dbg !158 +// CHECK:STDOUT: %H.call.loc35 = call double @_CH.Main.c5e4ba542a56b71f(double %.loc35_5), !dbg !159 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !160 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !160 +// CHECK:STDOUT: %.loc37_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !162 +// CHECK:STDOUT: %H.call.loc37 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc37_5), !dbg !163 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !164 +// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !164 +// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !166 +// CHECK:STDOUT: %H.call.loc39 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc39_5), !dbg !167 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !168 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !168 +// CHECK:STDOUT: %.loc41_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !170 +// CHECK:STDOUT: %H.call.loc41 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc41_5), !dbg !171 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !172 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc43_6.3.temp), !dbg !175 +// CHECK:STDOUT: call void @_CH.Main.42513763e01cba2c(ptr %.loc43_6.3.temp, ptr %c.var), !dbg !175 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc43_6.3.temp), !dbg !175 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !172 +// CHECK:STDOUT: call void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !168 +// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !164 +// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !160 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %var_f64.var), !dbg !156 +// CHECK:STDOUT: ret double %x, !dbg !177 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CH.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !177 { +// CHECK:STDOUT: define linkonce_odr i32 @_CH.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !179 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !183 +// CHECK:STDOUT: ret i32 %x, !dbg !185 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.26 @_CH.Main.c3359c2c217ad593(%type.26 %x) #0 !dbg !185 { +// CHECK:STDOUT: define linkonce_odr %type.28 @_CH.Main.c3359c2c217ad593(%type.28 %x) #0 !dbg !187 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret %type.26 %x, !dbg !191 +// CHECK:STDOUT: ret %type.28 %x, !dbg !193 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CH.Main.c5e4ba542a56b71f(double %x) #0 !dbg !193 { +// CHECK:STDOUT: define linkonce_odr double @_CH.Main.c5e4ba542a56b71f(double %x) #0 !dbg !195 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret double %x, !dbg !199 +// CHECK:STDOUT: ret double %x, !dbg !201 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CH.Main.a76b78461416b4a8(ptr %x) #0 !dbg !201 { +// CHECK:STDOUT: define linkonce_odr ptr @_CH.Main.a76b78461416b4a8(ptr %x) #0 !dbg !203 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %x, !dbg !207 +// CHECK:STDOUT: ret ptr %x, !dbg !209 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CH.Main.42513763e01cba2c(ptr sret({}) %return, ptr %x) #0 !dbg !225 { +// CHECK:STDOUT: define linkonce_odr void @_CH.Main.42513763e01cba2c(ptr sret({}) %return, ptr %x) #0 !dbg !227 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_COp.C.Main:Copy.Core"(ptr %return, ptr %x), !dbg !230 -// CHECK:STDOUT: ret void, !dbg !231 +// CHECK:STDOUT: call void @"_COp.C.Main:Copy.Core"(ptr %return, ptr %x), !dbg !232 +// CHECK:STDOUT: ret void, !dbg !233 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -302,140 +302,140 @@ fn M() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "call_basic.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !36 = !{!35, !35} -// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !38 = !{null, !35} +// CHECK:STDOUT: !34 = !DIFile(filename: "call_basic.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !38 = !{!37, !37} // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{null} +// CHECK:STDOUT: !40 = !{null, !37} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = !{null, !34} +// CHECK:STDOUT: !42 = !{null} // CHECK:STDOUT: !43 = !DISubroutineType(types: !42) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Op", linkageName: "_COp.C.Main:Copy.Core", scope: null, file: !32, line: 15, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !50) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !35) -// CHECK:STDOUT: !49 = !DILocation(line: 15, column: 34, scope: !44) -// CHECK:STDOUT: !50 = !{!45} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !32, line: 43, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !54) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !35) -// CHECK:STDOUT: !53 = !DILocation(line: 43, column: 3, scope: !51) -// CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !32, line: 43, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !58) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !35) -// CHECK:STDOUT: !57 = !DILocation(line: 43, column: 3, scope: !55) -// CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core", scope: null, file: !32, line: 40, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !62) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !35) -// CHECK:STDOUT: !61 = !DILocation(line: 40, column: 3, scope: !59) -// CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !32, line: 38, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !35) -// CHECK:STDOUT: !65 = !DILocation(line: 38, column: 3, scope: !63) -// CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !32, line: 36, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !70) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !35) -// CHECK:STDOUT: !69 = !DILocation(line: 36, column: 3, scope: !67) -// CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 34, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !74) -// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !35) -// CHECK:STDOUT: !73 = !DILocation(line: 34, column: 3, scope: !71) -// CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !32, line: 48, type: !41, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !76 = !DILocation(line: 49, column: 3, scope: !75) -// CHECK:STDOUT: !78 = !DILocation(line: 50, column: 3, scope: !75) -// CHECK:STDOUT: !80 = !DILocation(line: 52, column: 5, scope: !75) -// CHECK:STDOUT: !81 = !DILocation(line: 52, column: 3, scope: !75) -// CHECK:STDOUT: !82 = !DILocation(line: 53, column: 18, scope: !75) -// CHECK:STDOUT: !83 = !DILocation(line: 53, column: 16, scope: !75) -// CHECK:STDOUT: !84 = !{!34, !34} -// CHECK:STDOUT: !85 = !DISubroutineType(types: !84) -// CHECK:STDOUT: !88 = !DILocation(line: 54, column: 5, scope: !75) -// CHECK:STDOUT: !89 = !DILocation(line: 54, column: 3, scope: !75) -// CHECK:STDOUT: !90 = !DILocation(line: 55, column: 18, scope: !75) -// CHECK:STDOUT: !91 = !DILocation(line: 55, column: 16, scope: !75) -// CHECK:STDOUT: !94 = !DILocation(line: 48, column: 1, scope: !75) -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 53, type: !43, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !98) -// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !34) -// CHECK:STDOUT: !97 = !DILocation(line: 53, column: 16, scope: !95) -// CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !32, line: 19, type: !43, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !103) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !34) -// CHECK:STDOUT: !102 = !DILocation(line: 19, column: 1, scope: !99) -// CHECK:STDOUT: !103 = !{!100} -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.4d9f279dbc2b9f6f", scope: null, file: !32, line: 28, type: !85, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !137) -// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !34) -// CHECK:STDOUT: !110 = !DILocation(line: 29, column: 3, scope: !104) -// CHECK:STDOUT: !111 = !DILocation(line: 30, column: 3, scope: !104) -// CHECK:STDOUT: !113 = !DILocation(line: 31, column: 5, scope: !104) -// CHECK:STDOUT: !114 = !DILocation(line: 31, column: 3, scope: !104) -// CHECK:STDOUT: !115 = !DILocation(line: 34, column: 3, scope: !104) -// CHECK:STDOUT: !117 = !DILocation(line: 35, column: 5, scope: !104) -// CHECK:STDOUT: !118 = !DILocation(line: 35, column: 3, scope: !104) -// CHECK:STDOUT: !119 = !DILocation(line: 36, column: 3, scope: !104) -// CHECK:STDOUT: !121 = !DILocation(line: 37, column: 5, scope: !104) -// CHECK:STDOUT: !122 = !DILocation(line: 37, column: 3, scope: !104) -// CHECK:STDOUT: !123 = !DILocation(line: 38, column: 3, scope: !104) -// CHECK:STDOUT: !125 = !DILocation(line: 39, column: 5, scope: !104) -// CHECK:STDOUT: !126 = !DILocation(line: 39, column: 3, scope: !104) -// CHECK:STDOUT: !127 = !DILocation(line: 40, column: 3, scope: !104) -// CHECK:STDOUT: !129 = !DILocation(line: 41, column: 5, scope: !104) -// CHECK:STDOUT: !130 = !DILocation(line: 41, column: 3, scope: !104) -// CHECK:STDOUT: !131 = !DILocation(line: 42, column: 3, scope: !104) -// CHECK:STDOUT: !134 = !DILocation(line: 43, column: 3, scope: !104) -// CHECK:STDOUT: !136 = !DILocation(line: 45, column: 3, scope: !104) -// CHECK:STDOUT: !137 = !{!105} -// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.073fbce68be6103e", scope: null, file: !32, line: 19, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !142) -// CHECK:STDOUT: !139 = !DILocalVariable(arg: 1, scope: !138, type: !35) -// CHECK:STDOUT: !141 = !DILocation(line: 19, column: 1, scope: !138) -// CHECK:STDOUT: !142 = !{!139} -// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.cfa50e0c7743522e", scope: null, file: !32, line: 28, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !176) -// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !35) -// CHECK:STDOUT: !149 = !DILocation(line: 29, column: 3, scope: !143) -// CHECK:STDOUT: !150 = !DILocation(line: 30, column: 3, scope: !143) -// CHECK:STDOUT: !152 = !DILocation(line: 31, column: 5, scope: !143) -// CHECK:STDOUT: !153 = !DILocation(line: 31, column: 3, scope: !143) -// CHECK:STDOUT: !154 = !DILocation(line: 34, column: 3, scope: !143) -// CHECK:STDOUT: !156 = !DILocation(line: 35, column: 5, scope: !143) -// CHECK:STDOUT: !157 = !DILocation(line: 35, column: 3, scope: !143) -// CHECK:STDOUT: !158 = !DILocation(line: 36, column: 3, scope: !143) -// CHECK:STDOUT: !160 = !DILocation(line: 37, column: 5, scope: !143) -// CHECK:STDOUT: !161 = !DILocation(line: 37, column: 3, scope: !143) -// CHECK:STDOUT: !162 = !DILocation(line: 38, column: 3, scope: !143) -// CHECK:STDOUT: !164 = !DILocation(line: 39, column: 5, scope: !143) -// CHECK:STDOUT: !165 = !DILocation(line: 39, column: 3, scope: !143) -// CHECK:STDOUT: !166 = !DILocation(line: 40, column: 3, scope: !143) -// CHECK:STDOUT: !168 = !DILocation(line: 41, column: 5, scope: !143) -// CHECK:STDOUT: !169 = !DILocation(line: 41, column: 3, scope: !143) -// CHECK:STDOUT: !170 = !DILocation(line: 42, column: 3, scope: !143) -// CHECK:STDOUT: !173 = !DILocation(line: 43, column: 3, scope: !143) -// CHECK:STDOUT: !175 = !DILocation(line: 45, column: 3, scope: !143) -// CHECK:STDOUT: !176 = !{!144} -// CHECK:STDOUT: !177 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 22, type: !85, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !184) -// CHECK:STDOUT: !178 = !DILocalVariable(arg: 1, scope: !177, type: !34) -// CHECK:STDOUT: !183 = !DILocation(line: 23, column: 3, scope: !177) -// CHECK:STDOUT: !184 = !{!178} -// CHECK:STDOUT: !185 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.c3359c2c217ad593", scope: null, file: !32, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !192) -// CHECK:STDOUT: !186 = !DILocalVariable(arg: 1, scope: !185, type: !35) -// CHECK:STDOUT: !191 = !DILocation(line: 23, column: 3, scope: !185) -// CHECK:STDOUT: !192 = !{!186} -// CHECK:STDOUT: !193 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !200) -// CHECK:STDOUT: !194 = !DILocalVariable(arg: 1, scope: !193, type: !35) -// CHECK:STDOUT: !199 = !DILocation(line: 23, column: 3, scope: !193) -// CHECK:STDOUT: !200 = !{!194} -// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.a76b78461416b4a8", scope: null, file: !32, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !208) -// CHECK:STDOUT: !202 = !DILocalVariable(arg: 1, scope: !201, type: !35) -// CHECK:STDOUT: !207 = !DILocation(line: 23, column: 3, scope: !201) -// CHECK:STDOUT: !208 = !{!202} -// CHECK:STDOUT: !225 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.42513763e01cba2c", scope: null, file: !32, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !232) -// CHECK:STDOUT: !226 = !DILocalVariable(arg: 1, scope: !225, type: !35) -// CHECK:STDOUT: !230 = !DILocation(line: 23, column: 10, scope: !225) -// CHECK:STDOUT: !231 = !DILocation(line: 23, column: 3, scope: !225) -// CHECK:STDOUT: !232 = !{!226} +// CHECK:STDOUT: !44 = !{null, !36} +// CHECK:STDOUT: !45 = !DISubroutineType(types: !44) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Op", linkageName: "_COp.C.Main:Copy.Core", scope: null, file: !34, line: 15, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !52) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !37) +// CHECK:STDOUT: !51 = !DILocation(line: 15, column: 34, scope: !46) +// CHECK:STDOUT: !52 = !{!47} +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !34, line: 43, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !56) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !37) +// CHECK:STDOUT: !55 = !DILocation(line: 43, column: 3, scope: !53) +// CHECK:STDOUT: !56 = !{!54} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !34, line: 43, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !60) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !37) +// CHECK:STDOUT: !59 = !DILocation(line: 43, column: 3, scope: !57) +// CHECK:STDOUT: !60 = !{!58} +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core", scope: null, file: !34, line: 40, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !64) +// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !37) +// CHECK:STDOUT: !63 = !DILocation(line: 40, column: 3, scope: !61) +// CHECK:STDOUT: !64 = !{!62} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !34, line: 38, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !68) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !37) +// CHECK:STDOUT: !67 = !DILocation(line: 38, column: 3, scope: !65) +// CHECK:STDOUT: !68 = !{!66} +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !34, line: 36, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !72) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !37) +// CHECK:STDOUT: !71 = !DILocation(line: 36, column: 3, scope: !69) +// CHECK:STDOUT: !72 = !{!70} +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !34, line: 34, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !76) +// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !37) +// CHECK:STDOUT: !75 = !DILocation(line: 34, column: 3, scope: !73) +// CHECK:STDOUT: !76 = !{!74} +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !34, line: 48, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !78 = !DILocation(line: 49, column: 3, scope: !77) +// CHECK:STDOUT: !80 = !DILocation(line: 50, column: 3, scope: !77) +// CHECK:STDOUT: !82 = !DILocation(line: 52, column: 5, scope: !77) +// CHECK:STDOUT: !83 = !DILocation(line: 52, column: 3, scope: !77) +// CHECK:STDOUT: !84 = !DILocation(line: 53, column: 18, scope: !77) +// CHECK:STDOUT: !85 = !DILocation(line: 53, column: 16, scope: !77) +// CHECK:STDOUT: !86 = !{!36, !36} +// CHECK:STDOUT: !87 = !DISubroutineType(types: !86) +// CHECK:STDOUT: !90 = !DILocation(line: 54, column: 5, scope: !77) +// CHECK:STDOUT: !91 = !DILocation(line: 54, column: 3, scope: !77) +// CHECK:STDOUT: !92 = !DILocation(line: 55, column: 18, scope: !77) +// CHECK:STDOUT: !93 = !DILocation(line: 55, column: 16, scope: !77) +// CHECK:STDOUT: !96 = !DILocation(line: 48, column: 1, scope: !77) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !34, line: 53, type: !45, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !100) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !36) +// CHECK:STDOUT: !99 = !DILocation(line: 53, column: 16, scope: !97) +// CHECK:STDOUT: !100 = !{!98} +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !34, line: 19, type: !45, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !105) +// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !36) +// CHECK:STDOUT: !104 = !DILocation(line: 19, column: 1, scope: !101) +// CHECK:STDOUT: !105 = !{!102} +// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.4d9f279dbc2b9f6f", scope: null, file: !34, line: 28, type: !87, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !139) +// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !36) +// CHECK:STDOUT: !112 = !DILocation(line: 29, column: 3, scope: !106) +// CHECK:STDOUT: !113 = !DILocation(line: 30, column: 3, scope: !106) +// CHECK:STDOUT: !115 = !DILocation(line: 31, column: 5, scope: !106) +// CHECK:STDOUT: !116 = !DILocation(line: 31, column: 3, scope: !106) +// CHECK:STDOUT: !117 = !DILocation(line: 34, column: 3, scope: !106) +// CHECK:STDOUT: !119 = !DILocation(line: 35, column: 5, scope: !106) +// CHECK:STDOUT: !120 = !DILocation(line: 35, column: 3, scope: !106) +// CHECK:STDOUT: !121 = !DILocation(line: 36, column: 3, scope: !106) +// CHECK:STDOUT: !123 = !DILocation(line: 37, column: 5, scope: !106) +// CHECK:STDOUT: !124 = !DILocation(line: 37, column: 3, scope: !106) +// CHECK:STDOUT: !125 = !DILocation(line: 38, column: 3, scope: !106) +// CHECK:STDOUT: !127 = !DILocation(line: 39, column: 5, scope: !106) +// CHECK:STDOUT: !128 = !DILocation(line: 39, column: 3, scope: !106) +// CHECK:STDOUT: !129 = !DILocation(line: 40, column: 3, scope: !106) +// CHECK:STDOUT: !131 = !DILocation(line: 41, column: 5, scope: !106) +// CHECK:STDOUT: !132 = !DILocation(line: 41, column: 3, scope: !106) +// CHECK:STDOUT: !133 = !DILocation(line: 42, column: 3, scope: !106) +// CHECK:STDOUT: !136 = !DILocation(line: 43, column: 3, scope: !106) +// CHECK:STDOUT: !138 = !DILocation(line: 45, column: 3, scope: !106) +// CHECK:STDOUT: !139 = !{!107} +// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.073fbce68be6103e", scope: null, file: !34, line: 19, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !144) +// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !37) +// CHECK:STDOUT: !143 = !DILocation(line: 19, column: 1, scope: !140) +// CHECK:STDOUT: !144 = !{!141} +// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.cfa50e0c7743522e", scope: null, file: !34, line: 28, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !178) +// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !37) +// CHECK:STDOUT: !151 = !DILocation(line: 29, column: 3, scope: !145) +// CHECK:STDOUT: !152 = !DILocation(line: 30, column: 3, scope: !145) +// CHECK:STDOUT: !154 = !DILocation(line: 31, column: 5, scope: !145) +// CHECK:STDOUT: !155 = !DILocation(line: 31, column: 3, scope: !145) +// CHECK:STDOUT: !156 = !DILocation(line: 34, column: 3, scope: !145) +// CHECK:STDOUT: !158 = !DILocation(line: 35, column: 5, scope: !145) +// CHECK:STDOUT: !159 = !DILocation(line: 35, column: 3, scope: !145) +// CHECK:STDOUT: !160 = !DILocation(line: 36, column: 3, scope: !145) +// CHECK:STDOUT: !162 = !DILocation(line: 37, column: 5, scope: !145) +// CHECK:STDOUT: !163 = !DILocation(line: 37, column: 3, scope: !145) +// CHECK:STDOUT: !164 = !DILocation(line: 38, column: 3, scope: !145) +// CHECK:STDOUT: !166 = !DILocation(line: 39, column: 5, scope: !145) +// CHECK:STDOUT: !167 = !DILocation(line: 39, column: 3, scope: !145) +// CHECK:STDOUT: !168 = !DILocation(line: 40, column: 3, scope: !145) +// CHECK:STDOUT: !170 = !DILocation(line: 41, column: 5, scope: !145) +// CHECK:STDOUT: !171 = !DILocation(line: 41, column: 3, scope: !145) +// CHECK:STDOUT: !172 = !DILocation(line: 42, column: 3, scope: !145) +// CHECK:STDOUT: !175 = !DILocation(line: 43, column: 3, scope: !145) +// CHECK:STDOUT: !177 = !DILocation(line: 45, column: 3, scope: !145) +// CHECK:STDOUT: !178 = !{!146} +// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.4d6ceefeb7f772f4", scope: null, file: !34, line: 22, type: !87, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !186) +// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !36) +// CHECK:STDOUT: !185 = !DILocation(line: 23, column: 3, scope: !179) +// CHECK:STDOUT: !186 = !{!180} +// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.c3359c2c217ad593", scope: null, file: !34, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !194) +// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !37) +// CHECK:STDOUT: !193 = !DILocation(line: 23, column: 3, scope: !187) +// CHECK:STDOUT: !194 = !{!188} +// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.c5e4ba542a56b71f", scope: null, file: !34, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !202) +// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !37) +// CHECK:STDOUT: !201 = !DILocation(line: 23, column: 3, scope: !195) +// CHECK:STDOUT: !202 = !{!196} +// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.a76b78461416b4a8", scope: null, file: !34, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !210) +// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !37) +// CHECK:STDOUT: !209 = !DILocation(line: 23, column: 3, scope: !203) +// CHECK:STDOUT: !210 = !{!204} +// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.42513763e01cba2c", scope: null, file: !34, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !234) +// CHECK:STDOUT: !228 = !DILocalVariable(arg: 1, scope: !227, type: !37) +// CHECK:STDOUT: !232 = !DILocation(line: 23, column: 10, scope: !227) +// CHECK:STDOUT: !233 = !DILocation(line: 23, column: 3, scope: !227) +// CHECK:STDOUT: !234 = !{!228} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon b/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon index 6d0572527272..2a634d14cbe5 100644 --- a/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon +++ b/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon @@ -28,54 +28,54 @@ fn M() { // CHECK:STDOUT: source_filename = "call_dedup_ptr.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !39 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !40 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !46 -// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !50 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !40 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !40 -// CHECK:STDOUT: %.loc19_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !42 -// CHECK:STDOUT: %F.call.loc19 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc19_5), !dbg !43 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !46 -// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !46 -// CHECK:STDOUT: %.loc21_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !48 -// CHECK:STDOUT: %F.call.loc21 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc21_5), !dbg !49 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !50 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !50 -// CHECK:STDOUT: %.loc23_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !52 -// CHECK:STDOUT: %F.call.loc23 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc23_5), !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !50 -// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !40 -// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !42 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !48 +// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !52 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !42 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !42 +// CHECK:STDOUT: %.loc19_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !44 +// CHECK:STDOUT: %F.call.loc19 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc19_5), !dbg !45 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !48 +// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !48 +// CHECK:STDOUT: %.loc21_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !50 +// CHECK:STDOUT: %F.call.loc21 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc21_5), !dbg !51 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !52 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !52 +// CHECK:STDOUT: %.loc23_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !54 +// CHECK:STDOUT: %F.call.loc23 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc23_5), !dbg !55 +// CHECK:STDOUT: call void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !52 +// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !48 +// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !42 +// CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %self) #0 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %self) #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !61 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !61 +// CHECK:STDOUT: ret void, !dbg !63 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !63 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !65 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.a76b78461416b4a8(ptr %x) #0 !dbg !67 { +// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.a76b78461416b4a8(ptr %x) #0 !dbg !69 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %x, !dbg !73 +// CHECK:STDOUT: ret ptr %x, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -85,45 +85,45 @@ fn M() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "call_dedup_ptr.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !{null} -// CHECK:STDOUT: !35 = !DISubroutineType(types: !34) -// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !37 = !{null, !36} -// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !32, line: 17, type: !35, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !40 = !DILocation(line: 18, column: 3, scope: !39) -// CHECK:STDOUT: !42 = !DILocation(line: 19, column: 5, scope: !39) -// CHECK:STDOUT: !43 = !DILocation(line: 19, column: 3, scope: !39) -// CHECK:STDOUT: !44 = !{!36, !36} -// CHECK:STDOUT: !45 = !DISubroutineType(types: !44) -// CHECK:STDOUT: !46 = !DILocation(line: 20, column: 3, scope: !39) -// CHECK:STDOUT: !48 = !DILocation(line: 21, column: 5, scope: !39) -// CHECK:STDOUT: !49 = !DILocation(line: 21, column: 3, scope: !39) -// CHECK:STDOUT: !50 = !DILocation(line: 22, column: 3, scope: !39) -// CHECK:STDOUT: !52 = !DILocation(line: 23, column: 5, scope: !39) -// CHECK:STDOUT: !53 = !DILocation(line: 23, column: 3, scope: !39) -// CHECK:STDOUT: !54 = !DILocation(line: 17, column: 1, scope: !39) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core", scope: null, file: !32, line: 22, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !58) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !36) -// CHECK:STDOUT: !57 = !DILocation(line: 22, column: 3, scope: !55) -// CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !32, line: 20, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !62) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !36) -// CHECK:STDOUT: !61 = !DILocation(line: 20, column: 3, scope: !59) -// CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !32, line: 18, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !36) -// CHECK:STDOUT: !65 = !DILocation(line: 18, column: 3, scope: !63) -// CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a76b78461416b4a8", scope: null, file: !32, line: 13, type: !45, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !74) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !36) -// CHECK:STDOUT: !73 = !DILocation(line: 14, column: 3, scope: !67) -// CHECK:STDOUT: !74 = !{!68} +// CHECK:STDOUT: !34 = !DIFile(filename: "call_dedup_ptr.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !{null} +// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) +// CHECK:STDOUT: !38 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !39 = !{null, !38} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !34, line: 17, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !42 = !DILocation(line: 18, column: 3, scope: !41) +// CHECK:STDOUT: !44 = !DILocation(line: 19, column: 5, scope: !41) +// CHECK:STDOUT: !45 = !DILocation(line: 19, column: 3, scope: !41) +// CHECK:STDOUT: !46 = !{!38, !38} +// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) +// CHECK:STDOUT: !48 = !DILocation(line: 20, column: 3, scope: !41) +// CHECK:STDOUT: !50 = !DILocation(line: 21, column: 5, scope: !41) +// CHECK:STDOUT: !51 = !DILocation(line: 21, column: 3, scope: !41) +// CHECK:STDOUT: !52 = !DILocation(line: 22, column: 3, scope: !41) +// CHECK:STDOUT: !54 = !DILocation(line: 23, column: 5, scope: !41) +// CHECK:STDOUT: !55 = !DILocation(line: 23, column: 3, scope: !41) +// CHECK:STDOUT: !56 = !DILocation(line: 17, column: 1, scope: !41) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core", scope: null, file: !34, line: 22, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !60) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !38) +// CHECK:STDOUT: !59 = !DILocation(line: 22, column: 3, scope: !57) +// CHECK:STDOUT: !60 = !{!58} +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !34, line: 20, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !64) +// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !38) +// CHECK:STDOUT: !63 = !DILocation(line: 20, column: 3, scope: !61) +// CHECK:STDOUT: !64 = !{!62} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !34, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !68) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !38) +// CHECK:STDOUT: !67 = !DILocation(line: 18, column: 3, scope: !65) +// CHECK:STDOUT: !68 = !{!66} +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a76b78461416b4a8", scope: null, file: !34, line: 13, type: !47, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !76) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !38) +// CHECK:STDOUT: !75 = !DILocation(line: 14, column: 3, scope: !69) +// CHECK:STDOUT: !76 = !{!70} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon b/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon index d09bd9032e44..8653621a0e95 100644 --- a/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon +++ b/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon @@ -44,109 +44,109 @@ fn M() { // CHECK:STDOUT: ; ModuleID = 'call_deref_ptr.carbon' // CHECK:STDOUT: source_filename = "call_deref_ptr.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: %type.26 = type {} +// CHECK:STDOUT: %type.28 = type {} // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !42 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !43 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !43 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !43 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !45 -// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !45 -// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !47 -// CHECK:STDOUT: call void @_CF.Main.4d9f279dbc2b9f6f(ptr %.loc39_5), !dbg !48 -// CHECK:STDOUT: %.loc40_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !49 -// CHECK:STDOUT: call void @_CF.Main.cfa50e0c7743522e(ptr %.loc40_5), !dbg !50 -// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !43 -// CHECK:STDOUT: ret void, !dbg !51 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !45 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !47 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !45 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !45 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !47 +// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !47 +// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !49 +// CHECK:STDOUT: call void @_CF.Main.4d9f279dbc2b9f6f(ptr %.loc39_5), !dbg !50 +// CHECK:STDOUT: %.loc40_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !51 +// CHECK:STDOUT: call void @_CF.Main.cfa50e0c7743522e(ptr %.loc40_5), !dbg !52 +// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !47 +// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !45 +// CHECK:STDOUT: ret void, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !54 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !58 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !58 +// CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !60 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !62 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !62 +// CHECK:STDOUT: ret void, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !64 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !66 +// CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.4d9f279dbc2b9f6f(ptr %x) #0 !dbg !68 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.4d9f279dbc2b9f6f(ptr %x) #0 !dbg !70 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %A.call = call %type.26 @_CA.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !71 -// CHECK:STDOUT: call void @_CB.Main.4d9f279dbc2b9f6f(ptr %x), !dbg !75 -// CHECK:STDOUT: ret void, !dbg !76 +// CHECK:STDOUT: %A.call = call %type.28 @_CA.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !73 +// CHECK:STDOUT: call void @_CB.Main.4d9f279dbc2b9f6f(ptr %x), !dbg !77 +// CHECK:STDOUT: ret void, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.cfa50e0c7743522e(ptr %x) #0 !dbg !78 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.cfa50e0c7743522e(ptr %x) #0 !dbg !80 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %A.call = call %type.26 @_CA.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !81 -// CHECK:STDOUT: call void @_CB.Main.cfa50e0c7743522e(ptr %x), !dbg !83 -// CHECK:STDOUT: ret void, !dbg !84 +// CHECK:STDOUT: %A.call = call %type.28 @_CA.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !83 +// CHECK:STDOUT: call void @_CB.Main.cfa50e0c7743522e(ptr %x), !dbg !85 +// CHECK:STDOUT: ret void, !dbg !86 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.26 @_CA.Main.c3359c2c217ad593(%type.26 %x) #0 !dbg !86 { +// CHECK:STDOUT: define linkonce_odr %type.28 @_CA.Main.c3359c2c217ad593(%type.28 %x) #0 !dbg !88 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret %type.26 %x, !dbg !92 +// CHECK:STDOUT: ret %type.28 %x, !dbg !94 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.4d9f279dbc2b9f6f(ptr %x) #0 !dbg !94 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.4d9f279dbc2b9f6f(ptr %x) #0 !dbg !96 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc27_7.3.temp = alloca i32, align 4, !dbg !99 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_7.3.temp), !dbg !99 -// CHECK:STDOUT: %.loc27_5.2 = load i32, ptr %x, align 4, !dbg !98 -// CHECK:STDOUT: %D.call = call i32 @_CD.Main.4d6ceefeb7f772f4(i32 %.loc27_5.2), !dbg !99 -// CHECK:STDOUT: store i32 %D.call, ptr %.loc27_7.3.temp, align 4, !dbg !99 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc27_7.3.temp), !dbg !99 -// CHECK:STDOUT: ret void, !dbg !102 +// CHECK:STDOUT: %.loc27_7.3.temp = alloca i32, align 4, !dbg !101 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_7.3.temp), !dbg !101 +// CHECK:STDOUT: %.loc27_5.2 = load i32, ptr %x, align 4, !dbg !100 +// CHECK:STDOUT: %D.call = call i32 @_CD.Main.4d6ceefeb7f772f4(i32 %.loc27_5.2), !dbg !101 +// CHECK:STDOUT: store i32 %D.call, ptr %.loc27_7.3.temp, align 4, !dbg !101 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc27_7.3.temp), !dbg !101 +// CHECK:STDOUT: ret void, !dbg !104 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.cfa50e0c7743522e(ptr %x) #0 !dbg !104 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.cfa50e0c7743522e(ptr %x) #0 !dbg !106 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc27_7.3.temp = alloca double, align 8, !dbg !109 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_7.3.temp), !dbg !109 -// CHECK:STDOUT: %.loc27_5.2 = load double, ptr %x, align 8, !dbg !108 -// CHECK:STDOUT: %D.call = call double @_CD.Main.c5e4ba542a56b71f(double %.loc27_5.2), !dbg !109 -// CHECK:STDOUT: store double %D.call, ptr %.loc27_7.3.temp, align 8, !dbg !109 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc27_7.3.temp), !dbg !109 -// CHECK:STDOUT: ret void, !dbg !110 +// CHECK:STDOUT: %.loc27_7.3.temp = alloca double, align 8, !dbg !111 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_7.3.temp), !dbg !111 +// CHECK:STDOUT: %.loc27_5.2 = load double, ptr %x, align 8, !dbg !110 +// CHECK:STDOUT: %D.call = call double @_CD.Main.c5e4ba542a56b71f(double %.loc27_5.2), !dbg !111 +// CHECK:STDOUT: store double %D.call, ptr %.loc27_7.3.temp, align 8, !dbg !111 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc27_7.3.temp), !dbg !111 +// CHECK:STDOUT: ret void, !dbg !112 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !112 { +// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !114 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !118 +// CHECK:STDOUT: ret i32 %x, !dbg !120 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CD.Main.c5e4ba542a56b71f(double %x) #0 !dbg !120 { +// CHECK:STDOUT: define linkonce_odr double @_CD.Main.c5e4ba542a56b71f(double %x) #0 !dbg !122 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret double %x, !dbg !126 +// CHECK:STDOUT: ret double %x, !dbg !128 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -156,83 +156,83 @@ fn M() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "call_deref_ptr.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !{null} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !{null, !34} +// CHECK:STDOUT: !34 = !DIFile(filename: "call_deref_ptr.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !{null} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !40 = !{null, !39} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !32, line: 35, type: !36, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !43 = !DILocation(line: 36, column: 3, scope: !42) -// CHECK:STDOUT: !45 = !DILocation(line: 37, column: 3, scope: !42) -// CHECK:STDOUT: !47 = !DILocation(line: 39, column: 5, scope: !42) -// CHECK:STDOUT: !48 = !DILocation(line: 39, column: 3, scope: !42) -// CHECK:STDOUT: !49 = !DILocation(line: 40, column: 5, scope: !42) -// CHECK:STDOUT: !50 = !DILocation(line: 40, column: 3, scope: !42) -// CHECK:STDOUT: !51 = !DILocation(line: 35, column: 1, scope: !42) -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 39, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !55) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !34) -// CHECK:STDOUT: !54 = !DILocation(line: 39, column: 3, scope: !52) -// CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 40, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !59) -// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !39) -// CHECK:STDOUT: !58 = !DILocation(line: 40, column: 3, scope: !56) -// CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !32, line: 37, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !63) -// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !39) -// CHECK:STDOUT: !62 = !DILocation(line: 37, column: 3, scope: !60) -// CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !32, line: 36, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !67) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !39) -// CHECK:STDOUT: !66 = !DILocation(line: 36, column: 3, scope: !64) -// CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d9f279dbc2b9f6f", scope: null, file: !32, line: 30, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !77) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !39) -// CHECK:STDOUT: !71 = !DILocation(line: 31, column: 3, scope: !68) -// CHECK:STDOUT: !72 = !{!39, !39} -// CHECK:STDOUT: !73 = !DISubroutineType(types: !72) -// CHECK:STDOUT: !75 = !DILocation(line: 32, column: 3, scope: !68) -// CHECK:STDOUT: !76 = !DILocation(line: 30, column: 1, scope: !68) -// CHECK:STDOUT: !77 = !{!69} -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.cfa50e0c7743522e", scope: null, file: !32, line: 30, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !85) -// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !39) -// CHECK:STDOUT: !81 = !DILocation(line: 31, column: 3, scope: !78) -// CHECK:STDOUT: !83 = !DILocation(line: 32, column: 3, scope: !78) -// CHECK:STDOUT: !84 = !DILocation(line: 30, column: 1, scope: !78) -// CHECK:STDOUT: !85 = !{!79} -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c3359c2c217ad593", scope: null, file: !32, line: 18, type: !73, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !93) -// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !39) -// CHECK:STDOUT: !92 = !DILocation(line: 19, column: 3, scope: !86) -// CHECK:STDOUT: !93 = !{!87} -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.4d9f279dbc2b9f6f", scope: null, file: !32, line: 26, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !103) -// CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !94, type: !39) -// CHECK:STDOUT: !98 = !DILocation(line: 27, column: 5, scope: !94) -// CHECK:STDOUT: !99 = !DILocation(line: 27, column: 3, scope: !94) -// CHECK:STDOUT: !100 = !{!34, !34} -// CHECK:STDOUT: !101 = !DISubroutineType(types: !100) -// CHECK:STDOUT: !102 = !DILocation(line: 26, column: 1, scope: !94) -// CHECK:STDOUT: !103 = !{!95} -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.cfa50e0c7743522e", scope: null, file: !32, line: 26, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !111) -// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !39) -// CHECK:STDOUT: !108 = !DILocation(line: 27, column: 5, scope: !104) -// CHECK:STDOUT: !109 = !DILocation(line: 27, column: 3, scope: !104) -// CHECK:STDOUT: !110 = !DILocation(line: 26, column: 1, scope: !104) -// CHECK:STDOUT: !111 = !{!105} -// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 22, type: !101, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !119) -// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !34) -// CHECK:STDOUT: !118 = !DILocation(line: 23, column: 3, scope: !112) -// CHECK:STDOUT: !119 = !{!113} -// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 22, type: !73, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !127) -// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !39) -// CHECK:STDOUT: !126 = !DILocation(line: 23, column: 3, scope: !120) -// CHECK:STDOUT: !127 = !{!121} +// CHECK:STDOUT: !39 = !{null, !36} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !42 = !{null, !41} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !34, line: 35, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !45 = !DILocation(line: 36, column: 3, scope: !44) +// CHECK:STDOUT: !47 = !DILocation(line: 37, column: 3, scope: !44) +// CHECK:STDOUT: !49 = !DILocation(line: 39, column: 5, scope: !44) +// CHECK:STDOUT: !50 = !DILocation(line: 39, column: 3, scope: !44) +// CHECK:STDOUT: !51 = !DILocation(line: 40, column: 5, scope: !44) +// CHECK:STDOUT: !52 = !DILocation(line: 40, column: 3, scope: !44) +// CHECK:STDOUT: !53 = !DILocation(line: 35, column: 1, scope: !44) +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !34, line: 39, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !57) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !36) +// CHECK:STDOUT: !56 = !DILocation(line: 39, column: 3, scope: !54) +// CHECK:STDOUT: !57 = !{!55} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !34, line: 40, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !61) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !41) +// CHECK:STDOUT: !60 = !DILocation(line: 40, column: 3, scope: !58) +// CHECK:STDOUT: !61 = !{!59} +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !34, line: 37, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !65) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !41) +// CHECK:STDOUT: !64 = !DILocation(line: 37, column: 3, scope: !62) +// CHECK:STDOUT: !65 = !{!63} +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !34, line: 36, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !69) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !41) +// CHECK:STDOUT: !68 = !DILocation(line: 36, column: 3, scope: !66) +// CHECK:STDOUT: !69 = !{!67} +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d9f279dbc2b9f6f", scope: null, file: !34, line: 30, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !79) +// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !41) +// CHECK:STDOUT: !73 = !DILocation(line: 31, column: 3, scope: !70) +// CHECK:STDOUT: !74 = !{!41, !41} +// CHECK:STDOUT: !75 = !DISubroutineType(types: !74) +// CHECK:STDOUT: !77 = !DILocation(line: 32, column: 3, scope: !70) +// CHECK:STDOUT: !78 = !DILocation(line: 30, column: 1, scope: !70) +// CHECK:STDOUT: !79 = !{!71} +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.cfa50e0c7743522e", scope: null, file: !34, line: 30, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !87) +// CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !41) +// CHECK:STDOUT: !83 = !DILocation(line: 31, column: 3, scope: !80) +// CHECK:STDOUT: !85 = !DILocation(line: 32, column: 3, scope: !80) +// CHECK:STDOUT: !86 = !DILocation(line: 30, column: 1, scope: !80) +// CHECK:STDOUT: !87 = !{!81} +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c3359c2c217ad593", scope: null, file: !34, line: 18, type: !75, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !95) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !41) +// CHECK:STDOUT: !94 = !DILocation(line: 19, column: 3, scope: !88) +// CHECK:STDOUT: !95 = !{!89} +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.4d9f279dbc2b9f6f", scope: null, file: !34, line: 26, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !105) +// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !41) +// CHECK:STDOUT: !100 = !DILocation(line: 27, column: 5, scope: !96) +// CHECK:STDOUT: !101 = !DILocation(line: 27, column: 3, scope: !96) +// CHECK:STDOUT: !102 = !{!36, !36} +// CHECK:STDOUT: !103 = !DISubroutineType(types: !102) +// CHECK:STDOUT: !104 = !DILocation(line: 26, column: 1, scope: !96) +// CHECK:STDOUT: !105 = !{!97} +// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.cfa50e0c7743522e", scope: null, file: !34, line: 26, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !113) +// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !41) +// CHECK:STDOUT: !110 = !DILocation(line: 27, column: 5, scope: !106) +// CHECK:STDOUT: !111 = !DILocation(line: 27, column: 3, scope: !106) +// CHECK:STDOUT: !112 = !DILocation(line: 26, column: 1, scope: !106) +// CHECK:STDOUT: !113 = !{!107} +// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.4d6ceefeb7f772f4", scope: null, file: !34, line: 22, type: !103, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !121) +// CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !114, type: !36) +// CHECK:STDOUT: !120 = !DILocation(line: 23, column: 3, scope: !114) +// CHECK:STDOUT: !121 = !{!115} +// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c5e4ba542a56b71f", scope: null, file: !34, line: 22, type: !75, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !129) +// CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !122, type: !41) +// CHECK:STDOUT: !128 = !DILocation(line: 23, column: 3, scope: !122) +// CHECK:STDOUT: !129 = !{!123} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon b/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon index ed14689eec6b..d790295d2994 100644 --- a/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon @@ -42,43 +42,43 @@ fn H() { // CHECK:STDOUT: source_filename = "call_different_associated_const.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CH.Main() #0 !dbg !39 { +// CHECK:STDOUT: define void @_CH.Main() #0 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CG.Main.0676fa98bb7dbd66(), !dbg !40 -// CHECK:STDOUT: call void @_CG.Main.3e979ea3a37f4bf1(), !dbg !41 -// CHECK:STDOUT: ret void, !dbg !42 +// CHECK:STDOUT: call void @_CG.Main.0676fa98bb7dbd66(), !dbg !42 +// CHECK:STDOUT: call void @_CG.Main.3e979ea3a37f4bf1(), !dbg !43 +// CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core"(ptr %self) #0 !dbg !43 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core"(ptr %self) #0 !dbg !45 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !45 +// CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !47 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !49 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CG.Main.0676fa98bb7dbd66() #0 !dbg !51 { +// CHECK:STDOUT: define linkonce_odr void @_CG.Main.0676fa98bb7dbd66() #0 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca ptr, align 8, !dbg !52 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !52 -// CHECK:STDOUT: store ptr poison, ptr %_.var, align 8, !dbg !52 -// CHECK:STDOUT: call void @"_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core"(ptr %_.var), !dbg !52 -// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: %_.var = alloca ptr, align 8, !dbg !54 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !54 +// CHECK:STDOUT: store ptr poison, ptr %_.var, align 8, !dbg !54 +// CHECK:STDOUT: call void @"_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core"(ptr %_.var), !dbg !54 +// CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CG.Main.3e979ea3a37f4bf1() #0 !dbg !55 { +// CHECK:STDOUT: define linkonce_odr void @_CG.Main.3e979ea3a37f4bf1() #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca ptr, align 8, !dbg !56 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !56 -// CHECK:STDOUT: store ptr poison, ptr %_.var, align 8, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %_.var), !dbg !56 -// CHECK:STDOUT: ret void, !dbg !58 +// CHECK:STDOUT: %_.var = alloca ptr, align 8, !dbg !58 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !58 +// CHECK:STDOUT: store ptr poison, ptr %_.var, align 8, !dbg !58 +// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %_.var), !dbg !58 +// CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -90,34 +90,34 @@ fn H() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "call_different_associated_const.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !{null} -// CHECK:STDOUT: !35 = !DISubroutineType(types: !34) -// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !37 = !{null, !36} -// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !32, line: 35, type: !35, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !40 = !DILocation(line: 36, column: 3, scope: !39) -// CHECK:STDOUT: !41 = !DILocation(line: 37, column: 3, scope: !39) -// CHECK:STDOUT: !42 = !DILocation(line: 35, column: 1, scope: !39) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core", scope: null, file: !32, line: 23, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !46) -// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !36) -// CHECK:STDOUT: !45 = !DILocation(line: 23, column: 3, scope: !43) -// CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !32, line: 23, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !50) -// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !36) -// CHECK:STDOUT: !49 = !DILocation(line: 23, column: 3, scope: !47) -// CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.0676fa98bb7dbd66", scope: null, file: !32, line: 22, type: !35, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !52 = !DILocation(line: 23, column: 3, scope: !51) -// CHECK:STDOUT: !54 = !DILocation(line: 22, column: 1, scope: !51) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.3e979ea3a37f4bf1", scope: null, file: !32, line: 22, type: !35, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !56 = !DILocation(line: 23, column: 3, scope: !55) -// CHECK:STDOUT: !58 = !DILocation(line: 22, column: 1, scope: !55) +// CHECK:STDOUT: !34 = !DIFile(filename: "call_different_associated_const.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !{null} +// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) +// CHECK:STDOUT: !38 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !39 = !{null, !38} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !34, line: 35, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !42 = !DILocation(line: 36, column: 3, scope: !41) +// CHECK:STDOUT: !43 = !DILocation(line: 37, column: 3, scope: !41) +// CHECK:STDOUT: !44 = !DILocation(line: 35, column: 1, scope: !41) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core", scope: null, file: !34, line: 23, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !48) +// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !38) +// CHECK:STDOUT: !47 = !DILocation(line: 23, column: 3, scope: !45) +// CHECK:STDOUT: !48 = !{!46} +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !34, line: 23, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !52) +// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !38) +// CHECK:STDOUT: !51 = !DILocation(line: 23, column: 3, scope: !49) +// CHECK:STDOUT: !52 = !{!50} +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.0676fa98bb7dbd66", scope: null, file: !34, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !54 = !DILocation(line: 23, column: 3, scope: !53) +// CHECK:STDOUT: !56 = !DILocation(line: 22, column: 1, scope: !53) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.3e979ea3a37f4bf1", scope: null, file: !34, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !58 = !DILocation(line: 23, column: 3, scope: !57) +// CHECK:STDOUT: !60 = !DILocation(line: 22, column: 1, scope: !57) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon b/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon index 64c05b5b5981..4ca302dadbc3 100644 --- a/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon +++ b/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon @@ -48,183 +48,183 @@ fn M() { // CHECK:STDOUT: ; ModuleID = 'call_specific_in_class.carbon' // CHECK:STDOUT: source_filename = "call_specific_in_class.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: %type.26 = type {} +// CHECK:STDOUT: %type.28 = type {} // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !42 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !44 +// CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !46 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !50 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !52 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !51 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !57 -// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !61 -// CHECK:STDOUT: %var_i32.var = alloca i32, align 4, !dbg !65 -// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !71 -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !75 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !51 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !51 -// CHECK:STDOUT: %.loc34_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !53 -// CHECK:STDOUT: %F.call.loc34 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc34_5), !dbg !54 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !57 -// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !57 -// CHECK:STDOUT: %.loc36_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !59 -// CHECK:STDOUT: %F.call.loc36 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc36_5), !dbg !60 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !61 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !61 -// CHECK:STDOUT: %.loc38_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !63 -// CHECK:STDOUT: %F.call.loc38 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc38_5), !dbg !64 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_i32.var), !dbg !65 -// CHECK:STDOUT: store i32 0, ptr %var_i32.var, align 4, !dbg !65 -// CHECK:STDOUT: %.loc40_5 = load i32, ptr %var_i32.var, align 4, !dbg !67 -// CHECK:STDOUT: %F.call.loc40 = call i32 @_CF.Main.4d6ceefeb7f772f4(i32 %.loc40_5), !dbg !68 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !71 -// CHECK:STDOUT: store double 0.000000e+00, ptr %var_f64.var, align 8, !dbg !71 -// CHECK:STDOUT: %.loc42_5 = load double, ptr %var_f64.var, align 8, !dbg !73 -// CHECK:STDOUT: %F.call.loc42 = call double @_CF.Main.c5e4ba542a56b71f(double %.loc42_5), !dbg !74 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !75 -// CHECK:STDOUT: %F.call.loc44 = call %type.26 @_CF.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !77 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %_.var), !dbg !75 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %var_f64.var), !dbg !71 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %var_i32.var), !dbg !65 -// CHECK:STDOUT: call void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !61 -// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !57 -// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !51 -// CHECK:STDOUT: ret void, !dbg !78 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !53 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !59 +// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !63 +// CHECK:STDOUT: %var_i32.var = alloca i32, align 4, !dbg !67 +// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !73 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !77 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !53 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !53 +// CHECK:STDOUT: %.loc34_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !55 +// CHECK:STDOUT: %F.call.loc34 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc34_5), !dbg !56 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !59 +// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !59 +// CHECK:STDOUT: %.loc36_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !61 +// CHECK:STDOUT: %F.call.loc36 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc36_5), !dbg !62 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !63 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !63 +// CHECK:STDOUT: %.loc38_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !65 +// CHECK:STDOUT: %F.call.loc38 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc38_5), !dbg !66 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_i32.var), !dbg !67 +// CHECK:STDOUT: store i32 0, ptr %var_i32.var, align 4, !dbg !67 +// CHECK:STDOUT: %.loc40_5 = load i32, ptr %var_i32.var, align 4, !dbg !69 +// CHECK:STDOUT: %F.call.loc40 = call i32 @_CF.Main.4d6ceefeb7f772f4(i32 %.loc40_5), !dbg !70 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !73 +// CHECK:STDOUT: store double 0.000000e+00, ptr %var_f64.var, align 8, !dbg !73 +// CHECK:STDOUT: %.loc42_5 = load double, ptr %var_f64.var, align 8, !dbg !75 +// CHECK:STDOUT: %F.call.loc42 = call double @_CF.Main.c5e4ba542a56b71f(double %.loc42_5), !dbg !76 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !77 +// CHECK:STDOUT: %F.call.loc44 = call %type.28 @_CF.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !79 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %_.var), !dbg !77 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %var_f64.var), !dbg !73 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %var_i32.var), !dbg !67 +// CHECK:STDOUT: call void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !63 +// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !59 +// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !53 +// CHECK:STDOUT: ret void, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !79 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !81 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !81 +// CHECK:STDOUT: ret void, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !83 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !85 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !85 +// CHECK:STDOUT: ret void, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %self) #0 !dbg !87 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %self) #0 !dbg !89 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !89 +// CHECK:STDOUT: ret void, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !93 +// CHECK:STDOUT: ret void, !dbg !95 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !95 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !97 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !97 +// CHECK:STDOUT: ret void, !dbg !99 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.a76b78461416b4a8(ptr %x) #0 !dbg !99 { +// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.a76b78461416b4a8(ptr %x) #0 !dbg !101 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call ptr @_CG.Main.a76b78461416b4a8(ptr %x), !dbg !105 -// CHECK:STDOUT: ret ptr %G.call, !dbg !106 +// CHECK:STDOUT: %G.call = call ptr @_CG.Main.a76b78461416b4a8(ptr %x), !dbg !107 +// CHECK:STDOUT: ret ptr %G.call, !dbg !108 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !126 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !128 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x), !dbg !132 -// CHECK:STDOUT: ret i32 %G.call, !dbg !133 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x), !dbg !134 +// CHECK:STDOUT: ret i32 %G.call, !dbg !135 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CF.Main.c5e4ba542a56b71f(double %x) #0 !dbg !135 { +// CHECK:STDOUT: define linkonce_odr double @_CF.Main.c5e4ba542a56b71f(double %x) #0 !dbg !137 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call double @_CG.Main.c5e4ba542a56b71f(double %x), !dbg !141 -// CHECK:STDOUT: ret double %G.call, !dbg !142 +// CHECK:STDOUT: %G.call = call double @_CG.Main.c5e4ba542a56b71f(double %x), !dbg !143 +// CHECK:STDOUT: ret double %G.call, !dbg !144 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.26 @_CF.Main.c3359c2c217ad593(%type.26 %x) #0 !dbg !144 { +// CHECK:STDOUT: define linkonce_odr %type.28 @_CF.Main.c3359c2c217ad593(%type.28 %x) #0 !dbg !146 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call %type.26 @_CG.Main.c3359c2c217ad593(%type.26 %x), !dbg !150 -// CHECK:STDOUT: ret %type.26 %G.call, !dbg !151 +// CHECK:STDOUT: %G.call = call %type.28 @_CG.Main.c3359c2c217ad593(%type.28 %x), !dbg !152 +// CHECK:STDOUT: ret %type.28 %G.call, !dbg !153 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CG.Main.a76b78461416b4a8(ptr %x) #0 !dbg !153 { +// CHECK:STDOUT: define linkonce_odr ptr @_CG.Main.a76b78461416b4a8(ptr %x) #0 !dbg !155 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !158 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !158 -// CHECK:STDOUT: %C.Cfn.call = call ptr @_CCfn.C.Main.a76b78461416b4a8(ptr %c.var, ptr %x), !dbg !160 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !158 -// CHECK:STDOUT: ret ptr %C.Cfn.call, !dbg !164 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !160 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !160 +// CHECK:STDOUT: %C.Cfn.call = call ptr @_CCfn.C.Main.a76b78461416b4a8(ptr %c.var, ptr %x), !dbg !162 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !160 +// CHECK:STDOUT: ret ptr %C.Cfn.call, !dbg !166 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !188 { +// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !190 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !193 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !193 -// CHECK:STDOUT: %C.Cfn.call = call i32 @_CCfn.C.Main.4d6ceefeb7f772f4(ptr %c.var, i32 %x), !dbg !195 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !193 -// CHECK:STDOUT: ret i32 %C.Cfn.call, !dbg !199 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !195 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !195 +// CHECK:STDOUT: %C.Cfn.call = call i32 @_CCfn.C.Main.4d6ceefeb7f772f4(ptr %c.var, i32 %x), !dbg !197 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !195 +// CHECK:STDOUT: ret i32 %C.Cfn.call, !dbg !201 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CG.Main.c5e4ba542a56b71f(double %x) #0 !dbg !201 { +// CHECK:STDOUT: define linkonce_odr double @_CG.Main.c5e4ba542a56b71f(double %x) #0 !dbg !203 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !206 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !206 -// CHECK:STDOUT: %C.Cfn.call = call double @_CCfn.C.Main.c5e4ba542a56b71f(ptr %c.var, double %x), !dbg !208 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !206 -// CHECK:STDOUT: ret double %C.Cfn.call, !dbg !210 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !208 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !208 +// CHECK:STDOUT: %C.Cfn.call = call double @_CCfn.C.Main.c5e4ba542a56b71f(ptr %c.var, double %x), !dbg !210 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !208 +// CHECK:STDOUT: ret double %C.Cfn.call, !dbg !212 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.26 @_CG.Main.c3359c2c217ad593(%type.26 %x) #0 !dbg !212 { +// CHECK:STDOUT: define linkonce_odr %type.28 @_CG.Main.c3359c2c217ad593(%type.28 %x) #0 !dbg !214 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !217 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !217 -// CHECK:STDOUT: %C.Cfn.call = call %type.26 @_CCfn.C.Main.c3359c2c217ad593(ptr %c.var, %type.26 %x), !dbg !219 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !217 -// CHECK:STDOUT: ret %type.26 %C.Cfn.call, !dbg !221 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !219 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !219 +// CHECK:STDOUT: %C.Cfn.call = call %type.28 @_CCfn.C.Main.c3359c2c217ad593(ptr %c.var, %type.28 %x), !dbg !221 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !219 +// CHECK:STDOUT: ret %type.28 %C.Cfn.call, !dbg !223 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CCfn.C.Main.a76b78461416b4a8(ptr %self, ptr %x) #0 !dbg !223 { +// CHECK:STDOUT: define linkonce_odr ptr @_CCfn.C.Main.a76b78461416b4a8(ptr %self, ptr %x) #0 !dbg !225 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %x, !dbg !231 +// CHECK:STDOUT: ret ptr %x, !dbg !233 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CCfn.C.Main.4d6ceefeb7f772f4(ptr %self, i32 %x) #0 !dbg !253 { +// CHECK:STDOUT: define linkonce_odr i32 @_CCfn.C.Main.4d6ceefeb7f772f4(ptr %self, i32 %x) #0 !dbg !255 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !261 +// CHECK:STDOUT: ret i32 %x, !dbg !263 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CCfn.C.Main.c5e4ba542a56b71f(ptr %self, double %x) #0 !dbg !263 { +// CHECK:STDOUT: define linkonce_odr double @_CCfn.C.Main.c5e4ba542a56b71f(ptr %self, double %x) #0 !dbg !265 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret double %x, !dbg !271 +// CHECK:STDOUT: ret double %x, !dbg !273 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.26 @_CCfn.C.Main.c3359c2c217ad593(ptr %self, %type.26 %x) #0 !dbg !273 { +// CHECK:STDOUT: define linkonce_odr %type.28 @_CCfn.C.Main.c3359c2c217ad593(ptr %self, %type.28 %x) #0 !dbg !275 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret %type.26 %x, !dbg !281 +// CHECK:STDOUT: ret %type.28 %x, !dbg !283 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -234,138 +234,138 @@ fn M() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "call_specific_in_class.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !36 = !{null, !35} -// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !38 = !{null} +// CHECK:STDOUT: !34 = !DIFile(filename: "call_specific_in_class.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !38 = !{null, !37} // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{null, !34} +// CHECK:STDOUT: !40 = !{null} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !32, line: 24, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !45) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !35) -// CHECK:STDOUT: !44 = !DILocation(line: 24, column: 3, scope: !42) -// CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !32, line: 24, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !49) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !35) -// CHECK:STDOUT: !48 = !DILocation(line: 24, column: 3, scope: !46) -// CHECK:STDOUT: !49 = !{!47} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !32, line: 32, type: !39, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !51 = !DILocation(line: 33, column: 3, scope: !50) -// CHECK:STDOUT: !53 = !DILocation(line: 34, column: 5, scope: !50) -// CHECK:STDOUT: !54 = !DILocation(line: 34, column: 3, scope: !50) -// CHECK:STDOUT: !55 = !{!35, !35} -// CHECK:STDOUT: !56 = !DISubroutineType(types: !55) -// CHECK:STDOUT: !57 = !DILocation(line: 35, column: 3, scope: !50) -// CHECK:STDOUT: !59 = !DILocation(line: 36, column: 5, scope: !50) -// CHECK:STDOUT: !60 = !DILocation(line: 36, column: 3, scope: !50) -// CHECK:STDOUT: !61 = !DILocation(line: 37, column: 3, scope: !50) -// CHECK:STDOUT: !63 = !DILocation(line: 38, column: 5, scope: !50) -// CHECK:STDOUT: !64 = !DILocation(line: 38, column: 3, scope: !50) -// CHECK:STDOUT: !65 = !DILocation(line: 39, column: 3, scope: !50) -// CHECK:STDOUT: !67 = !DILocation(line: 40, column: 5, scope: !50) -// CHECK:STDOUT: !68 = !DILocation(line: 40, column: 3, scope: !50) -// CHECK:STDOUT: !69 = !{!34, !34} -// CHECK:STDOUT: !70 = !DISubroutineType(types: !69) -// CHECK:STDOUT: !71 = !DILocation(line: 41, column: 3, scope: !50) -// CHECK:STDOUT: !73 = !DILocation(line: 42, column: 5, scope: !50) -// CHECK:STDOUT: !74 = !DILocation(line: 42, column: 3, scope: !50) -// CHECK:STDOUT: !75 = !DILocation(line: 43, column: 3, scope: !50) -// CHECK:STDOUT: !77 = !DILocation(line: 44, column: 3, scope: !50) -// CHECK:STDOUT: !78 = !DILocation(line: 32, column: 1, scope: !50) -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 41, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !82) -// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !35) -// CHECK:STDOUT: !81 = !DILocation(line: 41, column: 3, scope: !79) -// CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 39, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !86) -// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !34) -// CHECK:STDOUT: !85 = !DILocation(line: 39, column: 3, scope: !83) -// CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core", scope: null, file: !32, line: 37, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !90) -// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !35) -// CHECK:STDOUT: !89 = !DILocation(line: 37, column: 3, scope: !87) -// CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !32, line: 35, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !94) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !35) -// CHECK:STDOUT: !93 = !DILocation(line: 35, column: 3, scope: !91) -// CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !32, line: 33, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !98) -// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !35) -// CHECK:STDOUT: !97 = !DILocation(line: 33, column: 3, scope: !95) -// CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a76b78461416b4a8", scope: null, file: !32, line: 28, type: !56, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !107) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !35) -// CHECK:STDOUT: !105 = !DILocation(line: 29, column: 10, scope: !99) -// CHECK:STDOUT: !106 = !DILocation(line: 29, column: 3, scope: !99) -// CHECK:STDOUT: !107 = !{!100} -// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 28, type: !70, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !134) -// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !34) -// CHECK:STDOUT: !132 = !DILocation(line: 29, column: 10, scope: !126) -// CHECK:STDOUT: !133 = !DILocation(line: 29, column: 3, scope: !126) -// CHECK:STDOUT: !134 = !{!127} -// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 28, type: !56, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !143) -// CHECK:STDOUT: !136 = !DILocalVariable(arg: 1, scope: !135, type: !35) -// CHECK:STDOUT: !141 = !DILocation(line: 29, column: 10, scope: !135) -// CHECK:STDOUT: !142 = !DILocation(line: 29, column: 3, scope: !135) -// CHECK:STDOUT: !143 = !{!136} -// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c3359c2c217ad593", scope: null, file: !32, line: 28, type: !56, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !152) -// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !35) -// CHECK:STDOUT: !150 = !DILocation(line: 29, column: 10, scope: !144) -// CHECK:STDOUT: !151 = !DILocation(line: 29, column: 3, scope: !144) -// CHECK:STDOUT: !152 = !{!145} -// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.a76b78461416b4a8", scope: null, file: !32, line: 23, type: !56, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !165) -// CHECK:STDOUT: !154 = !DILocalVariable(arg: 1, scope: !153, type: !35) -// CHECK:STDOUT: !158 = !DILocation(line: 24, column: 3, scope: !153) -// CHECK:STDOUT: !160 = !DILocation(line: 25, column: 10, scope: !153) -// CHECK:STDOUT: !162 = !{!35, !35, !35} -// CHECK:STDOUT: !163 = !DISubroutineType(types: !162) -// CHECK:STDOUT: !164 = !DILocation(line: 25, column: 3, scope: !153) -// CHECK:STDOUT: !165 = !{!154} -// CHECK:STDOUT: !188 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 23, type: !70, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !200) -// CHECK:STDOUT: !189 = !DILocalVariable(arg: 1, scope: !188, type: !34) -// CHECK:STDOUT: !193 = !DILocation(line: 24, column: 3, scope: !188) -// CHECK:STDOUT: !195 = !DILocation(line: 25, column: 10, scope: !188) -// CHECK:STDOUT: !197 = !{!34, !35, !34} -// CHECK:STDOUT: !198 = !DISubroutineType(types: !197) -// CHECK:STDOUT: !199 = !DILocation(line: 25, column: 3, scope: !188) -// CHECK:STDOUT: !200 = !{!189} -// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 23, type: !56, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !211) -// CHECK:STDOUT: !202 = !DILocalVariable(arg: 1, scope: !201, type: !35) -// CHECK:STDOUT: !206 = !DILocation(line: 24, column: 3, scope: !201) -// CHECK:STDOUT: !208 = !DILocation(line: 25, column: 10, scope: !201) -// CHECK:STDOUT: !210 = !DILocation(line: 25, column: 3, scope: !201) -// CHECK:STDOUT: !211 = !{!202} -// CHECK:STDOUT: !212 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c3359c2c217ad593", scope: null, file: !32, line: 23, type: !56, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !222) -// CHECK:STDOUT: !213 = !DILocalVariable(arg: 1, scope: !212, type: !35) -// CHECK:STDOUT: !217 = !DILocation(line: 24, column: 3, scope: !212) -// CHECK:STDOUT: !219 = !DILocation(line: 25, column: 10, scope: !212) -// CHECK:STDOUT: !221 = !DILocation(line: 25, column: 3, scope: !212) -// CHECK:STDOUT: !222 = !{!213} -// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.a76b78461416b4a8", scope: null, file: !32, line: 18, type: !163, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !232) -// CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !35) -// CHECK:STDOUT: !225 = !DILocalVariable(arg: 2, scope: !223, type: !35) -// CHECK:STDOUT: !231 = !DILocation(line: 19, column: 5, scope: !223) -// CHECK:STDOUT: !232 = !{!224, !225} -// CHECK:STDOUT: !253 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 18, type: !198, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !262) -// CHECK:STDOUT: !254 = !DILocalVariable(arg: 1, scope: !253, type: !35) -// CHECK:STDOUT: !255 = !DILocalVariable(arg: 2, scope: !253, type: !34) -// CHECK:STDOUT: !261 = !DILocation(line: 19, column: 5, scope: !253) -// CHECK:STDOUT: !262 = !{!254, !255} -// CHECK:STDOUT: !263 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 18, type: !163, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !272) -// CHECK:STDOUT: !264 = !DILocalVariable(arg: 1, scope: !263, type: !35) -// CHECK:STDOUT: !265 = !DILocalVariable(arg: 2, scope: !263, type: !35) -// CHECK:STDOUT: !271 = !DILocation(line: 19, column: 5, scope: !263) -// CHECK:STDOUT: !272 = !{!264, !265} -// CHECK:STDOUT: !273 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.c3359c2c217ad593", scope: null, file: !32, line: 18, type: !163, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !282) -// CHECK:STDOUT: !274 = !DILocalVariable(arg: 1, scope: !273, type: !35) -// CHECK:STDOUT: !275 = !DILocalVariable(arg: 2, scope: !273, type: !35) -// CHECK:STDOUT: !281 = !DILocation(line: 19, column: 5, scope: !273) -// CHECK:STDOUT: !282 = !{!274, !275} +// CHECK:STDOUT: !42 = !{null, !36} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !34, line: 24, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !47) +// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !37) +// CHECK:STDOUT: !46 = !DILocation(line: 24, column: 3, scope: !44) +// CHECK:STDOUT: !47 = !{!45} +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !34, line: 24, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !51) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !37) +// CHECK:STDOUT: !50 = !DILocation(line: 24, column: 3, scope: !48) +// CHECK:STDOUT: !51 = !{!49} +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !34, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !53 = !DILocation(line: 33, column: 3, scope: !52) +// CHECK:STDOUT: !55 = !DILocation(line: 34, column: 5, scope: !52) +// CHECK:STDOUT: !56 = !DILocation(line: 34, column: 3, scope: !52) +// CHECK:STDOUT: !57 = !{!37, !37} +// CHECK:STDOUT: !58 = !DISubroutineType(types: !57) +// CHECK:STDOUT: !59 = !DILocation(line: 35, column: 3, scope: !52) +// CHECK:STDOUT: !61 = !DILocation(line: 36, column: 5, scope: !52) +// CHECK:STDOUT: !62 = !DILocation(line: 36, column: 3, scope: !52) +// CHECK:STDOUT: !63 = !DILocation(line: 37, column: 3, scope: !52) +// CHECK:STDOUT: !65 = !DILocation(line: 38, column: 5, scope: !52) +// CHECK:STDOUT: !66 = !DILocation(line: 38, column: 3, scope: !52) +// CHECK:STDOUT: !67 = !DILocation(line: 39, column: 3, scope: !52) +// CHECK:STDOUT: !69 = !DILocation(line: 40, column: 5, scope: !52) +// CHECK:STDOUT: !70 = !DILocation(line: 40, column: 3, scope: !52) +// CHECK:STDOUT: !71 = !{!36, !36} +// CHECK:STDOUT: !72 = !DISubroutineType(types: !71) +// CHECK:STDOUT: !73 = !DILocation(line: 41, column: 3, scope: !52) +// CHECK:STDOUT: !75 = !DILocation(line: 42, column: 5, scope: !52) +// CHECK:STDOUT: !76 = !DILocation(line: 42, column: 3, scope: !52) +// CHECK:STDOUT: !77 = !DILocation(line: 43, column: 3, scope: !52) +// CHECK:STDOUT: !79 = !DILocation(line: 44, column: 3, scope: !52) +// CHECK:STDOUT: !80 = !DILocation(line: 32, column: 1, scope: !52) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !34, line: 41, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !84) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !37) +// CHECK:STDOUT: !83 = !DILocation(line: 41, column: 3, scope: !81) +// CHECK:STDOUT: !84 = !{!82} +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !34, line: 39, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !88) +// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !36) +// CHECK:STDOUT: !87 = !DILocation(line: 39, column: 3, scope: !85) +// CHECK:STDOUT: !88 = !{!86} +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core", scope: null, file: !34, line: 37, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !92) +// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !37) +// CHECK:STDOUT: !91 = !DILocation(line: 37, column: 3, scope: !89) +// CHECK:STDOUT: !92 = !{!90} +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !34, line: 35, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !96) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !37) +// CHECK:STDOUT: !95 = !DILocation(line: 35, column: 3, scope: !93) +// CHECK:STDOUT: !96 = !{!94} +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !34, line: 33, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !100) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !37) +// CHECK:STDOUT: !99 = !DILocation(line: 33, column: 3, scope: !97) +// CHECK:STDOUT: !100 = !{!98} +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a76b78461416b4a8", scope: null, file: !34, line: 28, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !109) +// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !37) +// CHECK:STDOUT: !107 = !DILocation(line: 29, column: 10, scope: !101) +// CHECK:STDOUT: !108 = !DILocation(line: 29, column: 3, scope: !101) +// CHECK:STDOUT: !109 = !{!102} +// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d6ceefeb7f772f4", scope: null, file: !34, line: 28, type: !72, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !136) +// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !36) +// CHECK:STDOUT: !134 = !DILocation(line: 29, column: 10, scope: !128) +// CHECK:STDOUT: !135 = !DILocation(line: 29, column: 3, scope: !128) +// CHECK:STDOUT: !136 = !{!129} +// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c5e4ba542a56b71f", scope: null, file: !34, line: 28, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !145) +// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !37) +// CHECK:STDOUT: !143 = !DILocation(line: 29, column: 10, scope: !137) +// CHECK:STDOUT: !144 = !DILocation(line: 29, column: 3, scope: !137) +// CHECK:STDOUT: !145 = !{!138} +// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c3359c2c217ad593", scope: null, file: !34, line: 28, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !154) +// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !37) +// CHECK:STDOUT: !152 = !DILocation(line: 29, column: 10, scope: !146) +// CHECK:STDOUT: !153 = !DILocation(line: 29, column: 3, scope: !146) +// CHECK:STDOUT: !154 = !{!147} +// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.a76b78461416b4a8", scope: null, file: !34, line: 23, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !167) +// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !37) +// CHECK:STDOUT: !160 = !DILocation(line: 24, column: 3, scope: !155) +// CHECK:STDOUT: !162 = !DILocation(line: 25, column: 10, scope: !155) +// CHECK:STDOUT: !164 = !{!37, !37, !37} +// CHECK:STDOUT: !165 = !DISubroutineType(types: !164) +// CHECK:STDOUT: !166 = !DILocation(line: 25, column: 3, scope: !155) +// CHECK:STDOUT: !167 = !{!156} +// CHECK:STDOUT: !190 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.4d6ceefeb7f772f4", scope: null, file: !34, line: 23, type: !72, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !202) +// CHECK:STDOUT: !191 = !DILocalVariable(arg: 1, scope: !190, type: !36) +// CHECK:STDOUT: !195 = !DILocation(line: 24, column: 3, scope: !190) +// CHECK:STDOUT: !197 = !DILocation(line: 25, column: 10, scope: !190) +// CHECK:STDOUT: !199 = !{!36, !37, !36} +// CHECK:STDOUT: !200 = !DISubroutineType(types: !199) +// CHECK:STDOUT: !201 = !DILocation(line: 25, column: 3, scope: !190) +// CHECK:STDOUT: !202 = !{!191} +// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c5e4ba542a56b71f", scope: null, file: !34, line: 23, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !213) +// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !37) +// CHECK:STDOUT: !208 = !DILocation(line: 24, column: 3, scope: !203) +// CHECK:STDOUT: !210 = !DILocation(line: 25, column: 10, scope: !203) +// CHECK:STDOUT: !212 = !DILocation(line: 25, column: 3, scope: !203) +// CHECK:STDOUT: !213 = !{!204} +// CHECK:STDOUT: !214 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c3359c2c217ad593", scope: null, file: !34, line: 23, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !224) +// CHECK:STDOUT: !215 = !DILocalVariable(arg: 1, scope: !214, type: !37) +// CHECK:STDOUT: !219 = !DILocation(line: 24, column: 3, scope: !214) +// CHECK:STDOUT: !221 = !DILocation(line: 25, column: 10, scope: !214) +// CHECK:STDOUT: !223 = !DILocation(line: 25, column: 3, scope: !214) +// CHECK:STDOUT: !224 = !{!215} +// CHECK:STDOUT: !225 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.a76b78461416b4a8", scope: null, file: !34, line: 18, type: !165, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !234) +// CHECK:STDOUT: !226 = !DILocalVariable(arg: 1, scope: !225, type: !37) +// CHECK:STDOUT: !227 = !DILocalVariable(arg: 2, scope: !225, type: !37) +// CHECK:STDOUT: !233 = !DILocation(line: 19, column: 5, scope: !225) +// CHECK:STDOUT: !234 = !{!226, !227} +// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.4d6ceefeb7f772f4", scope: null, file: !34, line: 18, type: !200, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !264) +// CHECK:STDOUT: !256 = !DILocalVariable(arg: 1, scope: !255, type: !37) +// CHECK:STDOUT: !257 = !DILocalVariable(arg: 2, scope: !255, type: !36) +// CHECK:STDOUT: !263 = !DILocation(line: 19, column: 5, scope: !255) +// CHECK:STDOUT: !264 = !{!256, !257} +// CHECK:STDOUT: !265 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.c5e4ba542a56b71f", scope: null, file: !34, line: 18, type: !165, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !274) +// CHECK:STDOUT: !266 = !DILocalVariable(arg: 1, scope: !265, type: !37) +// CHECK:STDOUT: !267 = !DILocalVariable(arg: 2, scope: !265, type: !37) +// CHECK:STDOUT: !273 = !DILocation(line: 19, column: 5, scope: !265) +// CHECK:STDOUT: !274 = !{!266, !267} +// CHECK:STDOUT: !275 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.c3359c2c217ad593", scope: null, file: !34, line: 18, type: !165, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !284) +// CHECK:STDOUT: !276 = !DILocalVariable(arg: 1, scope: !275, type: !37) +// CHECK:STDOUT: !277 = !DILocalVariable(arg: 2, scope: !275, type: !37) +// CHECK:STDOUT: !283 = !DILocation(line: 19, column: 5, scope: !275) +// CHECK:STDOUT: !284 = !{!276, !277} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/local_function.carbon b/toolchain/lower/testdata/function/generic/local_function.carbon index 145e215d872e..1b201dfe4862 100644 --- a/toolchain/lower/testdata/function/generic/local_function.carbon +++ b/toolchain/lower/testdata/function/generic/local_function.carbon @@ -28,49 +28,49 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "local_function.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !37 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !39 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.4d6ceefeb7f772f4(i32 0), !dbg !40 -// CHECK:STDOUT: ret i32 %F.call, !dbg !43 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.4d6ceefeb7f772f4(i32 0), !dbg !42 +// CHECK:STDOUT: ret i32 %F.call, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4d6ceefeb7f772f4(i32 %y) #0 !dbg !44 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4d6ceefeb7f772f4(i32 %y) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call i32 @"_CG:enclosed.4d6ceefeb7f772f4"(i32 %y), !dbg !50 -// CHECK:STDOUT: ret i32 %G.call, !dbg !51 +// CHECK:STDOUT: %G.call = call i32 @"_CG:enclosed.4d6ceefeb7f772f4"(i32 %y), !dbg !52 +// CHECK:STDOUT: ret i32 %G.call, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CG:enclosed.4d6ceefeb7f772f4"(i32 %x) #0 !dbg !53 { +// CHECK:STDOUT: define linkonce_odr i32 @"_CG:enclosed.4d6ceefeb7f772f4"(i32 %x) #0 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !59 +// CHECK:STDOUT: ret i32 %x, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "local_function.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !{!34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !32, line: 22, type: !36, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !40 = !DILocation(line: 23, column: 10, scope: !37) -// CHECK:STDOUT: !41 = !{!34, !34} -// CHECK:STDOUT: !42 = !DISubroutineType(types: !41) -// CHECK:STDOUT: !43 = !DILocation(line: 23, column: 3, scope: !37) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 17, type: !42, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !52) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !34) -// CHECK:STDOUT: !50 = !DILocation(line: 19, column: 10, scope: !44) -// CHECK:STDOUT: !51 = !DILocation(line: 19, column: 3, scope: !44) -// CHECK:STDOUT: !52 = !{!45} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "G", linkageName: "_CG:enclosed.4d6ceefeb7f772f4", scope: null, file: !32, line: 18, type: !42, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !60) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !34) -// CHECK:STDOUT: !59 = !DILocation(line: 18, column: 21, scope: !53) -// CHECK:STDOUT: !60 = !{!54} +// CHECK:STDOUT: !34 = !DIFile(filename: "local_function.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !{!36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !34, line: 22, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !42 = !DILocation(line: 23, column: 10, scope: !39) +// CHECK:STDOUT: !43 = !{!36, !36} +// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) +// CHECK:STDOUT: !45 = !DILocation(line: 23, column: 3, scope: !39) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d6ceefeb7f772f4", scope: null, file: !34, line: 17, type: !44, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !54) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !36) +// CHECK:STDOUT: !52 = !DILocation(line: 19, column: 10, scope: !46) +// CHECK:STDOUT: !53 = !DILocation(line: 19, column: 3, scope: !46) +// CHECK:STDOUT: !54 = !{!47} +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "G", linkageName: "_CG:enclosed.4d6ceefeb7f772f4", scope: null, file: !34, line: 18, type: !44, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !62) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !36) +// CHECK:STDOUT: !61 = !DILocation(line: 18, column: 21, scope: !55) +// CHECK:STDOUT: !62 = !{!56} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/if_expr/basic.carbon b/toolchain/lower/testdata/if_expr/basic.carbon index e996df26a433..9f7f70e20274 100644 --- a/toolchain/lower/testdata/if_expr/basic.carbon +++ b/toolchain/lower/testdata/if_expr/basic.carbon @@ -22,59 +22,59 @@ fn Select(b: bool) -> i32 { // CHECK:STDOUT: source_filename = "basic.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CF.Main() #0 !dbg !40 { +// CHECK:STDOUT: define i32 @_CF.Main() #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 1, !dbg !43 +// CHECK:STDOUT: ret i32 1, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CG.Main() #0 !dbg !44 { +// CHECK:STDOUT: define i32 @_CG.Main() #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 2, !dbg !47 +// CHECK:STDOUT: ret i32 2, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CSelect.Main(i1 %b) #0 !dbg !48 { +// CHECK:STDOUT: define i32 @_CSelect.Main(i1 %b) #0 !dbg !50 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: br i1 %b, label %if.expr.then, label %if.expr.else, !dbg !54 +// CHECK:STDOUT: br i1 %b, label %if.expr.then, label %if.expr.else, !dbg !56 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.then: ; preds = %entry -// CHECK:STDOUT: %F.call = call i32 @_CF.Main(), !dbg !55 -// CHECK:STDOUT: br label %if.expr.result, !dbg !54 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main(), !dbg !57 +// CHECK:STDOUT: br label %if.expr.result, !dbg !56 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.else: ; preds = %entry -// CHECK:STDOUT: %G.call = call i32 @_CG.Main(), !dbg !56 -// CHECK:STDOUT: br label %if.expr.result, !dbg !54 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main(), !dbg !58 +// CHECK:STDOUT: br label %if.expr.result, !dbg !56 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.result: ; preds = %if.expr.else, %if.expr.then // CHECK:STDOUT: %0 = phi i32 [ %F.call, %if.expr.then ], [ %G.call, %if.expr.else ] -// CHECK:STDOUT: ret i32 %0, !dbg !57 +// CHECK:STDOUT: ret i32 %0, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "basic.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !{!34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !38 = !{!34, !37} -// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !32, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !43 = !DILocation(line: 13, column: 17, scope: !40) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !32, line: 14, type: !36, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !47 = !DILocation(line: 14, column: 17, scope: !44) -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "Select", linkageName: "_CSelect.Main", scope: null, file: !32, line: 16, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !58) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !37) -// CHECK:STDOUT: !54 = !DILocation(line: 17, column: 10, scope: !48) -// CHECK:STDOUT: !55 = !DILocation(line: 17, column: 20, scope: !48) -// CHECK:STDOUT: !56 = !DILocation(line: 17, column: 29, scope: !48) -// CHECK:STDOUT: !57 = !DILocation(line: 17, column: 3, scope: !48) -// CHECK:STDOUT: !58 = !{!49} +// CHECK:STDOUT: !34 = !DIFile(filename: "basic.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !{!36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !40 = !{!36, !39} +// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !34, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !45 = !DILocation(line: 13, column: 17, scope: !42) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !34, line: 14, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !49 = !DILocation(line: 14, column: 17, scope: !46) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Select", linkageName: "_CSelect.Main", scope: null, file: !34, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !60) +// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !39) +// CHECK:STDOUT: !56 = !DILocation(line: 17, column: 10, scope: !50) +// CHECK:STDOUT: !57 = !DILocation(line: 17, column: 20, scope: !50) +// CHECK:STDOUT: !58 = !DILocation(line: 17, column: 29, scope: !50) +// CHECK:STDOUT: !59 = !DILocation(line: 17, column: 3, scope: !50) +// CHECK:STDOUT: !60 = !{!51} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/if_expr/empty_block.carbon b/toolchain/lower/testdata/if_expr/empty_block.carbon index f9040d85aa3f..7e7e7072e8a7 100644 --- a/toolchain/lower/testdata/if_expr/empty_block.carbon +++ b/toolchain/lower/testdata/if_expr/empty_block.carbon @@ -19,61 +19,61 @@ fn Select(b: bool, c: bool, d: bool) -> i32 { // CHECK:STDOUT: source_filename = "empty_block.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CSelect.Main(i1 %b, i1 %c, i1 %d) #0 !dbg !38 { +// CHECK:STDOUT: define i32 @_CSelect.Main(i1 %b, i1 %c, i1 %d) #0 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: br i1 %b, label %if.expr.then.loc14_10, label %if.expr.else.loc14_10, !dbg !48 +// CHECK:STDOUT: br i1 %b, label %if.expr.then.loc14_10, label %if.expr.else.loc14_10, !dbg !50 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.then.loc14_10: ; preds = %entry -// CHECK:STDOUT: br i1 %c, label %if.expr.then.loc14_20, label %if.expr.else.loc14_20, !dbg !50 +// CHECK:STDOUT: br i1 %c, label %if.expr.then.loc14_20, label %if.expr.else.loc14_20, !dbg !52 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.then.loc14_20: ; preds = %if.expr.then.loc14_10 -// CHECK:STDOUT: br label %if.expr.result.loc14_20, !dbg !50 +// CHECK:STDOUT: br label %if.expr.result.loc14_20, !dbg !52 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.else.loc14_20: ; preds = %if.expr.then.loc14_10 -// CHECK:STDOUT: br label %if.expr.result.loc14_20, !dbg !50 +// CHECK:STDOUT: br label %if.expr.result.loc14_20, !dbg !52 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.result.loc14_20: ; preds = %if.expr.else.loc14_20, %if.expr.then.loc14_20 // CHECK:STDOUT: %0 = phi i32 [ 1, %if.expr.then.loc14_20 ], [ 2, %if.expr.else.loc14_20 ] -// CHECK:STDOUT: br label %if.expr.result.loc14_10, !dbg !48 +// CHECK:STDOUT: br label %if.expr.result.loc14_10, !dbg !50 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.else.loc14_10: ; preds = %entry -// CHECK:STDOUT: br i1 %d, label %if.expr.then.loc14_51, label %if.expr.else.loc14_51, !dbg !52 +// CHECK:STDOUT: br i1 %d, label %if.expr.then.loc14_51, label %if.expr.else.loc14_51, !dbg !54 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.then.loc14_51: ; preds = %if.expr.else.loc14_10 -// CHECK:STDOUT: br label %if.expr.result.loc14_51, !dbg !52 +// CHECK:STDOUT: br label %if.expr.result.loc14_51, !dbg !54 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.else.loc14_51: ; preds = %if.expr.else.loc14_10 -// CHECK:STDOUT: br label %if.expr.result.loc14_51, !dbg !52 +// CHECK:STDOUT: br label %if.expr.result.loc14_51, !dbg !54 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.result.loc14_51: ; preds = %if.expr.else.loc14_51, %if.expr.then.loc14_51 // CHECK:STDOUT: %1 = phi i32 [ 3, %if.expr.then.loc14_51 ], [ 4, %if.expr.else.loc14_51 ] -// CHECK:STDOUT: br label %if.expr.result.loc14_10, !dbg !48 +// CHECK:STDOUT: br label %if.expr.result.loc14_10, !dbg !50 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.result.loc14_10: ; preds = %if.expr.result.loc14_51, %if.expr.result.loc14_20 // CHECK:STDOUT: %2 = phi i32 [ %0, %if.expr.result.loc14_20 ], [ %1, %if.expr.result.loc14_51 ] -// CHECK:STDOUT: ret i32 %2, !dbg !53 +// CHECK:STDOUT: ret i32 %2, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "empty_block.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !36 = !{!34, !35, !35, !35} -// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Select", linkageName: "_CSelect.Main", scope: null, file: !32, line: 13, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !54) -// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !35) -// CHECK:STDOUT: !40 = !DILocalVariable(arg: 2, scope: !38, type: !35) -// CHECK:STDOUT: !41 = !DILocalVariable(arg: 3, scope: !38, type: !35) -// CHECK:STDOUT: !48 = !DILocation(line: 14, column: 10, scope: !38) -// CHECK:STDOUT: !50 = !DILocation(line: 14, column: 20, scope: !38) -// CHECK:STDOUT: !52 = !DILocation(line: 14, column: 51, scope: !38) -// CHECK:STDOUT: !53 = !DILocation(line: 14, column: 3, scope: !38) -// CHECK:STDOUT: !54 = !{!39, !40, !41} +// CHECK:STDOUT: !34 = !DIFile(filename: "empty_block.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !38 = !{!36, !37, !37, !37} +// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Select", linkageName: "_CSelect.Main", scope: null, file: !34, line: 13, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !56) +// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !37) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 2, scope: !40, type: !37) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 3, scope: !40, type: !37) +// CHECK:STDOUT: !50 = !DILocation(line: 14, column: 10, scope: !40) +// CHECK:STDOUT: !52 = !DILocation(line: 14, column: 20, scope: !40) +// CHECK:STDOUT: !54 = !DILocation(line: 14, column: 51, scope: !40) +// CHECK:STDOUT: !55 = !DILocation(line: 14, column: 3, scope: !40) +// CHECK:STDOUT: !56 = !{!41, !42, !43} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/index/array_element_access.carbon b/toolchain/lower/testdata/index/array_element_access.carbon index c65d771eb4bc..06c2127a817a 100644 --- a/toolchain/lower/testdata/index/array_element_access.carbon +++ b/toolchain/lower/testdata/index/array_element_access.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -28,103 +28,103 @@ fn Run() { // CHECK:STDOUT: @array.loc14_40 = internal constant [2 x i32] [i32 1, i32 2] // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CA.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !30 { +// CHECK:STDOUT: define void @_CA.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !32 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !33 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !33 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.102.loc12_37, i64 8, i1 false), !dbg !34 -// CHECK:STDOUT: ret void, !dbg !34 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !35 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !35 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.102.loc12_37, i64 8, i1 false), !dbg !36 +// CHECK:STDOUT: ret void, !dbg !36 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CB.Main(ptr sret([2 x i32]) %return) #0 !dbg !35 { +// CHECK:STDOUT: define void @_CB.Main(ptr sret([2 x i32]) %return) #0 !dbg !37 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14_39.3.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, i64 0, !dbg !38 -// CHECK:STDOUT: %.loc14_39.6.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, i64 1, !dbg !38 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @array.loc14_40, i64 8, i1 false), !dbg !39 -// CHECK:STDOUT: ret void, !dbg !39 +// CHECK:STDOUT: %.loc14_39.3.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, i64 0, !dbg !40 +// CHECK:STDOUT: %.loc14_39.6.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, i64 1, !dbg !40 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @array.loc14_40, i64 8, i1 false), !dbg !41 +// CHECK:STDOUT: ret void, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !40 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca [2 x i32], align 4, !dbg !41 -// CHECK:STDOUT: %.loc17_28.1.temp = alloca { i32, i32 }, align 4, !dbg !42 -// CHECK:STDOUT: %b.var = alloca i32, align 4, !dbg !44 -// CHECK:STDOUT: %_.var.loc19 = alloca i32, align 4, !dbg !46 -// CHECK:STDOUT: %_.var.loc20 = alloca i32, align 4, !dbg !50 -// CHECK:STDOUT: %.loc20_18.1.temp = alloca [2 x i32], align 4, !dbg !51 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !41 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_28.1.temp), !dbg !42 -// CHECK:STDOUT: call void @_CA.Main(ptr %.loc17_28.1.temp), !dbg !42 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc17_28.1.temp, i32 0, i32 0, !dbg !42 -// CHECK:STDOUT: %.loc17_28.3 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !42 -// CHECK:STDOUT: %.loc17_28.4.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i64 0, !dbg !42 -// CHECK:STDOUT: store i32 %.loc17_28.3, ptr %.loc17_28.4.array.index, align 4, !dbg !42 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc17_28.1.temp, i32 0, i32 1, !dbg !42 -// CHECK:STDOUT: %.loc17_28.6 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !42 -// CHECK:STDOUT: %.loc17_28.7.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i64 1, !dbg !42 -// CHECK:STDOUT: store i32 %.loc17_28.6, ptr %.loc17_28.7.array.index, align 4, !dbg !42 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !44 -// CHECK:STDOUT: store i32 1, ptr %b.var, align 4, !dbg !44 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc19), !dbg !46 -// CHECK:STDOUT: %.loc19_18 = load i32, ptr %b.var, align 4, !dbg !48 -// CHECK:STDOUT: %.loc19_19.1.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i32 %.loc19_18, !dbg !47 -// CHECK:STDOUT: %.loc19_19.2 = load i32, ptr %.loc19_19.1.array.index, align 4, !dbg !47 -// CHECK:STDOUT: store i32 %.loc19_19.2, ptr %_.var.loc19, align 4, !dbg !46 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc20), !dbg !50 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_18.1.temp), !dbg !51 -// CHECK:STDOUT: call void @_CB.Main(ptr %.loc20_18.1.temp), !dbg !51 -// CHECK:STDOUT: %.loc20_21.1.array.index = getelementptr inbounds [2 x i32], ptr %.loc20_18.1.temp, i32 0, i32 1, !dbg !51 -// CHECK:STDOUT: %.loc20_21.2 = load i32, ptr %.loc20_21.1.array.index, align 4, !dbg !51 -// CHECK:STDOUT: store i32 %.loc20_21.2, ptr %_.var.loc20, align 4, !dbg !50 -// CHECK:STDOUT: call void @"_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core"(ptr %.loc20_18.1.temp), !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %_.var.loc20), !dbg !50 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %_.var.loc19), !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %b.var), !dbg !44 -// CHECK:STDOUT: call void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %.loc17_28.1.temp), !dbg !42 -// CHECK:STDOUT: call void @"_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core"(ptr %a.var), !dbg !41 -// CHECK:STDOUT: ret i32 0, !dbg !53 +// CHECK:STDOUT: %a.var = alloca [2 x i32], align 4, !dbg !43 +// CHECK:STDOUT: %.loc17_28.1.temp = alloca { i32, i32 }, align 4, !dbg !44 +// CHECK:STDOUT: %b.var = alloca i32, align 4, !dbg !46 +// CHECK:STDOUT: %_.var.loc19 = alloca i32, align 4, !dbg !48 +// CHECK:STDOUT: %_.var.loc20 = alloca i32, align 4, !dbg !52 +// CHECK:STDOUT: %.loc20_18.1.temp = alloca [2 x i32], align 4, !dbg !53 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !43 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_28.1.temp), !dbg !44 +// CHECK:STDOUT: call void @_CA.Main(ptr %.loc17_28.1.temp), !dbg !44 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc17_28.1.temp, i32 0, i32 0, !dbg !44 +// CHECK:STDOUT: %.loc17_28.3 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !44 +// CHECK:STDOUT: %.loc17_28.4.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i64 0, !dbg !44 +// CHECK:STDOUT: store i32 %.loc17_28.3, ptr %.loc17_28.4.array.index, align 4, !dbg !44 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc17_28.1.temp, i32 0, i32 1, !dbg !44 +// CHECK:STDOUT: %.loc17_28.6 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !44 +// CHECK:STDOUT: %.loc17_28.7.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i64 1, !dbg !44 +// CHECK:STDOUT: store i32 %.loc17_28.6, ptr %.loc17_28.7.array.index, align 4, !dbg !44 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !46 +// CHECK:STDOUT: store i32 1, ptr %b.var, align 4, !dbg !46 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc19), !dbg !48 +// CHECK:STDOUT: %.loc19_18 = load i32, ptr %b.var, align 4, !dbg !50 +// CHECK:STDOUT: %.loc19_19.1.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i32 %.loc19_18, !dbg !49 +// CHECK:STDOUT: %.loc19_19.2 = load i32, ptr %.loc19_19.1.array.index, align 4, !dbg !49 +// CHECK:STDOUT: store i32 %.loc19_19.2, ptr %_.var.loc19, align 4, !dbg !48 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc20), !dbg !52 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_18.1.temp), !dbg !53 +// CHECK:STDOUT: call void @_CB.Main(ptr %.loc20_18.1.temp), !dbg !53 +// CHECK:STDOUT: %.loc20_21.1.array.index = getelementptr inbounds [2 x i32], ptr %.loc20_18.1.temp, i32 0, i32 1, !dbg !53 +// CHECK:STDOUT: %.loc20_21.2 = load i32, ptr %.loc20_21.1.array.index, align 4, !dbg !53 +// CHECK:STDOUT: store i32 %.loc20_21.2, ptr %_.var.loc20, align 4, !dbg !52 +// CHECK:STDOUT: call void @"_CSelfDestruct.e690471ed5f74dcb:core.Destroy.Core"(ptr %.loc20_18.1.temp), !dbg !53 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %_.var.loc20), !dbg !52 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %_.var.loc19), !dbg !48 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %b.var), !dbg !46 +// CHECK:STDOUT: call void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %.loc17_28.1.temp), !dbg !44 +// CHECK:STDOUT: call void @"_CSelfDestruct.e690471ed5f74dcb:core.Destroy.Core"(ptr %a.var), !dbg !43 +// CHECK:STDOUT: ret i32 0, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !54 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core"(ptr %self) #0 !dbg !58 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e690471ed5f74dcb:core.Destroy.Core"(ptr %self) #0 !dbg !60 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc20_18.1.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 1, !dbg !60 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc20_18.1.array.index), !dbg !60 -// CHECK:STDOUT: %.loc20_18.2.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 0, !dbg !60 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc20_18.2.array.index), !dbg !60 -// CHECK:STDOUT: ret void, !dbg !60 +// CHECK:STDOUT: %.loc20_18.1.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 1, !dbg !62 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc20_18.1.array.index), !dbg !62 +// CHECK:STDOUT: %.loc20_18.2.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 0, !dbg !62 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc20_18.2.array.index), !dbg !62 +// CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core"(ptr %self) #0 !dbg !62 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e690471ed5f74dcb:core.Destroy.Core"(ptr %self) #0 !dbg !64 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core"(ptr %self), !dbg !64 -// CHECK:STDOUT: ret void, !dbg !64 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e690471ed5f74dcb:core.Destroy.Core"(ptr %self), !dbg !66 +// CHECK:STDOUT: ret void, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !66 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !68 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !68 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !68 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !68 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !68 -// CHECK:STDOUT: ret void, !dbg !68 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !70 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !70 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !70 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !70 +// CHECK:STDOUT: ret void, !dbg !70 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !70 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !72 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !72 -// CHECK:STDOUT: ret void, !dbg !72 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !74 +// CHECK:STDOUT: ret void, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -135,64 +135,64 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core", { 0, 1, 2, 3, 6, 5, 4 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core", { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.e690471ed5f74dcb:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 5, 4, 3, 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!19} +// CHECK:STDOUT: !llvm.dbg.cu = !{!21} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !18 = !DIFile(filename: "array_element_access.carbon", directory: "") -// CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !22 = !{!21} -// CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !24 = !{!20} +// CHECK:STDOUT: !20 = !DIFile(filename: "array_element_access.carbon", directory: "") +// CHECK:STDOUT: !21 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !20, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !22 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{!23} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} +// CHECK:STDOUT: !26 = !{!22} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !21} +// CHECK:STDOUT: !28 = !{null, !22} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main", scope: null, file: !18, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !33 = !DILocation(line: 12, column: 31, scope: !30) -// CHECK:STDOUT: !34 = !DILocation(line: 12, column: 24, scope: !30) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main", scope: null, file: !18, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !38 = !DILocation(line: 14, column: 34, scope: !35) -// CHECK:STDOUT: !39 = !DILocation(line: 14, column: 27, scope: !35) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !41 = !DILocation(line: 17, column: 3, scope: !40) -// CHECK:STDOUT: !42 = !DILocation(line: 17, column: 26, scope: !40) -// CHECK:STDOUT: !44 = !DILocation(line: 18, column: 3, scope: !40) -// CHECK:STDOUT: !46 = !DILocation(line: 19, column: 3, scope: !40) -// CHECK:STDOUT: !47 = !DILocation(line: 19, column: 16, scope: !40) -// CHECK:STDOUT: !48 = !DILocation(line: 19, column: 18, scope: !40) -// CHECK:STDOUT: !50 = !DILocation(line: 20, column: 3, scope: !40) -// CHECK:STDOUT: !51 = !DILocation(line: 20, column: 16, scope: !40) -// CHECK:STDOUT: !53 = !DILocation(line: 16, column: 1, scope: !40) -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !20) -// CHECK:STDOUT: !56 = !DILocation(line: 20, column: 16, scope: !54) -// CHECK:STDOUT: !57 = !{!55} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core", scope: null, file: !18, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !61) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !21) -// CHECK:STDOUT: !60 = !DILocation(line: 20, column: 16, scope: !58) -// CHECK:STDOUT: !61 = !{!59} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core", scope: null, file: !18, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !65) -// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !21) -// CHECK:STDOUT: !64 = !DILocation(line: 20, column: 16, scope: !62) -// CHECK:STDOUT: !65 = !{!63} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !69) -// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !21) -// CHECK:STDOUT: !68 = !DILocation(line: 17, column: 26, scope: !66) -// CHECK:STDOUT: !69 = !{!67} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !73) -// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !21) -// CHECK:STDOUT: !72 = !DILocation(line: 17, column: 26, scope: !70) -// CHECK:STDOUT: !73 = !{!71} +// CHECK:STDOUT: !30 = !{null, !23} +// CHECK:STDOUT: !31 = !DISubroutineType(types: !30) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main", scope: null, file: !20, line: 12, type: !25, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !35 = !DILocation(line: 12, column: 31, scope: !32) +// CHECK:STDOUT: !36 = !DILocation(line: 12, column: 24, scope: !32) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main", scope: null, file: !20, line: 14, type: !25, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !40 = !DILocation(line: 14, column: 34, scope: !37) +// CHECK:STDOUT: !41 = !DILocation(line: 14, column: 27, scope: !37) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !20, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !43 = !DILocation(line: 17, column: 3, scope: !42) +// CHECK:STDOUT: !44 = !DILocation(line: 17, column: 26, scope: !42) +// CHECK:STDOUT: !46 = !DILocation(line: 18, column: 3, scope: !42) +// CHECK:STDOUT: !48 = !DILocation(line: 19, column: 3, scope: !42) +// CHECK:STDOUT: !49 = !DILocation(line: 19, column: 16, scope: !42) +// CHECK:STDOUT: !50 = !DILocation(line: 19, column: 18, scope: !42) +// CHECK:STDOUT: !52 = !DILocation(line: 20, column: 3, scope: !42) +// CHECK:STDOUT: !53 = !DILocation(line: 20, column: 16, scope: !42) +// CHECK:STDOUT: !55 = !DILocation(line: 16, column: 1, scope: !42) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !20, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !59) +// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !22) +// CHECK:STDOUT: !58 = !DILocation(line: 20, column: 16, scope: !56) +// CHECK:STDOUT: !59 = !{!57} +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e690471ed5f74dcb:core.Destroy.Core", scope: null, file: !20, line: 20, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !63) +// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !23) +// CHECK:STDOUT: !62 = !DILocation(line: 20, column: 16, scope: !60) +// CHECK:STDOUT: !63 = !{!61} +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e690471ed5f74dcb:core.Destroy.Core", scope: null, file: !20, line: 20, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !67) +// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !23) +// CHECK:STDOUT: !66 = !DILocation(line: 20, column: 16, scope: !64) +// CHECK:STDOUT: !67 = !{!65} +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !20, line: 17, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !71) +// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !23) +// CHECK:STDOUT: !70 = !DILocation(line: 17, column: 26, scope: !68) +// CHECK:STDOUT: !71 = !{!69} +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !20, line: 17, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !75) +// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !23) +// CHECK:STDOUT: !74 = !DILocation(line: 17, column: 26, scope: !72) +// CHECK:STDOUT: !75 = !{!73} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/array.carbon b/toolchain/lower/testdata/interop/cpp/array.carbon index 36303151cae2..87f9b40f2ca7 100644 --- a/toolchain/lower/testdata/interop/cpp/array.carbon +++ b/toolchain/lower/testdata/interop/cpp/array.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/array.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -54,8 +54,8 @@ int H() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %retval = alloca i32, align 4 // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !46 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !46, !nonnull !47, !align !48 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !48 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !48, !nonnull !49, !align !50 // CHECK:STDOUT: call void @_CF__carbon_thunk.Main(ptr noundef nonnull align 4 dereferenceable(20) %1, ptr noundef nonnull align 4 dereferenceable(4) %retval) // CHECK:STDOUT: %2 = load i32, ptr %retval, align 4 // CHECK:STDOUT: ret i32 %2 @@ -79,19 +79,19 @@ int H() { // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CF.Main(ptr %a) #3 !dbg !30 { +// CHECK:STDOUT: define i32 @_CF.Main(ptr %a) #3 !dbg !32 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc5_43.2.array.index = getelementptr inbounds [5 x i32], ptr %a, i32 0, i32 2, !dbg !35 -// CHECK:STDOUT: %.loc5_43.3 = load i32, ptr %.loc5_43.2.array.index, align 4, !dbg !35 -// CHECK:STDOUT: ret i32 %.loc5_43.3, !dbg !36 +// CHECK:STDOUT: %.loc5_43.2.array.index = getelementptr inbounds [5 x i32], ptr %a, i32 0, i32 2, !dbg !37 +// CHECK:STDOUT: %.loc5_43.3 = load i32, ptr %.loc5_43.2.array.index, align 4, !dbg !37 +// CHECK:STDOUT: ret i32 %.loc5_43.3, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF__carbon_thunk.Main(ptr %_, ptr %_1) #3 !dbg !38 { +// CHECK:STDOUT: define void @_CF__carbon_thunk.Main(ptr %_, ptr %_1) #3 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr %_), !dbg !41 -// CHECK:STDOUT: store i32 %F.call, ptr %_1, align 4, !dbg !41 -// CHECK:STDOUT: ret void, !dbg !41 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr %_), !dbg !43 +// CHECK:STDOUT: store i32 %F.call, ptr %_1, align 4, !dbg !43 +// CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -99,9 +99,9 @@ int H() { // CHECK:STDOUT: attributes #2 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #3 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!23} -// CHECK:STDOUT: !llvm.module.flags = !{!49, !50, !51, !6, !7} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!53} +// CHECK:STDOUT: !llvm.dbg.cu = !{!25} +// CHECK:STDOUT: !llvm.module.flags = !{!51, !52, !53, !6, !7} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!55} // CHECK:STDOUT: // CHECK:STDOUT: !0 = !{!"Simple C++ TBAA"} // CHECK:STDOUT: !1 = !{!"omnipotent char", !0, i64 0} @@ -109,33 +109,33 @@ int H() { // CHECK:STDOUT: !3 = !{i64 0, i64 20, !2} // CHECK:STDOUT: !6 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !7 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !22 = !DIFile(filename: "array_value_param.carbon", directory: "") -// CHECK:STDOUT: !23 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !22, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !24 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !26 = !{!24, !25} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !25, !24} +// CHECK:STDOUT: !24 = !DIFile(filename: "array_value_param.carbon", directory: "") +// CHECK:STDOUT: !25 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !24, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !26 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !27 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !28 = !{!26, !27} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !22, line: 5, type: !27, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !37) -// CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !30, type: !25) -// CHECK:STDOUT: !35 = !DILocation(line: 5, column: 40, scope: !30) -// CHECK:STDOUT: !36 = !DILocation(line: 5, column: 33, scope: !30) -// CHECK:STDOUT: !37 = !{!31} -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Main", scope: null, file: !22, line: 5, type: !29, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !42) -// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !25) -// CHECK:STDOUT: !40 = !DILocalVariable(arg: 2, scope: !38, type: !24) -// CHECK:STDOUT: !41 = !DILocation(line: 5, column: 1, scope: !38) -// CHECK:STDOUT: !42 = !{!39, !40} -// CHECK:STDOUT: !43 = !{!"int", !1, i64 0} -// CHECK:STDOUT: !44 = !{!"any pointer", !1, i64 0} -// CHECK:STDOUT: !45 = !{!"p1 int", !44, i64 0} -// CHECK:STDOUT: !46 = !{!45, !45, i64 0} -// CHECK:STDOUT: !47 = !{} -// CHECK:STDOUT: !48 = !{i64 4} -// CHECK:STDOUT: !49 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !50 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !51 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !52 = !{!"__libc_errno", !43, i64 0} -// CHECK:STDOUT: !53 = !{!52, !43, i64 0} +// CHECK:STDOUT: !30 = !{null, !27, !26} +// CHECK:STDOUT: !31 = !DISubroutineType(types: !30) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !24, line: 5, type: !29, spFlags: DISPFlagDefinition, unit: !25, retainedNodes: !39) +// CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !27) +// CHECK:STDOUT: !37 = !DILocation(line: 5, column: 40, scope: !32) +// CHECK:STDOUT: !38 = !DILocation(line: 5, column: 33, scope: !32) +// CHECK:STDOUT: !39 = !{!33} +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Main", scope: null, file: !24, line: 5, type: !31, spFlags: DISPFlagDefinition, unit: !25, retainedNodes: !44) +// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !27) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 2, scope: !40, type: !26) +// CHECK:STDOUT: !43 = !DILocation(line: 5, column: 1, scope: !40) +// CHECK:STDOUT: !44 = !{!41, !42} +// CHECK:STDOUT: !45 = !{!"int", !1, i64 0} +// CHECK:STDOUT: !46 = !{!"any pointer", !1, i64 0} +// CHECK:STDOUT: !47 = !{!"p1 int", !46, i64 0} +// CHECK:STDOUT: !48 = !{!47, !47, i64 0} +// CHECK:STDOUT: !49 = !{} +// CHECK:STDOUT: !50 = !{i64 4} +// CHECK:STDOUT: !51 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !52 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !53 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !54 = !{!"__libc_errno", !45, i64 0} +// CHECK:STDOUT: !55 = !{!54, !45, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/import/alignment.carbon b/toolchain/lower/testdata/interop/cpp/class/import/alignment.carbon index 7876af3efe74..d3553caa9721 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/alignment.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/alignment.carbon @@ -63,94 +63,57 @@ fn Packed(n: i32) { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CNaturallyAligned.Main(i32 %n) #0 !dbg !42 { +// CHECK:STDOUT: define void @_CNaturallyAligned.Main(i32 %n) #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca [4 x i8], align 4, !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !45 -// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.d4cda66b3640b619"(ptr %a.var), !dbg !45 -// CHECK:STDOUT: %.loc25.n = getelementptr inbounds nuw [4 x i8], ptr %a.var, i32 0, i32 0, !dbg !47 -// CHECK:STDOUT: store i32 %n, ptr %.loc25.n, align 4, !dbg !47 -// CHECK:STDOUT: call void @_Z4TakeI16NaturallyAlignedEvRT_(ptr %a.var), !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.89af5f7a0692dfe8:core.Destroy.Core"(ptr %a.var), !dbg !45 -// CHECK:STDOUT: ret void, !dbg !52 +// CHECK:STDOUT: %a.var = alloca [4 x i8], align 4, !dbg !47 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !47 +// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.d4cda66b3640b619"(ptr %a.var), !dbg !47 +// CHECK:STDOUT: %.loc25.n = getelementptr inbounds nuw [4 x i8], ptr %a.var, i32 0, i32 0, !dbg !49 +// CHECK:STDOUT: store i32 %n, ptr %.loc25.n, align 4, !dbg !49 +// CHECK:STDOUT: call void @_Z4TakeI16NaturallyAlignedEvRT_(ptr %a.var), !dbg !53 +// CHECK:STDOUT: call void @"_CSelfDestruct.89af5f7a0692dfe8:core.Destroy.Core"(ptr %a.var), !dbg !47 +// CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN16NaturallyAlignedC1Ev.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !118 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !118 -// CHECK:STDOUT: ret void -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.c846b89dd79c7366.Core:NaturallyAligned.Cpp"(ptr sret([4 x i8]) %return) #2 !dbg !54 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN16NaturallyAlignedC1Ev.carbon_thunk.(ptr %return), !dbg !56 -// CHECK:STDOUT: ret void, !dbg !56 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: declare void @_Z4TakeI16NaturallyAlignedEvRT_(ptr noundef nonnull align 4 dereferenceable(4)) #3 -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.89af5f7a0692dfe8:core.Destroy.Core"(ptr %self) #0 !dbg !57 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !59 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CExtraAlignment.Main(i32 %n) #0 !dbg !61 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca [16 x i8], align 16, !dbg !64 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !64 -// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.34933c1c343bd645"(ptr %a.var), !dbg !64 -// CHECK:STDOUT: %.loc33.n = getelementptr inbounds nuw [16 x i8], ptr %a.var, i32 0, i32 0, !dbg !66 -// CHECK:STDOUT: store i32 %n, ptr %.loc33.n, align 4, !dbg !66 -// CHECK:STDOUT: call void @_Z4TakeI14ExtraAlignmentEvRT_(ptr %a.var), !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.77c39a3d53f40ae2:core.Destroy.Core"(ptr %a.var), !dbg !64 -// CHECK:STDOUT: ret void, !dbg !71 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable -// CHECK:STDOUT: define internal void @_ZN14ExtraAlignmentC1Ev.carbon_thunk.(ptr noundef %return) #1 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %return.addr = alloca ptr, align 8 // CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !120 // CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !120 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.52e7708693d29223.Core:ExtraAlignment.Cpp"(ptr sret([16 x i8]) %return) #2 !dbg !73 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.c846b89dd79c7366.Core:NaturallyAligned.Cpp"(ptr sret([4 x i8]) %return) #2 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN14ExtraAlignmentC1Ev.carbon_thunk.(ptr %return), !dbg !75 -// CHECK:STDOUT: ret void, !dbg !75 +// CHECK:STDOUT: call void @_ZN16NaturallyAlignedC1Ev.carbon_thunk.(ptr %return), !dbg !58 +// CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: declare void @_Z4TakeI14ExtraAlignmentEvRT_(ptr noundef nonnull align 16 dereferenceable(16)) #3 +// CHECK:STDOUT: declare void @_Z4TakeI16NaturallyAlignedEvRT_(ptr noundef nonnull align 4 dereferenceable(4)) #3 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.77c39a3d53f40ae2:core.Destroy.Core"(ptr %self) #0 !dbg !76 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.89af5f7a0692dfe8:core.Destroy.Core"(ptr %self) #0 !dbg !59 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !78 +// CHECK:STDOUT: ret void, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPacked.Main(i32 %n) #0 !dbg !80 { +// CHECK:STDOUT: define void @_CExtraAlignment.Main(i32 %n) #0 !dbg !63 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca [4 x i8], align 1, !dbg !83 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !83 -// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.3e10857902c69c1a"(ptr %a.var), !dbg !83 -// CHECK:STDOUT: %.loc42.n = getelementptr inbounds nuw [4 x i8], ptr %a.var, i32 0, i32 0, !dbg !85 -// CHECK:STDOUT: store i32 %n, ptr %.loc42.n, align 4, !dbg !85 -// CHECK:STDOUT: call void @_Z4TakeI6PackedEvRT_(ptr %a.var), !dbg !89 -// CHECK:STDOUT: call void @"_CSelfDestruct.00b787a687567d9a:core.Destroy.Core"(ptr %a.var), !dbg !83 -// CHECK:STDOUT: ret void, !dbg !90 +// CHECK:STDOUT: %a.var = alloca [16 x i8], align 16, !dbg !66 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !66 +// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.34933c1c343bd645"(ptr %a.var), !dbg !66 +// CHECK:STDOUT: %.loc33.n = getelementptr inbounds nuw [16 x i8], ptr %a.var, i32 0, i32 0, !dbg !68 +// CHECK:STDOUT: store i32 %n, ptr %.loc33.n, align 4, !dbg !68 +// CHECK:STDOUT: call void @_Z4TakeI14ExtraAlignmentEvRT_(ptr %a.var), !dbg !72 +// CHECK:STDOUT: call void @"_CSelfDestruct.77c39a3d53f40ae2:core.Destroy.Core"(ptr %a.var), !dbg !66 +// CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable -// CHECK:STDOUT: define internal void @_ZN6PackedC1Ev.carbon_thunk.(ptr noundef %return) #1 { +// CHECK:STDOUT: define internal void @_ZN14ExtraAlignmentC1Ev.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 // CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !122 @@ -159,39 +122,76 @@ fn Packed(n: i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.ca2b917a39954a06.Core:Packed.Cpp"(ptr sret([4 x i8]) %return) #2 !dbg !92 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.52e7708693d29223.Core:ExtraAlignment.Cpp"(ptr sret([16 x i8]) %return) #2 !dbg !75 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN6PackedC1Ev.carbon_thunk.(ptr %return), !dbg !94 -// CHECK:STDOUT: ret void, !dbg !94 +// CHECK:STDOUT: call void @_ZN14ExtraAlignmentC1Ev.carbon_thunk.(ptr %return), !dbg !77 +// CHECK:STDOUT: ret void, !dbg !77 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: declare void @_Z4TakeI14ExtraAlignmentEvRT_(ptr noundef nonnull align 16 dereferenceable(16)) #3 +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.77c39a3d53f40ae2:core.Destroy.Core"(ptr %self) #0 !dbg !78 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !80 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define void @_CPacked.Main(i32 %n) #0 !dbg !82 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %a.var = alloca [4 x i8], align 1, !dbg !85 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !85 +// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.3e10857902c69c1a"(ptr %a.var), !dbg !85 +// CHECK:STDOUT: %.loc42.n = getelementptr inbounds nuw [4 x i8], ptr %a.var, i32 0, i32 0, !dbg !87 +// CHECK:STDOUT: store i32 %n, ptr %.loc42.n, align 4, !dbg !87 +// CHECK:STDOUT: call void @_Z4TakeI6PackedEvRT_(ptr %a.var), !dbg !91 +// CHECK:STDOUT: call void @"_CSelfDestruct.00b787a687567d9a:core.Destroy.Core"(ptr %a.var), !dbg !85 +// CHECK:STDOUT: ret void, !dbg !92 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable +// CHECK:STDOUT: define internal void @_ZN6PackedC1Ev.carbon_thunk.(ptr noundef %return) #1 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %return.addr = alloca ptr, align 8 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !124 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !124 +// CHECK:STDOUT: ret void +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.ca2b917a39954a06.Core:Packed.Cpp"(ptr sret([4 x i8]) %return) #2 !dbg !94 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_ZN6PackedC1Ev.carbon_thunk.(ptr %return), !dbg !96 +// CHECK:STDOUT: ret void, !dbg !96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z4TakeI6PackedEvRT_(ptr noundef nonnull align 1 dereferenceable(4)) #3 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.00b787a687567d9a:core.Destroy.Core"(ptr %self) #0 !dbg !95 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.00b787a687567d9a:core.Destroy.Core"(ptr %self) #0 !dbg !97 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !97 +// CHECK:STDOUT: ret void, !dbg !99 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #4 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.d4cda66b3640b619"(ptr sret([4 x i8]) %return) #0 !dbg !99 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.c846b89dd79c7366.Core:NaturallyAligned.Cpp"(ptr %return), !dbg !102 -// CHECK:STDOUT: ret void, !dbg !103 +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.d4cda66b3640b619"(ptr sret([4 x i8]) %return) #0 !dbg !101 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.c846b89dd79c7366.Core:NaturallyAligned.Cpp"(ptr %return), !dbg !104 +// CHECK:STDOUT: ret void, !dbg !105 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.34933c1c343bd645"(ptr sret([16 x i8]) %return) #0 !dbg !104 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.52e7708693d29223.Core:ExtraAlignment.Cpp"(ptr %return), !dbg !107 -// CHECK:STDOUT: ret void, !dbg !108 +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.34933c1c343bd645"(ptr sret([16 x i8]) %return) #0 !dbg !106 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.52e7708693d29223.Core:ExtraAlignment.Cpp"(ptr %return), !dbg !109 +// CHECK:STDOUT: ret void, !dbg !110 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.3e10857902c69c1a"(ptr sret([4 x i8]) %return) #0 !dbg !109 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.ca2b917a39954a06.Core:Packed.Cpp"(ptr %return), !dbg !112 -// CHECK:STDOUT: ret void, !dbg !113 +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.3e10857902c69c1a"(ptr sret([4 x i8]) %return) #0 !dbg !111 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.ca2b917a39954a06.Core:Packed.Cpp"(ptr %return), !dbg !114 +// CHECK:STDOUT: ret void, !dbg !115 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -203,84 +203,84 @@ fn Packed(n: i32) { // CHECK:STDOUT: attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} -// CHECK:STDOUT: !llvm.module.flags = !{!123, !124, !125, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!128} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} +// CHECK:STDOUT: !llvm.module.flags = !{!125, !126, !127, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!130} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") -// CHECK:STDOUT: !32 = !DIFile(filename: "alignment.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !{null, !34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !38 = !{null, !37} -// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{!37} +// CHECK:STDOUT: !28 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") +// CHECK:STDOUT: !34 = !DIFile(filename: "alignment.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !{null, !36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !40 = !{null, !39} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "NaturallyAligned", linkageName: "_CNaturallyAligned.Main", scope: null, file: !32, line: 23, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !53) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !34) -// CHECK:STDOUT: !45 = !DILocation(line: 24, column: 3, scope: !42) -// CHECK:STDOUT: !47 = !DILocation(line: 25, column: 3, scope: !42) -// CHECK:STDOUT: !51 = !DILocation(line: 26, column: 3, scope: !42) -// CHECK:STDOUT: !52 = !DILocation(line: 23, column: 1, scope: !42) -// CHECK:STDOUT: !53 = !{!43} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.c846b89dd79c7366.Core:NaturallyAligned.Cpp", scope: null, file: !32, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !56 = !DILocation(line: 7, column: 8, scope: !54) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.89af5f7a0692dfe8:core.Destroy.Core", scope: null, file: !32, line: 24, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !60) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !37) -// CHECK:STDOUT: !59 = !DILocation(line: 24, column: 3, scope: !57) -// CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "ExtraAlignment", linkageName: "_CExtraAlignment.Main", scope: null, file: !32, line: 29, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !72) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !34) -// CHECK:STDOUT: !64 = !DILocation(line: 30, column: 3, scope: !61) -// CHECK:STDOUT: !66 = !DILocation(line: 33, column: 3, scope: !61) -// CHECK:STDOUT: !70 = !DILocation(line: 34, column: 3, scope: !61) -// CHECK:STDOUT: !71 = !DILocation(line: 29, column: 1, scope: !61) -// CHECK:STDOUT: !72 = !{!62} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.52e7708693d29223.Core:ExtraAlignment.Cpp", scope: null, file: !32, line: 11, type: !41, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !75 = !DILocation(line: 11, column: 20, scope: !73) -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.77c39a3d53f40ae2:core.Destroy.Core", scope: null, file: !32, line: 30, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !79) -// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !37) -// CHECK:STDOUT: !78 = !DILocation(line: 30, column: 3, scope: !76) -// CHECK:STDOUT: !79 = !{!77} -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "Packed", linkageName: "_CPacked.Main", scope: null, file: !32, line: 37, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !91) -// CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !34) -// CHECK:STDOUT: !83 = !DILocation(line: 38, column: 3, scope: !80) -// CHECK:STDOUT: !85 = !DILocation(line: 42, column: 3, scope: !80) -// CHECK:STDOUT: !89 = !DILocation(line: 43, column: 3, scope: !80) -// CHECK:STDOUT: !90 = !DILocation(line: 37, column: 1, scope: !80) -// CHECK:STDOUT: !91 = !{!81} -// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.ca2b917a39954a06.Core:Packed.Cpp", scope: null, file: !32, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !94 = !DILocation(line: 15, column: 32, scope: !92) -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.00b787a687567d9a:core.Destroy.Core", scope: null, file: !32, line: 38, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !98) -// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !37) -// CHECK:STDOUT: !97 = !DILocation(line: 38, column: 3, scope: !95) -// CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.d4cda66b3640b619", scope: null, file: !26, line: 9, type: !41, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !102 = !DILocation(line: 9, column: 28, scope: !99) -// CHECK:STDOUT: !103 = !DILocation(line: 9, column: 21, scope: !99) -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.34933c1c343bd645", scope: null, file: !26, line: 9, type: !41, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !107 = !DILocation(line: 9, column: 28, scope: !104) -// CHECK:STDOUT: !108 = !DILocation(line: 9, column: 21, scope: !104) -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.3e10857902c69c1a", scope: null, file: !26, line: 9, type: !41, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !112 = !DILocation(line: 9, column: 28, scope: !109) -// CHECK:STDOUT: !113 = !DILocation(line: 9, column: 21, scope: !109) -// CHECK:STDOUT: !114 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !115 = !{!"omnipotent char", !114, i64 0} -// CHECK:STDOUT: !116 = !{!"any pointer", !115, i64 0} -// CHECK:STDOUT: !117 = !{!"p1 _ZTS16NaturallyAligned", !116, i64 0} -// CHECK:STDOUT: !118 = !{!117, !117, i64 0} -// CHECK:STDOUT: !119 = !{!"p1 _ZTS14ExtraAlignment", !116, i64 0} +// CHECK:STDOUT: !42 = !{!39} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "NaturallyAligned", linkageName: "_CNaturallyAligned.Main", scope: null, file: !34, line: 23, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !55) +// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !36) +// CHECK:STDOUT: !47 = !DILocation(line: 24, column: 3, scope: !44) +// CHECK:STDOUT: !49 = !DILocation(line: 25, column: 3, scope: !44) +// CHECK:STDOUT: !53 = !DILocation(line: 26, column: 3, scope: !44) +// CHECK:STDOUT: !54 = !DILocation(line: 23, column: 1, scope: !44) +// CHECK:STDOUT: !55 = !{!45} +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.c846b89dd79c7366.Core:NaturallyAligned.Cpp", scope: null, file: !34, line: 7, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !58 = !DILocation(line: 7, column: 8, scope: !56) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.89af5f7a0692dfe8:core.Destroy.Core", scope: null, file: !34, line: 24, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !62) +// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !39) +// CHECK:STDOUT: !61 = !DILocation(line: 24, column: 3, scope: !59) +// CHECK:STDOUT: !62 = !{!60} +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "ExtraAlignment", linkageName: "_CExtraAlignment.Main", scope: null, file: !34, line: 29, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !74) +// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !36) +// CHECK:STDOUT: !66 = !DILocation(line: 30, column: 3, scope: !63) +// CHECK:STDOUT: !68 = !DILocation(line: 33, column: 3, scope: !63) +// CHECK:STDOUT: !72 = !DILocation(line: 34, column: 3, scope: !63) +// CHECK:STDOUT: !73 = !DILocation(line: 29, column: 1, scope: !63) +// CHECK:STDOUT: !74 = !{!64} +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.52e7708693d29223.Core:ExtraAlignment.Cpp", scope: null, file: !34, line: 11, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !77 = !DILocation(line: 11, column: 20, scope: !75) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.77c39a3d53f40ae2:core.Destroy.Core", scope: null, file: !34, line: 30, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !81) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !39) +// CHECK:STDOUT: !80 = !DILocation(line: 30, column: 3, scope: !78) +// CHECK:STDOUT: !81 = !{!79} +// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "Packed", linkageName: "_CPacked.Main", scope: null, file: !34, line: 37, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !93) +// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !36) +// CHECK:STDOUT: !85 = !DILocation(line: 38, column: 3, scope: !82) +// CHECK:STDOUT: !87 = !DILocation(line: 42, column: 3, scope: !82) +// CHECK:STDOUT: !91 = !DILocation(line: 43, column: 3, scope: !82) +// CHECK:STDOUT: !92 = !DILocation(line: 37, column: 1, scope: !82) +// CHECK:STDOUT: !93 = !{!83} +// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.ca2b917a39954a06.Core:Packed.Cpp", scope: null, file: !34, line: 15, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !96 = !DILocation(line: 15, column: 32, scope: !94) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.00b787a687567d9a:core.Destroy.Core", scope: null, file: !34, line: 38, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !100) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !39) +// CHECK:STDOUT: !99 = !DILocation(line: 38, column: 3, scope: !97) +// CHECK:STDOUT: !100 = !{!98} +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.d4cda66b3640b619", scope: null, file: !28, line: 9, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !104 = !DILocation(line: 9, column: 28, scope: !101) +// CHECK:STDOUT: !105 = !DILocation(line: 9, column: 21, scope: !101) +// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.34933c1c343bd645", scope: null, file: !28, line: 9, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !109 = !DILocation(line: 9, column: 28, scope: !106) +// CHECK:STDOUT: !110 = !DILocation(line: 9, column: 21, scope: !106) +// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.3e10857902c69c1a", scope: null, file: !28, line: 9, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !114 = !DILocation(line: 9, column: 28, scope: !111) +// CHECK:STDOUT: !115 = !DILocation(line: 9, column: 21, scope: !111) +// CHECK:STDOUT: !116 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !117 = !{!"omnipotent char", !116, i64 0} +// CHECK:STDOUT: !118 = !{!"any pointer", !117, i64 0} +// CHECK:STDOUT: !119 = !{!"p1 _ZTS16NaturallyAligned", !118, i64 0} // CHECK:STDOUT: !120 = !{!119, !119, i64 0} -// CHECK:STDOUT: !121 = !{!"p1 _ZTS6Packed", !116, i64 0} +// CHECK:STDOUT: !121 = !{!"p1 _ZTS14ExtraAlignment", !118, i64 0} // CHECK:STDOUT: !122 = !{!121, !121, i64 0} -// CHECK:STDOUT: !123 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !124 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !125 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !126 = !{!"int", !115, i64 0} -// CHECK:STDOUT: !127 = !{!"__libc_errno", !126, i64 0} -// CHECK:STDOUT: !128 = !{!127, !126, i64 0} +// CHECK:STDOUT: !123 = !{!"p1 _ZTS6Packed", !118, i64 0} +// CHECK:STDOUT: !124 = !{!123, !123, i64 0} +// CHECK:STDOUT: !125 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !126 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !127 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !128 = !{!"int", !117, i64 0} +// CHECK:STDOUT: !129 = !{!"__libc_errno", !128, i64 0} +// CHECK:STDOUT: !130 = !{!129, !128, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/import/destructor.carbon b/toolchain/lower/testdata/interop/cpp/class/import/destructor.carbon index 4adfef9f6be1..83aaf3ca0452 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/destructor.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/destructor.carbon @@ -68,123 +68,123 @@ fn DestroyAIndirectly() { // CHECK:STDOUT: @Constexpr.val.loc18_3 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CDestroy.Main() #0 !dbg !41 { +// CHECK:STDOUT: define void @_CDestroy.Main() #0 !dbg !43 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var.loc16 = alloca {}, align 1, !dbg !42 -// CHECK:STDOUT: %_.var.loc17 = alloca {}, align 1, !dbg !44 -// CHECK:STDOUT: %_.var.loc18 = alloca {}, align 1, !dbg !46 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !42 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc16, ptr align 1 @Trivial.val.loc16_3, i64 0, i1 false), !dbg !42 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc17), !dbg !44 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc17, ptr align 1 @Nontrivial.val.loc17_3, i64 0, i1 false), !dbg !44 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18), !dbg !46 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc18, ptr align 1 @Constexpr.val.loc18_3, i64 0, i1 false), !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.dec26c21eef1f685:core.Destroy.Core"(ptr %_.var.loc18), !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.c1d87436718894ba:core.Destroy.Core"(ptr %_.var.loc17), !dbg !44 -// CHECK:STDOUT: call void @"_CSelfDestruct.74d7ad7746f17264:core.Destroy.Core"(ptr %_.var.loc16), !dbg !42 -// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: %_.var.loc16 = alloca {}, align 1, !dbg !44 +// CHECK:STDOUT: %_.var.loc17 = alloca {}, align 1, !dbg !46 +// CHECK:STDOUT: %_.var.loc18 = alloca {}, align 1, !dbg !48 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !44 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc16, ptr align 1 @Trivial.val.loc16_3, i64 0, i1 false), !dbg !44 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc17), !dbg !46 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc17, ptr align 1 @Nontrivial.val.loc17_3, i64 0, i1 false), !dbg !46 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18), !dbg !48 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc18, ptr align 1 @Constexpr.val.loc18_3, i64 0, i1 false), !dbg !48 +// CHECK:STDOUT: call void @"_CSelfDestruct.dec26c21eef1f685:core.Destroy.Core"(ptr %_.var.loc18), !dbg !48 +// CHECK:STDOUT: call void @"_CSelfDestruct.c1d87436718894ba:core.Destroy.Core"(ptr %_.var.loc17), !dbg !46 +// CHECK:STDOUT: call void @"_CSelfDestruct.74d7ad7746f17264:core.Destroy.Core"(ptr %_.var.loc16), !dbg !44 +// CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN9ConstexprD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #1 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !110 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !112 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dec26c21eef1f685:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dec26c21eef1f685:core.Destroy.Core"(ptr %self) #0 !dbg !51 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN9ConstexprD2Ev(ptr %self), !dbg !51 -// CHECK:STDOUT: ret void, !dbg !51 +// CHECK:STDOUT: call void @_ZN9ConstexprD2Ev(ptr %self), !dbg !53 +// CHECK:STDOUT: ret void, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy:thunk:Destroy.74d6bfd440841f14.Core:Constexpr.Cpp"(ptr %self) #2 !dbg !53 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy:thunk:Destroy.74d6bfd440841f14.Core:Constexpr.Cpp"(ptr %self) #2 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN9ConstexprD2Ev(ptr %self), !dbg !56 -// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: call void @_ZN9ConstexprD2Ev(ptr %self), !dbg !58 +// CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: declare void @_ZN10NontrivialD1Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c1d87436718894ba:core.Destroy.Core"(ptr %self) #0 !dbg !58 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c1d87436718894ba:core.Destroy.Core"(ptr %self) #0 !dbg !60 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN10NontrivialD1Ev(ptr %self), !dbg !60 -// CHECK:STDOUT: ret void, !dbg !60 +// CHECK:STDOUT: call void @_ZN10NontrivialD1Ev(ptr %self), !dbg !62 +// CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.74d7ad7746f17264:core.Destroy.Core"(ptr %self) #0 !dbg !62 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.74d7ad7746f17264:core.Destroy.Core"(ptr %self) #0 !dbg !64 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !64 +// CHECK:STDOUT: ret void, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy:thunk:Destroy.470f41253d102356.Core:Trivial.Cpp"(ptr %self) #2 !dbg !66 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy:thunk:Destroy.470f41253d102356.Core:Trivial.Cpp"(ptr %self) #2 !dbg !68 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: ret void, !dbg !71 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CMake.Trivial.Cpp:Make.Main"(ptr sret({}) %return) #0 !dbg !71 { +// CHECK:STDOUT: define void @"_CMake.Trivial.Cpp:Make.Main"(ptr sret({}) %return) #0 !dbg !73 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN7TrivialC1Ev.carbon_thunk.(ptr %return), !dbg !74 -// CHECK:STDOUT: ret void, !dbg !75 +// CHECK:STDOUT: call void @_ZN7TrivialC1Ev.carbon_thunk.(ptr %return), !dbg !76 +// CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN7TrivialC1Ev.carbon_thunk.(ptr noundef %return) #4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !112 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !112 -// CHECK:STDOUT: ret void -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CMake.Nontrivial.Cpp:Make.Main"(ptr sret({}) %return) #0 !dbg !76 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN10NontrivialC1Ev.carbon_thunk.(ptr %return), !dbg !79 -// CHECK:STDOUT: ret void, !dbg !80 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable -// CHECK:STDOUT: define internal void @_ZN10NontrivialC1Ev.carbon_thunk.(ptr noundef %return) #4 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %return.addr = alloca ptr, align 8 // CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !114 // CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !114 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CMake.Constexpr.Cpp:Make.Main"(ptr sret({}) %return) #0 !dbg !81 { +// CHECK:STDOUT: define void @"_CMake.Nontrivial.Cpp:Make.Main"(ptr sret({}) %return) #0 !dbg !78 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN9ConstexprC1Ev.carbon_thunk.(ptr %return), !dbg !84 -// CHECK:STDOUT: ret void, !dbg !85 +// CHECK:STDOUT: call void @_ZN10NontrivialC1Ev.carbon_thunk.(ptr %return), !dbg !81 +// CHECK:STDOUT: ret void, !dbg !82 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable +// CHECK:STDOUT: define internal void @_ZN10NontrivialC1Ev.carbon_thunk.(ptr noundef %return) #4 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %return.addr = alloca ptr, align 8 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !116 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !116 +// CHECK:STDOUT: ret void +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define void @"_CMake.Constexpr.Cpp:Make.Main"(ptr sret({}) %return) #0 !dbg !83 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_ZN9ConstexprC1Ev.carbon_thunk.(ptr %return), !dbg !86 +// CHECK:STDOUT: ret void, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN9ConstexprC1Ev.carbon_thunk.(ptr noundef %return) #4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !110 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !110 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !112 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !112 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CDestroyAIndirectly.Main() #0 !dbg !86 { +// CHECK:STDOUT: define void @_CDestroyAIndirectly.Main() #0 !dbg !88 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CDestroyIndirectly.Main.bbfc87135555afbb(), !dbg !87 -// CHECK:STDOUT: call void @_CDestroyIndirectly.Main.cbf5e6d817f75fdf(), !dbg !88 -// CHECK:STDOUT: call void @_CDestroyIndirectly.Main.310c2661ae23419f(), !dbg !89 -// CHECK:STDOUT: ret void, !dbg !90 +// CHECK:STDOUT: call void @_CDestroyIndirectly.Main.bbfc87135555afbb(), !dbg !89 +// CHECK:STDOUT: call void @_CDestroyIndirectly.Main.cbf5e6d817f75fdf(), !dbg !90 +// CHECK:STDOUT: call void @_CDestroyIndirectly.Main.310c2661ae23419f(), !dbg !91 +// CHECK:STDOUT: ret void, !dbg !92 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -194,33 +194,33 @@ fn DestroyAIndirectly() { // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #5 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CDestroyIndirectly.Main.bbfc87135555afbb() #0 !dbg !91 { +// CHECK:STDOUT: define linkonce_odr void @_CDestroyIndirectly.Main.bbfc87135555afbb() #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !92 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !92 -// CHECK:STDOUT: call void @"_CMake.Trivial.Cpp:Make.Main"(ptr %a.var), !dbg !93 -// CHECK:STDOUT: call void @"_CSelfDestruct.74d7ad7746f17264:core.Destroy.Core"(ptr %a.var), !dbg !92 -// CHECK:STDOUT: ret void, !dbg !95 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !94 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !94 +// CHECK:STDOUT: call void @"_CMake.Trivial.Cpp:Make.Main"(ptr %a.var), !dbg !95 +// CHECK:STDOUT: call void @"_CSelfDestruct.74d7ad7746f17264:core.Destroy.Core"(ptr %a.var), !dbg !94 +// CHECK:STDOUT: ret void, !dbg !97 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CDestroyIndirectly.Main.cbf5e6d817f75fdf() #0 !dbg !96 { +// CHECK:STDOUT: define linkonce_odr void @_CDestroyIndirectly.Main.cbf5e6d817f75fdf() #0 !dbg !98 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !97 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !97 -// CHECK:STDOUT: call void @"_CMake.Nontrivial.Cpp:Make.Main"(ptr %a.var), !dbg !98 -// CHECK:STDOUT: call void @"_CSelfDestruct.c1d87436718894ba:core.Destroy.Core"(ptr %a.var), !dbg !97 -// CHECK:STDOUT: ret void, !dbg !100 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !99 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !99 +// CHECK:STDOUT: call void @"_CMake.Nontrivial.Cpp:Make.Main"(ptr %a.var), !dbg !100 +// CHECK:STDOUT: call void @"_CSelfDestruct.c1d87436718894ba:core.Destroy.Core"(ptr %a.var), !dbg !99 +// CHECK:STDOUT: ret void, !dbg !102 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CDestroyIndirectly.Main.310c2661ae23419f() #0 !dbg !101 { +// CHECK:STDOUT: define linkonce_odr void @_CDestroyIndirectly.Main.310c2661ae23419f() #0 !dbg !103 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !102 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !102 -// CHECK:STDOUT: call void @"_CMake.Constexpr.Cpp:Make.Main"(ptr %a.var), !dbg !103 -// CHECK:STDOUT: call void @"_CSelfDestruct.dec26c21eef1f685:core.Destroy.Core"(ptr %a.var), !dbg !102 -// CHECK:STDOUT: ret void, !dbg !105 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !104 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !104 +// CHECK:STDOUT: call void @"_CMake.Constexpr.Cpp:Make.Main"(ptr %a.var), !dbg !105 +// CHECK:STDOUT: call void @"_CSelfDestruct.dec26c21eef1f685:core.Destroy.Core"(ptr %a.var), !dbg !104 +// CHECK:STDOUT: ret void, !dbg !107 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -235,85 +235,85 @@ fn DestroyAIndirectly() { // CHECK:STDOUT: attributes #4 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #5 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} -// CHECK:STDOUT: !llvm.module.flags = !{!115, !116, !117, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!120} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} +// CHECK:STDOUT: !llvm.module.flags = !{!117, !118, !119, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!122} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "call_destructor.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !{null} -// CHECK:STDOUT: !35 = !DISubroutineType(types: !34) -// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !37 = !{null, !36} -// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = !{!36} +// CHECK:STDOUT: !34 = !DIFile(filename: "call_destructor.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !{null} +// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) +// CHECK:STDOUT: !38 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !39 = !{null, !38} // CHECK:STDOUT: !40 = !DISubroutineType(types: !39) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Destroy", linkageName: "_CDestroy.Main", scope: null, file: !32, line: 15, type: !35, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !42 = !DILocation(line: 16, column: 3, scope: !41) -// CHECK:STDOUT: !44 = !DILocation(line: 17, column: 3, scope: !41) -// CHECK:STDOUT: !46 = !DILocation(line: 18, column: 3, scope: !41) -// CHECK:STDOUT: !48 = !DILocation(line: 15, column: 1, scope: !41) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dec26c21eef1f685:core.Destroy.Core", scope: null, file: !32, line: 18, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !52) -// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !36) -// CHECK:STDOUT: !51 = !DILocation(line: 18, column: 3, scope: !49) -// CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy:thunk:Destroy.74d6bfd440841f14.Core:Constexpr.Cpp", scope: null, file: !32, line: 11, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !57) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !36) -// CHECK:STDOUT: !56 = !DILocation(line: 11, column: 13, scope: !53) -// CHECK:STDOUT: !57 = !{!54} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c1d87436718894ba:core.Destroy.Core", scope: null, file: !32, line: 17, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !61) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !36) -// CHECK:STDOUT: !60 = !DILocation(line: 17, column: 3, scope: !58) -// CHECK:STDOUT: !61 = !{!59} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.74d7ad7746f17264:core.Destroy.Core", scope: null, file: !32, line: 16, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !65) -// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !36) -// CHECK:STDOUT: !64 = !DILocation(line: 16, column: 3, scope: !62) -// CHECK:STDOUT: !65 = !{!63} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy:thunk:Destroy.470f41253d102356.Core:Trivial.Cpp", scope: null, file: !32, line: 6, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !70) -// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !36) -// CHECK:STDOUT: !69 = !DILocation(line: 6, column: 8, scope: !66) -// CHECK:STDOUT: !70 = !{!67} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Trivial.Cpp:Make.Main", scope: null, file: !32, line: 25, type: !40, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !74 = !DILocation(line: 25, column: 30, scope: !71) -// CHECK:STDOUT: !75 = !DILocation(line: 25, column: 23, scope: !71) -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Nontrivial.Cpp:Make.Main", scope: null, file: !32, line: 28, type: !40, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !79 = !DILocation(line: 28, column: 30, scope: !76) -// CHECK:STDOUT: !80 = !DILocation(line: 28, column: 23, scope: !76) -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Constexpr.Cpp:Make.Main", scope: null, file: !32, line: 31, type: !40, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !84 = !DILocation(line: 31, column: 30, scope: !81) -// CHECK:STDOUT: !85 = !DILocation(line: 31, column: 23, scope: !81) -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "DestroyAIndirectly", linkageName: "_CDestroyAIndirectly.Main", scope: null, file: !32, line: 38, type: !35, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !87 = !DILocation(line: 39, column: 3, scope: !86) -// CHECK:STDOUT: !88 = !DILocation(line: 40, column: 3, scope: !86) -// CHECK:STDOUT: !89 = !DILocation(line: 41, column: 3, scope: !86) -// CHECK:STDOUT: !90 = !DILocation(line: 38, column: 1, scope: !86) -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "DestroyIndirectly", linkageName: "_CDestroyIndirectly.Main.bbfc87135555afbb", scope: null, file: !32, line: 34, type: !35, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !92 = !DILocation(line: 35, column: 3, scope: !91) -// CHECK:STDOUT: !93 = !DILocation(line: 35, column: 21, scope: !91) -// CHECK:STDOUT: !95 = !DILocation(line: 34, column: 1, scope: !91) -// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "DestroyIndirectly", linkageName: "_CDestroyIndirectly.Main.cbf5e6d817f75fdf", scope: null, file: !32, line: 34, type: !35, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !97 = !DILocation(line: 35, column: 3, scope: !96) -// CHECK:STDOUT: !98 = !DILocation(line: 35, column: 21, scope: !96) -// CHECK:STDOUT: !100 = !DILocation(line: 34, column: 1, scope: !96) -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "DestroyIndirectly", linkageName: "_CDestroyIndirectly.Main.310c2661ae23419f", scope: null, file: !32, line: 34, type: !35, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !102 = !DILocation(line: 35, column: 3, scope: !101) -// CHECK:STDOUT: !103 = !DILocation(line: 35, column: 21, scope: !101) -// CHECK:STDOUT: !105 = !DILocation(line: 34, column: 1, scope: !101) -// CHECK:STDOUT: !106 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !107 = !{!"omnipotent char", !106, i64 0} -// CHECK:STDOUT: !108 = !{!"any pointer", !107, i64 0} -// CHECK:STDOUT: !109 = !{!"p1 _ZTS9Constexpr", !108, i64 0} -// CHECK:STDOUT: !110 = !{!109, !109, i64 0} -// CHECK:STDOUT: !111 = !{!"p1 _ZTS7Trivial", !108, i64 0} +// CHECK:STDOUT: !41 = !{!38} +// CHECK:STDOUT: !42 = !DISubroutineType(types: !41) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Destroy", linkageName: "_CDestroy.Main", scope: null, file: !34, line: 15, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !44 = !DILocation(line: 16, column: 3, scope: !43) +// CHECK:STDOUT: !46 = !DILocation(line: 17, column: 3, scope: !43) +// CHECK:STDOUT: !48 = !DILocation(line: 18, column: 3, scope: !43) +// CHECK:STDOUT: !50 = !DILocation(line: 15, column: 1, scope: !43) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dec26c21eef1f685:core.Destroy.Core", scope: null, file: !34, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !54) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !38) +// CHECK:STDOUT: !53 = !DILocation(line: 18, column: 3, scope: !51) +// CHECK:STDOUT: !54 = !{!52} +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy:thunk:Destroy.74d6bfd440841f14.Core:Constexpr.Cpp", scope: null, file: !34, line: 11, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !59) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !38) +// CHECK:STDOUT: !58 = !DILocation(line: 11, column: 13, scope: !55) +// CHECK:STDOUT: !59 = !{!56} +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c1d87436718894ba:core.Destroy.Core", scope: null, file: !34, line: 17, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !63) +// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !38) +// CHECK:STDOUT: !62 = !DILocation(line: 17, column: 3, scope: !60) +// CHECK:STDOUT: !63 = !{!61} +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.74d7ad7746f17264:core.Destroy.Core", scope: null, file: !34, line: 16, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !67) +// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !38) +// CHECK:STDOUT: !66 = !DILocation(line: 16, column: 3, scope: !64) +// CHECK:STDOUT: !67 = !{!65} +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy:thunk:Destroy.470f41253d102356.Core:Trivial.Cpp", scope: null, file: !34, line: 6, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !72) +// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !38) +// CHECK:STDOUT: !71 = !DILocation(line: 6, column: 8, scope: !68) +// CHECK:STDOUT: !72 = !{!69} +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Trivial.Cpp:Make.Main", scope: null, file: !34, line: 25, type: !42, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !76 = !DILocation(line: 25, column: 30, scope: !73) +// CHECK:STDOUT: !77 = !DILocation(line: 25, column: 23, scope: !73) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Nontrivial.Cpp:Make.Main", scope: null, file: !34, line: 28, type: !42, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !81 = !DILocation(line: 28, column: 30, scope: !78) +// CHECK:STDOUT: !82 = !DILocation(line: 28, column: 23, scope: !78) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Constexpr.Cpp:Make.Main", scope: null, file: !34, line: 31, type: !42, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !86 = !DILocation(line: 31, column: 30, scope: !83) +// CHECK:STDOUT: !87 = !DILocation(line: 31, column: 23, scope: !83) +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "DestroyAIndirectly", linkageName: "_CDestroyAIndirectly.Main", scope: null, file: !34, line: 38, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !89 = !DILocation(line: 39, column: 3, scope: !88) +// CHECK:STDOUT: !90 = !DILocation(line: 40, column: 3, scope: !88) +// CHECK:STDOUT: !91 = !DILocation(line: 41, column: 3, scope: !88) +// CHECK:STDOUT: !92 = !DILocation(line: 38, column: 1, scope: !88) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "DestroyIndirectly", linkageName: "_CDestroyIndirectly.Main.bbfc87135555afbb", scope: null, file: !34, line: 34, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !94 = !DILocation(line: 35, column: 3, scope: !93) +// CHECK:STDOUT: !95 = !DILocation(line: 35, column: 21, scope: !93) +// CHECK:STDOUT: !97 = !DILocation(line: 34, column: 1, scope: !93) +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "DestroyIndirectly", linkageName: "_CDestroyIndirectly.Main.cbf5e6d817f75fdf", scope: null, file: !34, line: 34, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !99 = !DILocation(line: 35, column: 3, scope: !98) +// CHECK:STDOUT: !100 = !DILocation(line: 35, column: 21, scope: !98) +// CHECK:STDOUT: !102 = !DILocation(line: 34, column: 1, scope: !98) +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "DestroyIndirectly", linkageName: "_CDestroyIndirectly.Main.310c2661ae23419f", scope: null, file: !34, line: 34, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !104 = !DILocation(line: 35, column: 3, scope: !103) +// CHECK:STDOUT: !105 = !DILocation(line: 35, column: 21, scope: !103) +// CHECK:STDOUT: !107 = !DILocation(line: 34, column: 1, scope: !103) +// CHECK:STDOUT: !108 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !109 = !{!"omnipotent char", !108, i64 0} +// CHECK:STDOUT: !110 = !{!"any pointer", !109, i64 0} +// CHECK:STDOUT: !111 = !{!"p1 _ZTS9Constexpr", !110, i64 0} // CHECK:STDOUT: !112 = !{!111, !111, i64 0} -// CHECK:STDOUT: !113 = !{!"p1 _ZTS10Nontrivial", !108, i64 0} +// CHECK:STDOUT: !113 = !{!"p1 _ZTS7Trivial", !110, i64 0} // CHECK:STDOUT: !114 = !{!113, !113, i64 0} -// CHECK:STDOUT: !115 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !116 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !117 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !118 = !{!"int", !107, i64 0} -// CHECK:STDOUT: !119 = !{!"__libc_errno", !118, i64 0} -// CHECK:STDOUT: !120 = !{!119, !118, i64 0} +// CHECK:STDOUT: !115 = !{!"p1 _ZTS10Nontrivial", !110, i64 0} +// CHECK:STDOUT: !116 = !{!115, !115, i64 0} +// CHECK:STDOUT: !117 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !118 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !119 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !120 = !{!"int", !109, i64 0} +// CHECK:STDOUT: !121 = !{!"__libc_errno", !120, i64 0} +// CHECK:STDOUT: !122 = !{!121, !120, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/import/dynamic.carbon b/toolchain/lower/testdata/interop/cpp/class/import/dynamic.carbon index e9ef0b7b78f7..0e9e86760e89 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/dynamic.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/dynamic.carbon @@ -83,98 +83,98 @@ fn DoThing() { // CHECK:STDOUT: declare void @_ZNR4Base4funcEv(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_Cother_func.Derived.Main(ptr %self) #2 !dbg !45 { +// CHECK:STDOUT: define void @_Cother_func.Derived.Main(ptr %self) #2 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_Cfunc.Derived.Main(ptr %self) #2 !dbg !50 { +// CHECK:STDOUT: define void @_Cfunc.Derived.Main(ptr %self) #2 !dbg !52 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !53 +// CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_Cfunc:thunk:Base.Cpp:Derived.Main"(ptr %self) #3 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_Cfunc:thunk:Base.Cpp:Derived.Main"(ptr %self) #3 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Cfunc.Derived.Main(ptr %self), !dbg !58 -// CHECK:STDOUT: ret void, !dbg !58 +// CHECK:STDOUT: call void @_Cfunc.Derived.Main(ptr %self), !dbg !60 +// CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.Derived.Main"(ptr %self) #3 !dbg !60 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.Derived.Main"(ptr %self) #3 !dbg !62 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !62 -// CHECK:STDOUT: ret void, !dbg !62 +// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !64 +// CHECK:STDOUT: ret void, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.352b8f386f44a614:core.Destroy.Core"(ptr %self) #2 !dbg !64 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.352b8f386f44a614:core.Destroy.Core"(ptr %self) #2 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !66 +// CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0a0b9df20a60c6f6:core.Destroy.Core"(ptr %self) #2 !dbg !68 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0a0b9df20a60c6f6:core.Destroy.Core"(ptr %self) #2 !dbg !70 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22.base = getelementptr inbounds nuw { [16 x i8] }, ptr %self, i32 0, i32 0, !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.352b8f386f44a614:core.Destroy.Core"(ptr %.loc22.base), !dbg !70 -// CHECK:STDOUT: ret void, !dbg !70 +// CHECK:STDOUT: %.loc22.base = getelementptr inbounds nuw { [16 x i8] }, ptr %self, i32 0, i32 0, !dbg !72 +// CHECK:STDOUT: call void @"_CSelfDestruct.352b8f386f44a614:core.Destroy.Core"(ptr %.loc22.base), !dbg !72 +// CHECK:STDOUT: ret void, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0a0b9df20a60c6f6:core.Destroy.Core"(ptr %self) #2 !dbg !72 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0a0b9df20a60c6f6:core.Destroy.Core"(ptr %self) #2 !dbg !74 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0a0b9df20a60c6f6:core.Destroy.Core"(ptr %self), !dbg !74 -// CHECK:STDOUT: ret void, !dbg !74 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.0a0b9df20a60c6f6:core.Destroy.Core"(ptr %self), !dbg !76 +// CHECK:STDOUT: ret void, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #2 !dbg !76 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #2 !dbg !78 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22.base = getelementptr inbounds nuw { [16 x i8] }, ptr %self, i32 0, i32 0, !dbg !78 -// CHECK:STDOUT: call void @"_CSelfDestruct.352b8f386f44a614:core.Destroy.Core"(ptr %.loc22.base), !dbg !78 -// CHECK:STDOUT: ret void, !dbg !78 +// CHECK:STDOUT: %.loc22.base = getelementptr inbounds nuw { [16 x i8] }, ptr %self, i32 0, i32 0, !dbg !80 +// CHECK:STDOUT: call void @"_CSelfDestruct.352b8f386f44a614:core.Destroy.Core"(ptr %.loc22.base), !dbg !80 +// CHECK:STDOUT: ret void, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #2 !dbg !80 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #2 !dbg !82 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !82 -// CHECK:STDOUT: ret void, !dbg !82 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !84 +// CHECK:STDOUT: ret void, !dbg !84 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_Cfunc__carbon_thunk.Derived.Main(ptr %self) #2 !dbg !84 { +// CHECK:STDOUT: define void @_Cfunc__carbon_thunk.Derived.Main(ptr %self) #2 !dbg !86 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Cfunc.Derived.Main(ptr %self), !dbg !86 -// CHECK:STDOUT: ret void, !dbg !86 +// CHECK:STDOUT: call void @_Cfunc.Derived.Main(ptr %self), !dbg !88 +// CHECK:STDOUT: ret void, !dbg !88 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_Cother_func__carbon_thunk.Derived.Main(ptr %self) #2 !dbg !88 { +// CHECK:STDOUT: define void @_Cother_func__carbon_thunk.Derived.Main(ptr %self) #2 !dbg !90 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Derived.other_func.call.vtable = load ptr, ptr %self, align 8, !dbg !90 -// CHECK:STDOUT: %Derived.other_func.call = call ptr @llvm.load.relative.i32(ptr %Derived.other_func.call.vtable, i32 8), !dbg !90 -// CHECK:STDOUT: call void %Derived.other_func.call(ptr %self), !dbg !90 -// CHECK:STDOUT: ret void, !dbg !90 +// CHECK:STDOUT: %Derived.other_func.call.vtable = load ptr, ptr %self, align 8, !dbg !92 +// CHECK:STDOUT: %Derived.other_func.call = call ptr @llvm.load.relative.i32(ptr %Derived.other_func.call.vtable, i32 8), !dbg !92 +// CHECK:STDOUT: call void %Derived.other_func.call(ptr %self), !dbg !92 +// CHECK:STDOUT: ret void, !dbg !92 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CDoThing.Main() #2 !dbg !92 { +// CHECK:STDOUT: define void @_CDoThing.Main() #2 !dbg !94 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %d.var = alloca { [16 x i8] }, align 8, !dbg !93 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !93 -// CHECK:STDOUT: %.loc31_44.1.base = getelementptr inbounds nuw { [16 x i8] }, ptr %d.var, i32 0, i32 0, !dbg !94 -// CHECK:STDOUT: call void @_ZN4BaseC1Ev.carbon_thunk.(ptr %.loc31_44.1.base), !dbg !95 -// CHECK:STDOUT: %.loc31_44.7.base = getelementptr inbounds nuw { [16 x i8] }, ptr %d.var, i32 0, i32 0, !dbg !94 -// CHECK:STDOUT: %.loc31_44.8.base = getelementptr inbounds nuw [16 x i8], ptr %.loc31_44.7.base, i32 0, i32 0, !dbg !94 -// CHECK:STDOUT: %.loc31_44.9.vptr = getelementptr inbounds nuw [8 x i8], ptr %.loc31_44.8.base, i32 0, i32 0, !dbg !94 -// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 24) (i8, ptr @_ZTVN6Carbon7DerivedE, i64 16), ptr %.loc31_44.9.vptr, align 8, !dbg !94 -// CHECK:STDOUT: %.loc32_11.2.base = getelementptr inbounds nuw { [16 x i8] }, ptr %d.var, i32 0, i32 0, !dbg !98 -// CHECK:STDOUT: call void @_Z3UseR4Base(ptr %.loc32_11.2.base), !dbg !99 -// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %d.var), !dbg !93 -// CHECK:STDOUT: ret void, !dbg !100 +// CHECK:STDOUT: %d.var = alloca { [16 x i8] }, align 8, !dbg !95 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !95 +// CHECK:STDOUT: %.loc31_44.1.base = getelementptr inbounds nuw { [16 x i8] }, ptr %d.var, i32 0, i32 0, !dbg !96 +// CHECK:STDOUT: call void @_ZN4BaseC1Ev.carbon_thunk.(ptr %.loc31_44.1.base), !dbg !97 +// CHECK:STDOUT: %.loc31_44.7.base = getelementptr inbounds nuw { [16 x i8] }, ptr %d.var, i32 0, i32 0, !dbg !96 +// CHECK:STDOUT: %.loc31_44.8.base = getelementptr inbounds nuw [16 x i8], ptr %.loc31_44.7.base, i32 0, i32 0, !dbg !96 +// CHECK:STDOUT: %.loc31_44.9.vptr = getelementptr inbounds nuw [8 x i8], ptr %.loc31_44.8.base, i32 0, i32 0, !dbg !96 +// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 24) (i8, ptr @_ZTVN6Carbon7DerivedE, i64 16), ptr %.loc31_44.9.vptr, align 8, !dbg !96 +// CHECK:STDOUT: %.loc32_11.2.base = getelementptr inbounds nuw { [16 x i8] }, ptr %d.var, i32 0, i32 0, !dbg !100 +// CHECK:STDOUT: call void @_Z3UseR4Base(ptr %.loc32_11.2.base), !dbg !101 +// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %d.var), !dbg !95 +// CHECK:STDOUT: ret void, !dbg !102 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable @@ -197,7 +197,7 @@ fn DoThing() { // CHECK:STDOUT: define internal void @_ZNR6Carbon7Derived4funcEv(ptr noundef nonnull align 8 dereferenceable(12) %this) unnamed_addr #4 align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !106 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !108 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @_Cfunc__carbon_thunk.Derived.Main(ptr noundef nonnull align 8 dereferenceable(12) %this1) // CHECK:STDOUT: ret void @@ -207,7 +207,7 @@ fn DoThing() { // CHECK:STDOUT: define internal void @_ZNK6Carbon7Derived10other_funcEv(ptr noundef nonnull align 8 dereferenceable(12) %this) unnamed_addr #4 align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !106 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !108 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @_Cother_func__carbon_thunk.Derived.Main(ptr noundef nonnull align 8 dereferenceable(12) %this1) // CHECK:STDOUT: ret void @@ -220,7 +220,7 @@ fn DoThing() { // CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !4 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @_ZN11FurtherBaseC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %this1) #2 -// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 16) (i8, ptr @_ZTV4Base, i64 16), ptr %this1, align 8, !tbaa !102 +// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 16) (i8, ptr @_ZTV4Base, i64 16), ptr %this1, align 8, !tbaa !104 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -228,9 +228,9 @@ fn DoThing() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN11FurtherBaseC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %this) unnamed_addr #7 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !104 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !106 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 -// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 8) (i8, ptr @_ZTV11FurtherBase, i64 16), ptr %this1, align 8, !tbaa !102 +// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 8) (i8, ptr @_ZTV11FurtherBase, i64 16), ptr %this1, align 8, !tbaa !104 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -246,9 +246,9 @@ fn DoThing() { // CHECK:STDOUT: attributes #6 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!38} -// CHECK:STDOUT: !llvm.module.flags = !{!111, !112, !113, !7, !8} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!115} +// CHECK:STDOUT: !llvm.dbg.cu = !{!40} +// CHECK:STDOUT: !llvm.module.flags = !{!113, !114, !115, !7, !8} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!117} // CHECK:STDOUT: // CHECK:STDOUT: !0 = !{!"Simple C++ TBAA"} // CHECK:STDOUT: !1 = !{!"omnipotent char", !0, i64 0} @@ -257,74 +257,74 @@ fn DoThing() { // CHECK:STDOUT: !4 = !{!3, !3, i64 0} // CHECK:STDOUT: !7 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !8 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !37 = !DIFile(filename: "dynamic_base_from_cpp.carbon", directory: "") -// CHECK:STDOUT: !38 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !37, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !40 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !41 = !{null, !40} -// CHECK:STDOUT: !42 = !DISubroutineType(types: !41) -// CHECK:STDOUT: !43 = !{null} +// CHECK:STDOUT: !39 = !DIFile(filename: "dynamic_base_from_cpp.carbon", directory: "") +// CHECK:STDOUT: !40 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !39, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !43 = !{null, !42} // CHECK:STDOUT: !44 = !DISubroutineType(types: !43) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "other_func", linkageName: "_Cother_func.Derived.Main", scope: null, file: !37, line: 24, type: !42, spFlags: DISPFlagDefinition, unit: !38, retainedNodes: !49) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !40) -// CHECK:STDOUT: !48 = !DILocation(line: 24, column: 3, scope: !45) -// CHECK:STDOUT: !49 = !{!46} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "func", linkageName: "_Cfunc.Derived.Main", scope: null, file: !37, line: 26, type: !42, spFlags: DISPFlagDefinition, unit: !38, retainedNodes: !54) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !40) -// CHECK:STDOUT: !53 = !DILocation(line: 26, column: 3, scope: !50) -// CHECK:STDOUT: !54 = !{!51} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "func", linkageName: "_Cfunc:thunk:Base.Cpp:Derived.Main", scope: null, file: !37, line: 26, type: !42, spFlags: DISPFlagDefinition, unit: !38, retainedNodes: !59) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !40) -// CHECK:STDOUT: !58 = !DILocation(line: 26, column: 3, scope: !55) -// CHECK:STDOUT: !59 = !{!56} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.Derived.Main", scope: null, file: !37, line: 22, type: !42, spFlags: DISPFlagDefinition, unit: !38, retainedNodes: !63) -// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !40) -// CHECK:STDOUT: !62 = !DILocation(line: 22, column: 1, scope: !60) -// CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.352b8f386f44a614:core.Destroy.Core", scope: null, file: !37, line: 22, type: !42, spFlags: DISPFlagDefinition, unit: !38, retainedNodes: !67) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !40) -// CHECK:STDOUT: !66 = !DILocation(line: 22, column: 1, scope: !64) -// CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0a0b9df20a60c6f6:core.Destroy.Core", scope: null, file: !37, line: 22, type: !42, spFlags: DISPFlagDefinition, unit: !38, retainedNodes: !71) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !40) -// CHECK:STDOUT: !70 = !DILocation(line: 22, column: 1, scope: !68) -// CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0a0b9df20a60c6f6:core.Destroy.Core", scope: null, file: !37, line: 22, type: !42, spFlags: DISPFlagDefinition, unit: !38, retainedNodes: !75) -// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !40) -// CHECK:STDOUT: !74 = !DILocation(line: 22, column: 1, scope: !72) -// CHECK:STDOUT: !75 = !{!73} -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !37, line: 22, type: !42, spFlags: DISPFlagDefinition, unit: !38, retainedNodes: !79) -// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !40) -// CHECK:STDOUT: !78 = !DILocation(line: 22, column: 1, scope: !76) -// CHECK:STDOUT: !79 = !{!77} -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !37, line: 22, type: !42, spFlags: DISPFlagDefinition, unit: !38, retainedNodes: !83) -// CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !40) -// CHECK:STDOUT: !82 = !DILocation(line: 22, column: 1, scope: !80) -// CHECK:STDOUT: !83 = !{!81} -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "func__carbon_thunk", linkageName: "_Cfunc__carbon_thunk.Derived.Main", scope: null, file: !37, line: 26, type: !42, spFlags: DISPFlagDefinition, unit: !38, retainedNodes: !87) -// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !40) -// CHECK:STDOUT: !86 = !DILocation(line: 26, column: 3, scope: !84) -// CHECK:STDOUT: !87 = !{!85} -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "other_func__carbon_thunk", linkageName: "_Cother_func__carbon_thunk.Derived.Main", scope: null, file: !37, line: 24, type: !42, spFlags: DISPFlagDefinition, unit: !38, retainedNodes: !91) -// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !40) -// CHECK:STDOUT: !90 = !DILocation(line: 24, column: 3, scope: !88) -// CHECK:STDOUT: !91 = !{!89} -// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "DoThing", linkageName: "_CDoThing.Main", scope: null, file: !37, line: 30, type: !44, spFlags: DISPFlagDefinition, unit: !38) -// CHECK:STDOUT: !93 = !DILocation(line: 31, column: 3, scope: !92) -// CHECK:STDOUT: !94 = !DILocation(line: 31, column: 20, scope: !92) -// CHECK:STDOUT: !95 = !DILocation(line: 31, column: 29, scope: !92) -// CHECK:STDOUT: !98 = !DILocation(line: 32, column: 11, scope: !92) -// CHECK:STDOUT: !99 = !DILocation(line: 32, column: 3, scope: !92) -// CHECK:STDOUT: !100 = !DILocation(line: 30, column: 1, scope: !92) -// CHECK:STDOUT: !101 = !{!"vtable pointer", !0, i64 0} -// CHECK:STDOUT: !102 = !{!101, !101, i64 0} -// CHECK:STDOUT: !103 = !{!"p1 _ZTS11FurtherBase", !2, i64 0} +// CHECK:STDOUT: !45 = !{null} +// CHECK:STDOUT: !46 = !DISubroutineType(types: !45) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "other_func", linkageName: "_Cother_func.Derived.Main", scope: null, file: !39, line: 24, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !51) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !42) +// CHECK:STDOUT: !50 = !DILocation(line: 24, column: 3, scope: !47) +// CHECK:STDOUT: !51 = !{!48} +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "func", linkageName: "_Cfunc.Derived.Main", scope: null, file: !39, line: 26, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !56) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !42) +// CHECK:STDOUT: !55 = !DILocation(line: 26, column: 3, scope: !52) +// CHECK:STDOUT: !56 = !{!53} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "func", linkageName: "_Cfunc:thunk:Base.Cpp:Derived.Main", scope: null, file: !39, line: 26, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !61) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !42) +// CHECK:STDOUT: !60 = !DILocation(line: 26, column: 3, scope: !57) +// CHECK:STDOUT: !61 = !{!58} +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.Derived.Main", scope: null, file: !39, line: 22, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !65) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !42) +// CHECK:STDOUT: !64 = !DILocation(line: 22, column: 1, scope: !62) +// CHECK:STDOUT: !65 = !{!63} +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.352b8f386f44a614:core.Destroy.Core", scope: null, file: !39, line: 22, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !69) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !42) +// CHECK:STDOUT: !68 = !DILocation(line: 22, column: 1, scope: !66) +// CHECK:STDOUT: !69 = !{!67} +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0a0b9df20a60c6f6:core.Destroy.Core", scope: null, file: !39, line: 22, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !73) +// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !42) +// CHECK:STDOUT: !72 = !DILocation(line: 22, column: 1, scope: !70) +// CHECK:STDOUT: !73 = !{!71} +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0a0b9df20a60c6f6:core.Destroy.Core", scope: null, file: !39, line: 22, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !77) +// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !42) +// CHECK:STDOUT: !76 = !DILocation(line: 22, column: 1, scope: !74) +// CHECK:STDOUT: !77 = !{!75} +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !39, line: 22, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !81) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !42) +// CHECK:STDOUT: !80 = !DILocation(line: 22, column: 1, scope: !78) +// CHECK:STDOUT: !81 = !{!79} +// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !39, line: 22, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !85) +// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !42) +// CHECK:STDOUT: !84 = !DILocation(line: 22, column: 1, scope: !82) +// CHECK:STDOUT: !85 = !{!83} +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "func__carbon_thunk", linkageName: "_Cfunc__carbon_thunk.Derived.Main", scope: null, file: !39, line: 26, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !89) +// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !42) +// CHECK:STDOUT: !88 = !DILocation(line: 26, column: 3, scope: !86) +// CHECK:STDOUT: !89 = !{!87} +// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "other_func__carbon_thunk", linkageName: "_Cother_func__carbon_thunk.Derived.Main", scope: null, file: !39, line: 24, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !93) +// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !42) +// CHECK:STDOUT: !92 = !DILocation(line: 24, column: 3, scope: !90) +// CHECK:STDOUT: !93 = !{!91} +// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "DoThing", linkageName: "_CDoThing.Main", scope: null, file: !39, line: 30, type: !46, spFlags: DISPFlagDefinition, unit: !40) +// CHECK:STDOUT: !95 = !DILocation(line: 31, column: 3, scope: !94) +// CHECK:STDOUT: !96 = !DILocation(line: 31, column: 20, scope: !94) +// CHECK:STDOUT: !97 = !DILocation(line: 31, column: 29, scope: !94) +// CHECK:STDOUT: !100 = !DILocation(line: 32, column: 11, scope: !94) +// CHECK:STDOUT: !101 = !DILocation(line: 32, column: 3, scope: !94) +// CHECK:STDOUT: !102 = !DILocation(line: 30, column: 1, scope: !94) +// CHECK:STDOUT: !103 = !{!"vtable pointer", !0, i64 0} // CHECK:STDOUT: !104 = !{!103, !103, i64 0} -// CHECK:STDOUT: !105 = !{!"p1 _ZTSN6Carbon7DerivedE", !2, i64 0} +// CHECK:STDOUT: !105 = !{!"p1 _ZTS11FurtherBase", !2, i64 0} // CHECK:STDOUT: !106 = !{!105, !105, i64 0} -// CHECK:STDOUT: !108 = !{!"int", !1, i64 0} -// CHECK:STDOUT: !111 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !112 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !113 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !114 = !{!"__libc_errno", !108, i64 0} -// CHECK:STDOUT: !115 = !{!114, !108, i64 0} +// CHECK:STDOUT: !107 = !{!"p1 _ZTSN6Carbon7DerivedE", !2, i64 0} +// CHECK:STDOUT: !108 = !{!107, !107, i64 0} +// CHECK:STDOUT: !110 = !{!"int", !1, i64 0} +// CHECK:STDOUT: !113 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !114 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !115 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !116 = !{!"__libc_errno", !110, i64 0} +// CHECK:STDOUT: !117 = !{!116, !110, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/function/import/parameters.carbon b/toolchain/lower/testdata/interop/cpp/function/import/parameters.carbon index 691bc37f3bab..ea385952e6a0 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/parameters.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/parameters.carbon @@ -122,23 +122,23 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }] // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMyF.Main() #0 !dbg !61 { +// CHECK:STDOUT: define void @_CMyF.Main() #0 !dbg !63 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_19.3.temp = alloca i8, align 1, !dbg !62 -// CHECK:STDOUT: %.loc7_22.3.temp = alloca i16, align 2, !dbg !63 -// CHECK:STDOUT: %.loc9_21.3.temp = alloca i8, align 1, !dbg !65 -// CHECK:STDOUT: %.loc9_24.3.temp = alloca i16, align 2, !dbg !66 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_19.3.temp), !dbg !62 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_22.3.temp), !dbg !63 -// CHECK:STDOUT: call void @_Z11pass_signedasil.carbon_thunk.____(ptr @int_1.f1e, ptr @int_2.5c2, i32 3, i64 4), !dbg !64 -// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr @int_2.5c2), !dbg !63 -// CHECK:STDOUT: call void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr @int_1.f1e), !dbg !62 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_21.3.temp), !dbg !65 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_24.3.temp), !dbg !66 -// CHECK:STDOUT: call void @_Z13pass_unsignedhtjm.carbon_thunk.____(ptr @int_1.067, ptr @int_2.ec3, i32 3, i64 4), !dbg !67 -// CHECK:STDOUT: call void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr @int_2.ec3), !dbg !66 -// CHECK:STDOUT: call void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr @int_1.067), !dbg !65 -// CHECK:STDOUT: ret void, !dbg !68 +// CHECK:STDOUT: %.loc7_19.3.temp = alloca i8, align 1, !dbg !64 +// CHECK:STDOUT: %.loc7_22.3.temp = alloca i16, align 2, !dbg !65 +// CHECK:STDOUT: %.loc9_21.3.temp = alloca i8, align 1, !dbg !67 +// CHECK:STDOUT: %.loc9_24.3.temp = alloca i16, align 2, !dbg !68 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_19.3.temp), !dbg !64 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_22.3.temp), !dbg !65 +// CHECK:STDOUT: call void @_Z11pass_signedasil.carbon_thunk.____(ptr @int_1.f1e, ptr @int_2.5c2, i32 3, i64 4), !dbg !66 +// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr @int_2.5c2), !dbg !65 +// CHECK:STDOUT: call void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr @int_1.f1e), !dbg !64 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_21.3.temp), !dbg !67 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_24.3.temp), !dbg !68 +// CHECK:STDOUT: call void @_Z13pass_unsignedhtjm.carbon_thunk.____(ptr @int_1.067, ptr @int_2.ec3, i32 3, i64 4), !dbg !69 +// CHECK:STDOUT: call void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr @int_2.ec3), !dbg !68 +// CHECK:STDOUT: call void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr @int_1.067), !dbg !67 +// CHECK:STDOUT: ret void, !dbg !70 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -148,30 +148,30 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: %.addr1 = alloca ptr, align 8 // CHECK:STDOUT: %.addr2 = alloca i32, align 4 // CHECK:STDOUT: %.addr3 = alloca i64, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !108 -// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !111 -// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !113 -// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !115 -// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !108 -// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !116 -// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !111 -// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !117 -// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !113 -// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !115 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !110 +// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !113 +// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !115 +// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !117 +// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !110 +// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !118 +// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !113 +// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !119 +// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !115 +// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !117 // CHECK:STDOUT: call void @_Z11pass_signedasil(i8 noundef signext %5, i16 noundef signext %7, i32 noundef %8, i64 noundef %9) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !69 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !71 +// CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !73 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !75 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !75 +// CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -181,70 +181,70 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: %.addr1 = alloca ptr, align 8 // CHECK:STDOUT: %.addr2 = alloca i32, align 4 // CHECK:STDOUT: %.addr3 = alloca i64, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !108 -// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !111 -// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !113 -// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !115 -// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !108 -// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !116 -// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !111 -// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !117 -// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !113 -// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !115 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !110 +// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !113 +// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !115 +// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !117 +// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !110 +// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !118 +// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !113 +// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !119 +// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !115 +// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !117 // CHECK:STDOUT: call void @_Z13pass_unsignedhtjm(i8 noundef zeroext %5, i16 noundef zeroext %7, i32 noundef %8, i64 noundef %9) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self) #0 !dbg !77 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self) #0 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !79 +// CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !81 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !83 +// CHECK:STDOUT: ret void, !dbg !85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare i16 @_CMakeShort.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassShort.Main(i16 %a, ptr %b) #0 !dbg !85 { +// CHECK:STDOUT: define void @_CPassShort.Main(i16 %a, ptr %b) #0 !dbg !87 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17_18.1.temp = alloca i16, align 2, !dbg !90 -// CHECK:STDOUT: %.loc18_18.3.temp = alloca i16, align 2, !dbg !93 -// CHECK:STDOUT: %.loc19_18.2.temp = alloca i16, align 2, !dbg !95 -// CHECK:STDOUT: %.loc20_28.3.temp = alloca i16, align 2, !dbg !97 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_18.1.temp), !dbg !90 -// CHECK:STDOUT: store i16 %a, ptr %.loc17_18.1.temp, align 2, !dbg !90 -// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc17_18.1.temp), !dbg !91 -// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc17_18.1.temp), !dbg !90 -// CHECK:STDOUT: %.loc18_18.2 = load i16, ptr %b, align 2, !dbg !93 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_18.3.temp), !dbg !93 -// CHECK:STDOUT: store i16 %.loc18_18.2, ptr %.loc18_18.3.temp, align 2, !dbg !93 -// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc18_18.3.temp), !dbg !94 -// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc18_18.3.temp), !dbg !93 -// CHECK:STDOUT: %.loc19_18.1 = load i16, ptr @_Cc.Main, align 2, !dbg !95 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_18.2.temp), !dbg !95 -// CHECK:STDOUT: store i16 %.loc19_18.1, ptr %.loc19_18.2.temp, align 2, !dbg !95 -// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc19_18.2.temp), !dbg !96 -// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc19_18.2.temp), !dbg !95 -// CHECK:STDOUT: %MakeShort.call = call i16 @_CMakeShort.Main(), !dbg !97 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_28.3.temp), !dbg !97 -// CHECK:STDOUT: store i16 %MakeShort.call, ptr %.loc20_28.3.temp, align 2, !dbg !97 -// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc20_28.3.temp), !dbg !98 -// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc20_28.3.temp), !dbg !97 -// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: %.loc17_18.1.temp = alloca i16, align 2, !dbg !92 +// CHECK:STDOUT: %.loc18_18.3.temp = alloca i16, align 2, !dbg !95 +// CHECK:STDOUT: %.loc19_18.2.temp = alloca i16, align 2, !dbg !97 +// CHECK:STDOUT: %.loc20_28.3.temp = alloca i16, align 2, !dbg !99 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_18.1.temp), !dbg !92 +// CHECK:STDOUT: store i16 %a, ptr %.loc17_18.1.temp, align 2, !dbg !92 +// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc17_18.1.temp), !dbg !93 +// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc17_18.1.temp), !dbg !92 +// CHECK:STDOUT: %.loc18_18.2 = load i16, ptr %b, align 2, !dbg !95 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_18.3.temp), !dbg !95 +// CHECK:STDOUT: store i16 %.loc18_18.2, ptr %.loc18_18.3.temp, align 2, !dbg !95 +// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc18_18.3.temp), !dbg !96 +// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc18_18.3.temp), !dbg !95 +// CHECK:STDOUT: %.loc19_18.1 = load i16, ptr @_Cc.Main, align 2, !dbg !97 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_18.2.temp), !dbg !97 +// CHECK:STDOUT: store i16 %.loc19_18.1, ptr %.loc19_18.2.temp, align 2, !dbg !97 +// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc19_18.2.temp), !dbg !98 +// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc19_18.2.temp), !dbg !97 +// CHECK:STDOUT: %MakeShort.call = call i16 @_CMakeShort.Main(), !dbg !99 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_28.3.temp), !dbg !99 +// CHECK:STDOUT: store i16 %MakeShort.call, ptr %.loc20_28.3.temp, align 2, !dbg !99 +// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc20_28.3.temp), !dbg !100 +// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc20_28.3.temp), !dbg !99 +// CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z10pass_shorts.carbon_thunk._(ptr noundef %0) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !111 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !111 -// CHECK:STDOUT: %2 = load i16, ptr %1, align 2, !tbaa !117 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !113 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !113 +// CHECK:STDOUT: %2 = load i16, ptr %1, align 2, !tbaa !119 // CHECK:STDOUT: call void @_Z10pass_shorts(i16 noundef signext %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -253,10 +253,10 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #2 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !101 { +// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !103 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: store i16 poison, ptr @_Cc.Main, align 2, !dbg !102 -// CHECK:STDOUT: ret void, !dbg !103 +// CHECK:STDOUT: store i16 poison, ptr @_Cc.Main, align 2, !dbg !104 +// CHECK:STDOUT: ret void, !dbg !105 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z11pass_signedasil(i8 noundef signext, i16 noundef signext, i32 noundef, i64 noundef) #3 @@ -274,90 +274,90 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} -// CHECK:STDOUT: !llvm.module.flags = !{!118, !119, !120, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!122} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} +// CHECK:STDOUT: !llvm.module.flags = !{!120, !121, !122, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!124} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !8 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !32 = !DIFile(filename: "import_ints.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_signed) -// CHECK:STDOUT: !37 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) -// CHECK:STDOUT: !39 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !40 = !{null} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !45 = !{null, !37} -// CHECK:STDOUT: !46 = !DISubroutineType(types: !45) -// CHECK:STDOUT: !47 = !{null, !36} +// CHECK:STDOUT: !10 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !34 = !DIFile(filename: "import_ints.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !38 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_signed) +// CHECK:STDOUT: !39 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) +// CHECK:STDOUT: !41 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !42 = !{null} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !47 = !{null, !39} // CHECK:STDOUT: !48 = !DISubroutineType(types: !47) -// CHECK:STDOUT: !51 = !{null, !39} -// CHECK:STDOUT: !52 = !DISubroutineType(types: !51) -// CHECK:STDOUT: !53 = !{null, !8} +// CHECK:STDOUT: !49 = !{null, !38} +// CHECK:STDOUT: !50 = !DISubroutineType(types: !49) +// CHECK:STDOUT: !53 = !{null, !41} // CHECK:STDOUT: !54 = !DISubroutineType(types: !53) -// CHECK:STDOUT: !57 = !{null, !37, !42} -// CHECK:STDOUT: !58 = !DISubroutineType(types: !57) -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !32, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !62 = !DILocation(line: 7, column: 19, scope: !61) -// CHECK:STDOUT: !63 = !DILocation(line: 7, column: 22, scope: !61) -// CHECK:STDOUT: !64 = !DILocation(line: 7, column: 3, scope: !61) -// CHECK:STDOUT: !65 = !DILocation(line: 9, column: 21, scope: !61) -// CHECK:STDOUT: !66 = !DILocation(line: 9, column: 24, scope: !61) -// CHECK:STDOUT: !67 = !DILocation(line: 9, column: 3, scope: !61) -// CHECK:STDOUT: !68 = !DILocation(line: 6, column: 1, scope: !61) -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !32, line: 7, type: !46, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !72) -// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !37) -// CHECK:STDOUT: !71 = !DILocation(line: 7, column: 22, scope: !69) -// CHECK:STDOUT: !72 = !{!70} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4954785a8b134801:core.Destroy.Core", scope: null, file: !32, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !76) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !36) -// CHECK:STDOUT: !75 = !DILocation(line: 7, column: 19, scope: !73) -// CHECK:STDOUT: !76 = !{!74} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core", scope: null, file: !32, line: 9, type: !52, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !80) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !39) -// CHECK:STDOUT: !79 = !DILocation(line: 9, column: 24, scope: !77) -// CHECK:STDOUT: !80 = !{!78} -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.be60742f00557eec:core.Destroy.Core", scope: null, file: !32, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !84) -// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !8) -// CHECK:STDOUT: !83 = !DILocation(line: 9, column: 21, scope: !81) -// CHECK:STDOUT: !84 = !{!82} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "PassShort", linkageName: "_CPassShort.Main", scope: null, file: !32, line: 16, type: !58, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !100) -// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !37) -// CHECK:STDOUT: !87 = !DILocalVariable(arg: 2, scope: !85, type: !42) -// CHECK:STDOUT: !90 = !DILocation(line: 17, column: 18, scope: !85) -// CHECK:STDOUT: !91 = !DILocation(line: 17, column: 3, scope: !85) -// CHECK:STDOUT: !93 = !DILocation(line: 18, column: 18, scope: !85) -// CHECK:STDOUT: !94 = !DILocation(line: 18, column: 3, scope: !85) -// CHECK:STDOUT: !95 = !DILocation(line: 19, column: 18, scope: !85) -// CHECK:STDOUT: !96 = !DILocation(line: 19, column: 3, scope: !85) -// CHECK:STDOUT: !97 = !DILocation(line: 20, column: 18, scope: !85) -// CHECK:STDOUT: !98 = !DILocation(line: 20, column: 3, scope: !85) -// CHECK:STDOUT: !99 = !DILocation(line: 16, column: 1, scope: !85) -// CHECK:STDOUT: !100 = !{!86, !87} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !32, type: !41, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !102 = !DILocation(line: 14, column: 1, scope: !101) -// CHECK:STDOUT: !103 = !DILocation(line: 0, scope: !101) -// CHECK:STDOUT: !104 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !105 = !{!"omnipotent char", !104, i64 0} -// CHECK:STDOUT: !106 = !{!"any pointer", !105, i64 0} -// CHECK:STDOUT: !107 = !{!"p1 omnipotent char", !106, i64 0} -// CHECK:STDOUT: !108 = !{!107, !107, i64 0} -// CHECK:STDOUT: !109 = !{!"short", !105, i64 0} -// CHECK:STDOUT: !110 = !{!"p1 short", !106, i64 0} -// CHECK:STDOUT: !111 = !{!110, !110, i64 0} -// CHECK:STDOUT: !112 = !{!"int", !105, i64 0} +// CHECK:STDOUT: !55 = !{null, !10} +// CHECK:STDOUT: !56 = !DISubroutineType(types: !55) +// CHECK:STDOUT: !59 = !{null, !39, !44} +// CHECK:STDOUT: !60 = !DISubroutineType(types: !59) +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !34, line: 6, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !64 = !DILocation(line: 7, column: 19, scope: !63) +// CHECK:STDOUT: !65 = !DILocation(line: 7, column: 22, scope: !63) +// CHECK:STDOUT: !66 = !DILocation(line: 7, column: 3, scope: !63) +// CHECK:STDOUT: !67 = !DILocation(line: 9, column: 21, scope: !63) +// CHECK:STDOUT: !68 = !DILocation(line: 9, column: 24, scope: !63) +// CHECK:STDOUT: !69 = !DILocation(line: 9, column: 3, scope: !63) +// CHECK:STDOUT: !70 = !DILocation(line: 6, column: 1, scope: !63) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !34, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !74) +// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !39) +// CHECK:STDOUT: !73 = !DILocation(line: 7, column: 22, scope: !71) +// CHECK:STDOUT: !74 = !{!72} +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4954785a8b134801:core.Destroy.Core", scope: null, file: !34, line: 7, type: !50, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !78) +// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !38) +// CHECK:STDOUT: !77 = !DILocation(line: 7, column: 19, scope: !75) +// CHECK:STDOUT: !78 = !{!76} +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core", scope: null, file: !34, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !82) +// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !41) +// CHECK:STDOUT: !81 = !DILocation(line: 9, column: 24, scope: !79) +// CHECK:STDOUT: !82 = !{!80} +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.be60742f00557eec:core.Destroy.Core", scope: null, file: !34, line: 9, type: !56, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !86) +// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !10) +// CHECK:STDOUT: !85 = !DILocation(line: 9, column: 21, scope: !83) +// CHECK:STDOUT: !86 = !{!84} +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "PassShort", linkageName: "_CPassShort.Main", scope: null, file: !34, line: 16, type: !60, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !102) +// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !39) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 2, scope: !87, type: !44) +// CHECK:STDOUT: !92 = !DILocation(line: 17, column: 18, scope: !87) +// CHECK:STDOUT: !93 = !DILocation(line: 17, column: 3, scope: !87) +// CHECK:STDOUT: !95 = !DILocation(line: 18, column: 18, scope: !87) +// CHECK:STDOUT: !96 = !DILocation(line: 18, column: 3, scope: !87) +// CHECK:STDOUT: !97 = !DILocation(line: 19, column: 18, scope: !87) +// CHECK:STDOUT: !98 = !DILocation(line: 19, column: 3, scope: !87) +// CHECK:STDOUT: !99 = !DILocation(line: 20, column: 18, scope: !87) +// CHECK:STDOUT: !100 = !DILocation(line: 20, column: 3, scope: !87) +// CHECK:STDOUT: !101 = !DILocation(line: 16, column: 1, scope: !87) +// CHECK:STDOUT: !102 = !{!88, !89} +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !34, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !104 = !DILocation(line: 14, column: 1, scope: !103) +// CHECK:STDOUT: !105 = !DILocation(line: 0, scope: !103) +// CHECK:STDOUT: !106 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !107 = !{!"omnipotent char", !106, i64 0} +// CHECK:STDOUT: !108 = !{!"any pointer", !107, i64 0} +// CHECK:STDOUT: !109 = !{!"p1 omnipotent char", !108, i64 0} +// CHECK:STDOUT: !110 = !{!109, !109, i64 0} +// CHECK:STDOUT: !111 = !{!"short", !107, i64 0} +// CHECK:STDOUT: !112 = !{!"p1 short", !108, i64 0} // CHECK:STDOUT: !113 = !{!112, !112, i64 0} -// CHECK:STDOUT: !114 = !{!"long", !105, i64 0} +// CHECK:STDOUT: !114 = !{!"int", !107, i64 0} // CHECK:STDOUT: !115 = !{!114, !114, i64 0} -// CHECK:STDOUT: !116 = !{!105, !105, i64 0} -// CHECK:STDOUT: !117 = !{!109, !109, i64 0} -// CHECK:STDOUT: !118 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !119 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !120 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !121 = !{!"__libc_errno", !112, i64 0} -// CHECK:STDOUT: !122 = !{!121, !112, i64 0} +// CHECK:STDOUT: !116 = !{!"long", !107, i64 0} +// CHECK:STDOUT: !117 = !{!116, !116, i64 0} +// CHECK:STDOUT: !118 = !{!107, !107, i64 0} +// CHECK:STDOUT: !119 = !{!111, !111, i64 0} +// CHECK:STDOUT: !120 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !121 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !122 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !123 = !{!"__libc_errno", !114, i64 0} +// CHECK:STDOUT: !124 = !{!123, !114, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'import_struct.carbon' @@ -368,36 +368,36 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: %struct.X = type { i32, i32, i32 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest.Main() #0 !dbg !127 { +// CHECK:STDOUT: define void @_CTest.Main() #0 !dbg !129 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca [12 x i8], align 4, !dbg !128 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !128 -// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr %x.var), !dbg !128 -// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 0, !dbg !130 -// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !130 -// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 4, !dbg !131 -// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !131 -// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 8, !dbg !132 -// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !132 -// CHECK:STDOUT: call void @_Z11pass_struct1X.carbon_thunk._(ptr %x.var), !dbg !134 -// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %x.var), !dbg !128 -// CHECK:STDOUT: ret void, !dbg !135 +// CHECK:STDOUT: %x.var = alloca [12 x i8], align 4, !dbg !130 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !130 +// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr %x.var), !dbg !130 +// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 0, !dbg !132 +// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !132 +// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 4, !dbg !133 +// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !133 +// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 8, !dbg !134 +// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !134 +// CHECK:STDOUT: call void @_Z11pass_struct1X.carbon_thunk._(ptr %x.var), !dbg !136 +// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %x.var), !dbg !130 +// CHECK:STDOUT: ret void, !dbg !137 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN1XC1Ev.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !149 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !149 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !151 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !151 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr sret([12 x i8]) %return) #2 !dbg !137 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr sret([12 x i8]) %return) #2 !dbg !139 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN1XC1Ev.carbon_thunk.(ptr %return), !dbg !138 -// CHECK:STDOUT: ret void, !dbg !138 +// CHECK:STDOUT: call void @_ZN1XC1Ev.carbon_thunk.(ptr %return), !dbg !140 +// CHECK:STDOUT: ret void, !dbg !140 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -406,9 +406,9 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %struct.X, align 4 // CHECK:STDOUT: %agg.tmp.coerce = alloca { i64, i32 }, align 4 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !149 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !149 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %1, i64 12, i1 false), !tbaa.struct !151 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !151 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !151 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %1, i64 12, i1 false), !tbaa.struct !153 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp.coerce, ptr align 4 %agg.tmp, i64 12, i1 false) // CHECK:STDOUT: %2 = getelementptr inbounds nuw { i64, i32 }, ptr %agg.tmp.coerce, i32 0, i32 0 // CHECK:STDOUT: %3 = load i64, ptr %2, align 4 @@ -419,18 +419,18 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %self) #0 !dbg !139 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %self) #0 !dbg !141 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !141 +// CHECK:STDOUT: ret void, !dbg !143 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #4 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr sret([12 x i8]) %return) #0 !dbg !143 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr %return), !dbg !146 -// CHECK:STDOUT: ret void, !dbg !147 +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr sret([12 x i8]) %return) #0 !dbg !145 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr %return), !dbg !148 +// CHECK:STDOUT: ret void, !dbg !149 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z11pass_struct1X(i64, i32) #5 @@ -448,52 +448,52 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!124} -// CHECK:STDOUT: !llvm.module.flags = !{!118, !119, !120, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!122} +// CHECK:STDOUT: !llvm.dbg.cu = !{!126} +// CHECK:STDOUT: !llvm.module.flags = !{!120, !121, !122, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!124} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") -// CHECK:STDOUT: !40 = !{null} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !59 = !{null, !42} -// CHECK:STDOUT: !60 = !DISubroutineType(types: !59) -// CHECK:STDOUT: !104 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !105 = !{!"omnipotent char", !104, i64 0} -// CHECK:STDOUT: !106 = !{!"any pointer", !105, i64 0} -// CHECK:STDOUT: !112 = !{!"int", !105, i64 0} -// CHECK:STDOUT: !113 = !{!112, !112, i64 0} -// CHECK:STDOUT: !118 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !119 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !120 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !121 = !{!"__libc_errno", !112, i64 0} -// CHECK:STDOUT: !122 = !{!121, !112, i64 0} -// CHECK:STDOUT: !123 = !DIFile(filename: "import_struct.carbon", directory: "") -// CHECK:STDOUT: !124 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !123, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !125 = !{!42} -// CHECK:STDOUT: !126 = !DISubroutineType(types: !125) -// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !123, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !124) -// CHECK:STDOUT: !128 = !DILocation(line: 7, column: 3, scope: !127) -// CHECK:STDOUT: !130 = !DILocation(line: 8, column: 3, scope: !127) -// CHECK:STDOUT: !131 = !DILocation(line: 9, column: 3, scope: !127) -// CHECK:STDOUT: !132 = !DILocation(line: 10, column: 3, scope: !127) -// CHECK:STDOUT: !134 = !DILocation(line: 11, column: 3, scope: !127) -// CHECK:STDOUT: !135 = !DILocation(line: 6, column: 1, scope: !127) -// CHECK:STDOUT: !136 = !DIFile(filename: "./struct.h", directory: "") -// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp", scope: null, file: !136, line: 2, type: !126, spFlags: DISPFlagDefinition, unit: !124) -// CHECK:STDOUT: !138 = !DILocation(line: 2, column: 8, scope: !137) -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core", scope: null, file: !123, line: 7, type: !60, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !142) -// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !42) -// CHECK:STDOUT: !141 = !DILocation(line: 7, column: 3, scope: !139) -// CHECK:STDOUT: !142 = !{!140} -// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1", scope: null, file: !26, line: 9, type: !126, spFlags: DISPFlagDefinition, unit: !124) -// CHECK:STDOUT: !146 = !DILocation(line: 9, column: 28, scope: !143) -// CHECK:STDOUT: !147 = !DILocation(line: 9, column: 21, scope: !143) -// CHECK:STDOUT: !148 = !{!"p1 _ZTS1X", !106, i64 0} -// CHECK:STDOUT: !149 = !{!148, !148, i64 0} -// CHECK:STDOUT: !151 = !{i64 0, i64 4, !113, i64 4, i64 4, !113, i64 8, i64 4, !113} +// CHECK:STDOUT: !28 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") +// CHECK:STDOUT: !42 = !{null} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !61 = !{null, !44} +// CHECK:STDOUT: !62 = !DISubroutineType(types: !61) +// CHECK:STDOUT: !106 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !107 = !{!"omnipotent char", !106, i64 0} +// CHECK:STDOUT: !108 = !{!"any pointer", !107, i64 0} +// CHECK:STDOUT: !114 = !{!"int", !107, i64 0} +// CHECK:STDOUT: !115 = !{!114, !114, i64 0} +// CHECK:STDOUT: !120 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !121 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !122 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !123 = !{!"__libc_errno", !114, i64 0} +// CHECK:STDOUT: !124 = !{!123, !114, i64 0} +// CHECK:STDOUT: !125 = !DIFile(filename: "import_struct.carbon", directory: "") +// CHECK:STDOUT: !126 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !125, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !127 = !{!44} +// CHECK:STDOUT: !128 = !DISubroutineType(types: !127) +// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !125, line: 6, type: !43, spFlags: DISPFlagDefinition, unit: !126) +// CHECK:STDOUT: !130 = !DILocation(line: 7, column: 3, scope: !129) +// CHECK:STDOUT: !132 = !DILocation(line: 8, column: 3, scope: !129) +// CHECK:STDOUT: !133 = !DILocation(line: 9, column: 3, scope: !129) +// CHECK:STDOUT: !134 = !DILocation(line: 10, column: 3, scope: !129) +// CHECK:STDOUT: !136 = !DILocation(line: 11, column: 3, scope: !129) +// CHECK:STDOUT: !137 = !DILocation(line: 6, column: 1, scope: !129) +// CHECK:STDOUT: !138 = !DIFile(filename: "./struct.h", directory: "") +// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp", scope: null, file: !138, line: 2, type: !128, spFlags: DISPFlagDefinition, unit: !126) +// CHECK:STDOUT: !140 = !DILocation(line: 2, column: 8, scope: !139) +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core", scope: null, file: !125, line: 7, type: !62, spFlags: DISPFlagDefinition, unit: !126, retainedNodes: !144) +// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !44) +// CHECK:STDOUT: !143 = !DILocation(line: 7, column: 3, scope: !141) +// CHECK:STDOUT: !144 = !{!142} +// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1", scope: null, file: !28, line: 9, type: !128, spFlags: DISPFlagDefinition, unit: !126) +// CHECK:STDOUT: !148 = !DILocation(line: 9, column: 28, scope: !145) +// CHECK:STDOUT: !149 = !DILocation(line: 9, column: 21, scope: !145) +// CHECK:STDOUT: !150 = !{!"p1 _ZTS1X", !108, i64 0} +// CHECK:STDOUT: !151 = !{!150, !150, i64 0} +// CHECK:STDOUT: !153 = !{i64 0, i64 4, !115, i64 4, i64 4, !115, i64 8, i64 4, !115} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'import_class_with_nontrivial_copy.carbon' @@ -504,19 +504,19 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: %class.Y = type { i32, i32, i32 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassRefExpr.Main() #0 !dbg !154 { +// CHECK:STDOUT: define void @_CPassRefExpr.Main() #0 !dbg !156 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %y.var = alloca [12 x i8], align 4, !dbg !155 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !155 -// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 0, !dbg !157 -// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !157 -// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 4, !dbg !158 -// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !158 -// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 8, !dbg !159 -// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !159 -// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y.var), !dbg !161 -// CHECK:STDOUT: call void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %y.var), !dbg !155 -// CHECK:STDOUT: ret void, !dbg !162 +// CHECK:STDOUT: %y.var = alloca [12 x i8], align 4, !dbg !157 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !157 +// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 0, !dbg !159 +// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !159 +// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 4, !dbg !160 +// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !160 +// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 8, !dbg !161 +// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !161 +// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y.var), !dbg !163 +// CHECK:STDOUT: call void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %y.var), !dbg !157 +// CHECK:STDOUT: ret void, !dbg !164 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -524,37 +524,37 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %class.Y, align 4 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !179 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !179 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !181 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !181 // CHECK:STDOUT: call void @_ZN1YC1ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %agg.tmp, ptr noundef nonnull align 4 dereferenceable(12) %1) // CHECK:STDOUT: call void @_Z11pass_struct1Y(ptr nofreeobj noundef align 4 dead_on_return dereferenceable(12) %agg.tmp) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %self) #0 !dbg !163 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %self) #0 !dbg !165 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !165 +// CHECK:STDOUT: ret void, !dbg !167 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CMake.Main(ptr sret([12 x i8])) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassInitExpr.Main() #0 !dbg !167 { +// CHECK:STDOUT: define void @_CPassInitExpr.Main() #0 !dbg !169 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17_24.1.temp = alloca [12 x i8], align 4, !dbg !168 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_24.1.temp), !dbg !168 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.loc17_24.1.temp), !dbg !168 -// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %.loc17_24.1.temp), !dbg !169 -// CHECK:STDOUT: call void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %.loc17_24.1.temp), !dbg !168 -// CHECK:STDOUT: ret void, !dbg !170 +// CHECK:STDOUT: %.loc17_24.1.temp = alloca [12 x i8], align 4, !dbg !170 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_24.1.temp), !dbg !170 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.loc17_24.1.temp), !dbg !170 +// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %.loc17_24.1.temp), !dbg !171 +// CHECK:STDOUT: call void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %.loc17_24.1.temp), !dbg !170 +// CHECK:STDOUT: ret void, !dbg !172 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassValueExpr.Main(ptr %y) #0 !dbg !171 { +// CHECK:STDOUT: define void @_CPassValueExpr.Main(ptr %y) #0 !dbg !173 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y), !dbg !175 -// CHECK:STDOUT: ret void, !dbg !176 +// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y), !dbg !177 +// CHECK:STDOUT: ret void, !dbg !178 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -572,48 +572,48 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!153} -// CHECK:STDOUT: !llvm.module.flags = !{!118, !119, !120, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!122} +// CHECK:STDOUT: !llvm.dbg.cu = !{!155} +// CHECK:STDOUT: !llvm.module.flags = !{!120, !121, !122, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!124} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !40 = !{null} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !59 = !{null, !42} -// CHECK:STDOUT: !60 = !DISubroutineType(types: !59) -// CHECK:STDOUT: !104 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !105 = !{!"omnipotent char", !104, i64 0} -// CHECK:STDOUT: !106 = !{!"any pointer", !105, i64 0} -// CHECK:STDOUT: !112 = !{!"int", !105, i64 0} -// CHECK:STDOUT: !118 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !119 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !120 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !121 = !{!"__libc_errno", !112, i64 0} -// CHECK:STDOUT: !122 = !{!121, !112, i64 0} -// CHECK:STDOUT: !152 = !DIFile(filename: "import_class_with_nontrivial_copy.carbon", directory: "") -// CHECK:STDOUT: !153 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !152, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !154 = distinct !DISubprogram(name: "PassRefExpr", linkageName: "_CPassRefExpr.Main", scope: null, file: !152, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !153) -// CHECK:STDOUT: !155 = !DILocation(line: 7, column: 3, scope: !154) -// CHECK:STDOUT: !157 = !DILocation(line: 8, column: 3, scope: !154) -// CHECK:STDOUT: !158 = !DILocation(line: 9, column: 3, scope: !154) -// CHECK:STDOUT: !159 = !DILocation(line: 10, column: 3, scope: !154) -// CHECK:STDOUT: !161 = !DILocation(line: 11, column: 3, scope: !154) -// CHECK:STDOUT: !162 = !DILocation(line: 6, column: 1, scope: !154) -// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core", scope: null, file: !152, line: 7, type: !60, spFlags: DISPFlagDefinition, unit: !153, retainedNodes: !166) -// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !42) -// CHECK:STDOUT: !165 = !DILocation(line: 7, column: 3, scope: !163) -// CHECK:STDOUT: !166 = !{!164} -// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "PassInitExpr", linkageName: "_CPassInitExpr.Main", scope: null, file: !152, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !153) -// CHECK:STDOUT: !168 = !DILocation(line: 17, column: 19, scope: !167) -// CHECK:STDOUT: !169 = !DILocation(line: 17, column: 3, scope: !167) -// CHECK:STDOUT: !170 = !DILocation(line: 16, column: 1, scope: !167) -// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "PassValueExpr", linkageName: "_CPassValueExpr.Main", scope: null, file: !152, line: 20, type: !60, spFlags: DISPFlagDefinition, unit: !153, retainedNodes: !177) -// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !42) -// CHECK:STDOUT: !175 = !DILocation(line: 21, column: 3, scope: !171) -// CHECK:STDOUT: !176 = !DILocation(line: 20, column: 1, scope: !171) -// CHECK:STDOUT: !177 = !{!172} -// CHECK:STDOUT: !178 = !{!"p1 _ZTS1Y", !106, i64 0} -// CHECK:STDOUT: !179 = !{!178, !178, i64 0} +// CHECK:STDOUT: !42 = !{null} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !61 = !{null, !44} +// CHECK:STDOUT: !62 = !DISubroutineType(types: !61) +// CHECK:STDOUT: !106 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !107 = !{!"omnipotent char", !106, i64 0} +// CHECK:STDOUT: !108 = !{!"any pointer", !107, i64 0} +// CHECK:STDOUT: !114 = !{!"int", !107, i64 0} +// CHECK:STDOUT: !120 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !121 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !122 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !123 = !{!"__libc_errno", !114, i64 0} +// CHECK:STDOUT: !124 = !{!123, !114, i64 0} +// CHECK:STDOUT: !154 = !DIFile(filename: "import_class_with_nontrivial_copy.carbon", directory: "") +// CHECK:STDOUT: !155 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !154, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "PassRefExpr", linkageName: "_CPassRefExpr.Main", scope: null, file: !154, line: 6, type: !43, spFlags: DISPFlagDefinition, unit: !155) +// CHECK:STDOUT: !157 = !DILocation(line: 7, column: 3, scope: !156) +// CHECK:STDOUT: !159 = !DILocation(line: 8, column: 3, scope: !156) +// CHECK:STDOUT: !160 = !DILocation(line: 9, column: 3, scope: !156) +// CHECK:STDOUT: !161 = !DILocation(line: 10, column: 3, scope: !156) +// CHECK:STDOUT: !163 = !DILocation(line: 11, column: 3, scope: !156) +// CHECK:STDOUT: !164 = !DILocation(line: 6, column: 1, scope: !156) +// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core", scope: null, file: !154, line: 7, type: !62, spFlags: DISPFlagDefinition, unit: !155, retainedNodes: !168) +// CHECK:STDOUT: !166 = !DILocalVariable(arg: 1, scope: !165, type: !44) +// CHECK:STDOUT: !167 = !DILocation(line: 7, column: 3, scope: !165) +// CHECK:STDOUT: !168 = !{!166} +// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "PassInitExpr", linkageName: "_CPassInitExpr.Main", scope: null, file: !154, line: 16, type: !43, spFlags: DISPFlagDefinition, unit: !155) +// CHECK:STDOUT: !170 = !DILocation(line: 17, column: 19, scope: !169) +// CHECK:STDOUT: !171 = !DILocation(line: 17, column: 3, scope: !169) +// CHECK:STDOUT: !172 = !DILocation(line: 16, column: 1, scope: !169) +// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "PassValueExpr", linkageName: "_CPassValueExpr.Main", scope: null, file: !154, line: 20, type: !62, spFlags: DISPFlagDefinition, unit: !155, retainedNodes: !179) +// CHECK:STDOUT: !174 = !DILocalVariable(arg: 1, scope: !173, type: !44) +// CHECK:STDOUT: !177 = !DILocation(line: 21, column: 3, scope: !173) +// CHECK:STDOUT: !178 = !DILocation(line: 20, column: 1, scope: !173) +// CHECK:STDOUT: !179 = !{!174} +// CHECK:STDOUT: !180 = !{!"p1 _ZTS1Y", !108, i64 0} +// CHECK:STDOUT: !181 = !{!180, !180, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/share_ast.carbon b/toolchain/lower/testdata/interop/cpp/share_ast.carbon index 8a2ff80195a7..46070f66077c 100644 --- a/toolchain/lower/testdata/interop/cpp/share_ast.carbon +++ b/toolchain/lower/testdata/interop/cpp/share_ast.carbon @@ -91,32 +91,32 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: $_Z6make_av = comdat any // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTest.Main() #0 !dbg !48 { +// CHECK:STDOUT: define i32 @_CTest.Main() #0 !dbg !50 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca [8 x i8], align 4, !dbg !51 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !51 -// CHECK:STDOUT: call void @_Z6make_av.carbon_thunk.(ptr %a.var), !dbg !52 -// CHECK:STDOUT: %.loc6_11.1.b = getelementptr inbounds nuw [8 x i8], ptr %a.var, i32 0, i32 4, !dbg !54 -// CHECK:STDOUT: %.loc6_11.2 = load i32, ptr %.loc6_11.1.b, align 4, !dbg !54 -// CHECK:STDOUT: call void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %a.var), !dbg !51 -// CHECK:STDOUT: ret i32 %.loc6_11.2, !dbg !55 +// CHECK:STDOUT: %a.var = alloca [8 x i8], align 4, !dbg !53 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !53 +// CHECK:STDOUT: call void @_Z6make_av.carbon_thunk.(ptr %a.var), !dbg !54 +// CHECK:STDOUT: %.loc6_11.1.b = getelementptr inbounds nuw [8 x i8], ptr %a.var, i32 0, i32 4, !dbg !56 +// CHECK:STDOUT: %.loc6_11.2 = load i32, ptr %.loc6_11.1.b, align 4, !dbg !56 +// CHECK:STDOUT: call void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %a.var), !dbg !53 +// CHECK:STDOUT: ret i32 %.loc6_11.2, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z6make_av.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !62 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !62 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !64 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !64 // CHECK:STDOUT: %call = call i64 @_Z6make_av() // CHECK:STDOUT: store i64 %call, ptr %0, align 4 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %self) #0 !dbg !58 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !58 +// CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -127,9 +127,9 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %retval = alloca %struct.A, align 4 // CHECK:STDOUT: %a = getelementptr inbounds nuw %struct.A, ptr %retval, i32 0, i32 0 -// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !64 +// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !66 // CHECK:STDOUT: %b = getelementptr inbounds nuw %struct.A, ptr %retval, i32 0, i32 1 -// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !65 +// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !67 // CHECK:STDOUT: %0 = load i64, ptr %retval, align 4 // CHECK:STDOUT: ret i64 %0 // CHECK:STDOUT: } @@ -139,7 +139,7 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!41} +// CHECK:STDOUT: !llvm.dbg.cu = !{!43} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !10, !11} // CHECK:STDOUT: !llvm.errno.tbaa = !{!9} // CHECK:STDOUT: @@ -153,29 +153,29 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: !9 = !{!8, !7, i64 0} // CHECK:STDOUT: !10 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !11 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !40 = !DIFile(filename: "use_a.carbon", directory: "") -// CHECK:STDOUT: !41 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !40, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !42 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !43 = !{!42} -// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) -// CHECK:STDOUT: !45 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !46 = !{null, !45} -// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !40, line: 4, type: !44, spFlags: DISPFlagDefinition, unit: !41) -// CHECK:STDOUT: !51 = !DILocation(line: 5, column: 3, scope: !48) -// CHECK:STDOUT: !52 = !DILocation(line: 5, column: 18, scope: !48) -// CHECK:STDOUT: !54 = !DILocation(line: 6, column: 10, scope: !48) -// CHECK:STDOUT: !55 = !DILocation(line: 6, column: 3, scope: !48) -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core", scope: null, file: !40, line: 5, type: !47, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !59) -// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !45) -// CHECK:STDOUT: !58 = !DILocation(line: 5, column: 3, scope: !56) -// CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = !{!"any pointer", !6, i64 0} -// CHECK:STDOUT: !61 = !{!"p1 _ZTS1A", !60, i64 0} -// CHECK:STDOUT: !62 = !{!61, !61, i64 0} -// CHECK:STDOUT: !63 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} -// CHECK:STDOUT: !64 = !{!63, !7, i64 0} -// CHECK:STDOUT: !65 = !{!63, !7, i64 4} +// CHECK:STDOUT: !42 = !DIFile(filename: "use_a.carbon", directory: "") +// CHECK:STDOUT: !43 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !42, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !44 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !45 = !{!44} +// CHECK:STDOUT: !46 = !DISubroutineType(types: !45) +// CHECK:STDOUT: !47 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !48 = !{null, !47} +// CHECK:STDOUT: !49 = !DISubroutineType(types: !48) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !42, line: 4, type: !46, spFlags: DISPFlagDefinition, unit: !43) +// CHECK:STDOUT: !53 = !DILocation(line: 5, column: 3, scope: !50) +// CHECK:STDOUT: !54 = !DILocation(line: 5, column: 18, scope: !50) +// CHECK:STDOUT: !56 = !DILocation(line: 6, column: 10, scope: !50) +// CHECK:STDOUT: !57 = !DILocation(line: 6, column: 3, scope: !50) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core", scope: null, file: !42, line: 5, type: !49, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !61) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !47) +// CHECK:STDOUT: !60 = !DILocation(line: 5, column: 3, scope: !58) +// CHECK:STDOUT: !61 = !{!59} +// CHECK:STDOUT: !62 = !{!"any pointer", !6, i64 0} +// CHECK:STDOUT: !63 = !{!"p1 _ZTS1A", !62, i64 0} +// CHECK:STDOUT: !64 = !{!63, !63, i64 0} +// CHECK:STDOUT: !65 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} +// CHECK:STDOUT: !66 = !{!65, !7, i64 0} +// CHECK:STDOUT: !67 = !{!65, !7, i64 4} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'use_b.carbon' @@ -188,32 +188,32 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: $_Z6make_bv = comdat any // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTest.Main() #0 !dbg !68 { +// CHECK:STDOUT: define i32 @_CTest.Main() #0 !dbg !70 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %b.var = alloca [8 x i8], align 4, !dbg !71 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !71 -// CHECK:STDOUT: call void @_Z6make_bv.carbon_thunk.(ptr %b.var), !dbg !72 -// CHECK:STDOUT: %.loc6_11.1.x = getelementptr inbounds nuw [8 x i8], ptr %b.var, i32 0, i32 0, !dbg !74 -// CHECK:STDOUT: %.loc6_11.2 = load i32, ptr %.loc6_11.1.x, align 4, !dbg !74 -// CHECK:STDOUT: call void @"_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core"(ptr %b.var), !dbg !71 -// CHECK:STDOUT: ret i32 %.loc6_11.2, !dbg !75 +// CHECK:STDOUT: %b.var = alloca [8 x i8], align 4, !dbg !73 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !73 +// CHECK:STDOUT: call void @_Z6make_bv.carbon_thunk.(ptr %b.var), !dbg !74 +// CHECK:STDOUT: %.loc6_11.1.x = getelementptr inbounds nuw [8 x i8], ptr %b.var, i32 0, i32 0, !dbg !76 +// CHECK:STDOUT: %.loc6_11.2 = load i32, ptr %.loc6_11.1.x, align 4, !dbg !76 +// CHECK:STDOUT: call void @"_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core"(ptr %b.var), !dbg !73 +// CHECK:STDOUT: ret i32 %.loc6_11.2, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z6make_bv.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !81 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !81 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !83 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !83 // CHECK:STDOUT: %call = call i64 @_Z6make_bv() // CHECK:STDOUT: store i64 %call, ptr %0, align 4 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core"(ptr %self) #0 !dbg !76 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core"(ptr %self) #0 !dbg !78 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !78 +// CHECK:STDOUT: ret void, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -224,9 +224,9 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %retval = alloca %struct.B, align 4 // CHECK:STDOUT: %x = getelementptr inbounds nuw %struct.B, ptr %retval, i32 0, i32 0 -// CHECK:STDOUT: store i32 3, ptr %x, align 4, !tbaa !83 +// CHECK:STDOUT: store i32 3, ptr %x, align 4, !tbaa !85 // CHECK:STDOUT: %y = getelementptr inbounds nuw %struct.B, ptr %retval, i32 0, i32 1 -// CHECK:STDOUT: store i32 4, ptr %y, align 4, !tbaa !84 +// CHECK:STDOUT: store i32 4, ptr %y, align 4, !tbaa !86 // CHECK:STDOUT: %0 = load i64, ptr %retval, align 4 // CHECK:STDOUT: ret i64 %0 // CHECK:STDOUT: } @@ -236,7 +236,7 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!67} +// CHECK:STDOUT: !llvm.dbg.cu = !{!69} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !10, !11} // CHECK:STDOUT: !llvm.errno.tbaa = !{!9} // CHECK:STDOUT: @@ -250,29 +250,29 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: !9 = !{!8, !7, i64 0} // CHECK:STDOUT: !10 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !11 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !42 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !43 = !{!42} -// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) -// CHECK:STDOUT: !45 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !46 = !{null, !45} -// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) -// CHECK:STDOUT: !60 = !{!"any pointer", !6, i64 0} -// CHECK:STDOUT: !66 = !DIFile(filename: "use_b.carbon", directory: "") -// CHECK:STDOUT: !67 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !66, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !66, line: 4, type: !44, spFlags: DISPFlagDefinition, unit: !67) -// CHECK:STDOUT: !71 = !DILocation(line: 5, column: 3, scope: !68) -// CHECK:STDOUT: !72 = !DILocation(line: 5, column: 18, scope: !68) -// CHECK:STDOUT: !74 = !DILocation(line: 6, column: 10, scope: !68) -// CHECK:STDOUT: !75 = !DILocation(line: 6, column: 3, scope: !68) -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core", scope: null, file: !66, line: 5, type: !47, spFlags: DISPFlagDefinition, unit: !67, retainedNodes: !79) -// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !45) -// CHECK:STDOUT: !78 = !DILocation(line: 5, column: 3, scope: !76) -// CHECK:STDOUT: !79 = !{!77} -// CHECK:STDOUT: !80 = !{!"p1 _ZTS1B", !60, i64 0} -// CHECK:STDOUT: !81 = !{!80, !80, i64 0} -// CHECK:STDOUT: !82 = !{!"_ZTS1B", !7, i64 0, !7, i64 4} -// CHECK:STDOUT: !83 = !{!82, !7, i64 0} -// CHECK:STDOUT: !84 = !{!82, !7, i64 4} +// CHECK:STDOUT: !44 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !45 = !{!44} +// CHECK:STDOUT: !46 = !DISubroutineType(types: !45) +// CHECK:STDOUT: !47 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !48 = !{null, !47} +// CHECK:STDOUT: !49 = !DISubroutineType(types: !48) +// CHECK:STDOUT: !62 = !{!"any pointer", !6, i64 0} +// CHECK:STDOUT: !68 = !DIFile(filename: "use_b.carbon", directory: "") +// CHECK:STDOUT: !69 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !68, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !68, line: 4, type: !46, spFlags: DISPFlagDefinition, unit: !69) +// CHECK:STDOUT: !73 = !DILocation(line: 5, column: 3, scope: !70) +// CHECK:STDOUT: !74 = !DILocation(line: 5, column: 18, scope: !70) +// CHECK:STDOUT: !76 = !DILocation(line: 6, column: 10, scope: !70) +// CHECK:STDOUT: !77 = !DILocation(line: 6, column: 3, scope: !70) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core", scope: null, file: !68, line: 5, type: !49, spFlags: DISPFlagDefinition, unit: !69, retainedNodes: !81) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !47) +// CHECK:STDOUT: !80 = !DILocation(line: 5, column: 3, scope: !78) +// CHECK:STDOUT: !81 = !{!79} +// CHECK:STDOUT: !82 = !{!"p1 _ZTS1B", !62, i64 0} +// CHECK:STDOUT: !83 = !{!82, !82, i64 0} +// CHECK:STDOUT: !84 = !{!"_ZTS1B", !7, i64 0, !7, i64 4} +// CHECK:STDOUT: !85 = !{!84, !7, i64 0} +// CHECK:STDOUT: !86 = !{!84, !7, i64 4} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'use_both.carbon' @@ -280,69 +280,69 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: -// CHECK:STDOUT: %struct.A.32 = type { i32, i32 } -// CHECK:STDOUT: %struct.B.33 = type { i32, i32 } +// CHECK:STDOUT: %struct.A.34 = type { i32, i32 } +// CHECK:STDOUT: %struct.B.35 = type { i32, i32 } // CHECK:STDOUT: // CHECK:STDOUT: $_Z6make_av = comdat any // CHECK:STDOUT: // CHECK:STDOUT: $_Z6make_bv = comdat any // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestA.Main() #0 !dbg !87 { +// CHECK:STDOUT: define i32 @_CTestA.Main() #0 !dbg !89 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca [8 x i8], align 4, !dbg !90 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !90 -// CHECK:STDOUT: call void @_Z6make_av.carbon_thunk.(ptr %a.var), !dbg !91 -// CHECK:STDOUT: %.loc7_11.1.b = getelementptr inbounds nuw [8 x i8], ptr %a.var, i32 0, i32 4, !dbg !93 -// CHECK:STDOUT: %.loc7_11.2 = load i32, ptr %.loc7_11.1.b, align 4, !dbg !93 -// CHECK:STDOUT: call void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %a.var), !dbg !90 -// CHECK:STDOUT: ret i32 %.loc7_11.2, !dbg !94 +// CHECK:STDOUT: %a.var = alloca [8 x i8], align 4, !dbg !92 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !92 +// CHECK:STDOUT: call void @_Z6make_av.carbon_thunk.(ptr %a.var), !dbg !93 +// CHECK:STDOUT: %.loc7_11.1.b = getelementptr inbounds nuw [8 x i8], ptr %a.var, i32 0, i32 4, !dbg !95 +// CHECK:STDOUT: %.loc7_11.2 = load i32, ptr %.loc7_11.1.b, align 4, !dbg !95 +// CHECK:STDOUT: call void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %a.var), !dbg !92 +// CHECK:STDOUT: ret i32 %.loc7_11.2, !dbg !96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z6make_av.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !62 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !62 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !64 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !64 // CHECK:STDOUT: %call = call i64 @_Z6make_av() // CHECK:STDOUT: store i64 %call, ptr %0, align 4 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %self) #0 !dbg !95 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %self) #0 !dbg !97 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !97 +// CHECK:STDOUT: ret void, !dbg !99 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestB.Main() #0 !dbg !99 { +// CHECK:STDOUT: define i32 @_CTestB.Main() #0 !dbg !101 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %b.var = alloca [8 x i8], align 4, !dbg !102 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !102 -// CHECK:STDOUT: call void @_Z6make_bv.carbon_thunk.(ptr %b.var), !dbg !103 -// CHECK:STDOUT: %.loc12_11.1.x = getelementptr inbounds nuw [8 x i8], ptr %b.var, i32 0, i32 0, !dbg !105 -// CHECK:STDOUT: %.loc12_11.2 = load i32, ptr %.loc12_11.1.x, align 4, !dbg !105 -// CHECK:STDOUT: call void @"_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core"(ptr %b.var), !dbg !102 -// CHECK:STDOUT: ret i32 %.loc12_11.2, !dbg !106 +// CHECK:STDOUT: %b.var = alloca [8 x i8], align 4, !dbg !104 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !104 +// CHECK:STDOUT: call void @_Z6make_bv.carbon_thunk.(ptr %b.var), !dbg !105 +// CHECK:STDOUT: %.loc12_11.1.x = getelementptr inbounds nuw [8 x i8], ptr %b.var, i32 0, i32 0, !dbg !107 +// CHECK:STDOUT: %.loc12_11.2 = load i32, ptr %.loc12_11.1.x, align 4, !dbg !107 +// CHECK:STDOUT: call void @"_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core"(ptr %b.var), !dbg !104 +// CHECK:STDOUT: ret i32 %.loc12_11.2, !dbg !108 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z6make_bv.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !81 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !81 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !83 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !83 // CHECK:STDOUT: %call = call i64 @_Z6make_bv() // CHECK:STDOUT: store i64 %call, ptr %0, align 4 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core"(ptr %self) #0 !dbg !107 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core"(ptr %self) #0 !dbg !109 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !109 +// CHECK:STDOUT: ret void, !dbg !111 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -351,11 +351,11 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local i64 @_Z6make_av() #3 comdat { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %retval = alloca %struct.A.32, align 4 -// CHECK:STDOUT: %a = getelementptr inbounds nuw %struct.A.32, ptr %retval, i32 0, i32 0 -// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !64 -// CHECK:STDOUT: %b = getelementptr inbounds nuw %struct.A.32, ptr %retval, i32 0, i32 1 -// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !65 +// CHECK:STDOUT: %retval = alloca %struct.A.34, align 4 +// CHECK:STDOUT: %a = getelementptr inbounds nuw %struct.A.34, ptr %retval, i32 0, i32 0 +// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !66 +// CHECK:STDOUT: %b = getelementptr inbounds nuw %struct.A.34, ptr %retval, i32 0, i32 1 +// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !67 // CHECK:STDOUT: %0 = load i64, ptr %retval, align 4 // CHECK:STDOUT: ret i64 %0 // CHECK:STDOUT: } @@ -363,11 +363,11 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local i64 @_Z6make_bv() #3 comdat { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %retval = alloca %struct.B.33, align 4 -// CHECK:STDOUT: %x = getelementptr inbounds nuw %struct.B.33, ptr %retval, i32 0, i32 0 -// CHECK:STDOUT: store i32 3, ptr %x, align 4, !tbaa !83 -// CHECK:STDOUT: %y = getelementptr inbounds nuw %struct.B.33, ptr %retval, i32 0, i32 1 -// CHECK:STDOUT: store i32 4, ptr %y, align 4, !tbaa !84 +// CHECK:STDOUT: %retval = alloca %struct.B.35, align 4 +// CHECK:STDOUT: %x = getelementptr inbounds nuw %struct.B.35, ptr %retval, i32 0, i32 0 +// CHECK:STDOUT: store i32 3, ptr %x, align 4, !tbaa !85 +// CHECK:STDOUT: %y = getelementptr inbounds nuw %struct.B.35, ptr %retval, i32 0, i32 1 +// CHECK:STDOUT: store i32 4, ptr %y, align 4, !tbaa !86 // CHECK:STDOUT: %0 = load i64, ptr %retval, align 4 // CHECK:STDOUT: ret i64 %0 // CHECK:STDOUT: } @@ -380,7 +380,7 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!86} +// CHECK:STDOUT: !llvm.dbg.cu = !{!88} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !10, !11} // CHECK:STDOUT: !llvm.errno.tbaa = !{!9} // CHECK:STDOUT: @@ -394,43 +394,43 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: !9 = !{!8, !7, i64 0} // CHECK:STDOUT: !10 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !11 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !42 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !43 = !{!42} -// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) -// CHECK:STDOUT: !45 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !46 = !{null, !45} -// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) -// CHECK:STDOUT: !60 = !{!"any pointer", !6, i64 0} -// CHECK:STDOUT: !61 = !{!"p1 _ZTS1A", !60, i64 0} -// CHECK:STDOUT: !62 = !{!61, !61, i64 0} -// CHECK:STDOUT: !63 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} -// CHECK:STDOUT: !64 = !{!63, !7, i64 0} -// CHECK:STDOUT: !65 = !{!63, !7, i64 4} -// CHECK:STDOUT: !80 = !{!"p1 _ZTS1B", !60, i64 0} -// CHECK:STDOUT: !81 = !{!80, !80, i64 0} -// CHECK:STDOUT: !82 = !{!"_ZTS1B", !7, i64 0, !7, i64 4} -// CHECK:STDOUT: !83 = !{!82, !7, i64 0} -// CHECK:STDOUT: !84 = !{!82, !7, i64 4} -// CHECK:STDOUT: !85 = !DIFile(filename: "use_both.carbon", directory: "") -// CHECK:STDOUT: !86 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !85, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "TestA", linkageName: "_CTestA.Main", scope: null, file: !85, line: 5, type: !44, spFlags: DISPFlagDefinition, unit: !86) -// CHECK:STDOUT: !90 = !DILocation(line: 6, column: 3, scope: !87) -// CHECK:STDOUT: !91 = !DILocation(line: 6, column: 18, scope: !87) -// CHECK:STDOUT: !93 = !DILocation(line: 7, column: 10, scope: !87) -// CHECK:STDOUT: !94 = !DILocation(line: 7, column: 3, scope: !87) -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core", scope: null, file: !85, line: 6, type: !47, spFlags: DISPFlagDefinition, unit: !86, retainedNodes: !98) -// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !45) -// CHECK:STDOUT: !97 = !DILocation(line: 6, column: 3, scope: !95) -// CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "TestB", linkageName: "_CTestB.Main", scope: null, file: !85, line: 10, type: !44, spFlags: DISPFlagDefinition, unit: !86) -// CHECK:STDOUT: !102 = !DILocation(line: 11, column: 3, scope: !99) -// CHECK:STDOUT: !103 = !DILocation(line: 11, column: 18, scope: !99) -// CHECK:STDOUT: !105 = !DILocation(line: 12, column: 10, scope: !99) -// CHECK:STDOUT: !106 = !DILocation(line: 12, column: 3, scope: !99) -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core", scope: null, file: !85, line: 11, type: !47, spFlags: DISPFlagDefinition, unit: !86, retainedNodes: !110) -// CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !45) -// CHECK:STDOUT: !109 = !DILocation(line: 11, column: 3, scope: !107) -// CHECK:STDOUT: !110 = !{!108} +// CHECK:STDOUT: !44 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !45 = !{!44} +// CHECK:STDOUT: !46 = !DISubroutineType(types: !45) +// CHECK:STDOUT: !47 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !48 = !{null, !47} +// CHECK:STDOUT: !49 = !DISubroutineType(types: !48) +// CHECK:STDOUT: !62 = !{!"any pointer", !6, i64 0} +// CHECK:STDOUT: !63 = !{!"p1 _ZTS1A", !62, i64 0} +// CHECK:STDOUT: !64 = !{!63, !63, i64 0} +// CHECK:STDOUT: !65 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} +// CHECK:STDOUT: !66 = !{!65, !7, i64 0} +// CHECK:STDOUT: !67 = !{!65, !7, i64 4} +// CHECK:STDOUT: !82 = !{!"p1 _ZTS1B", !62, i64 0} +// CHECK:STDOUT: !83 = !{!82, !82, i64 0} +// CHECK:STDOUT: !84 = !{!"_ZTS1B", !7, i64 0, !7, i64 4} +// CHECK:STDOUT: !85 = !{!84, !7, i64 0} +// CHECK:STDOUT: !86 = !{!84, !7, i64 4} +// CHECK:STDOUT: !87 = !DIFile(filename: "use_both.carbon", directory: "") +// CHECK:STDOUT: !88 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !87, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "TestA", linkageName: "_CTestA.Main", scope: null, file: !87, line: 5, type: !46, spFlags: DISPFlagDefinition, unit: !88) +// CHECK:STDOUT: !92 = !DILocation(line: 6, column: 3, scope: !89) +// CHECK:STDOUT: !93 = !DILocation(line: 6, column: 18, scope: !89) +// CHECK:STDOUT: !95 = !DILocation(line: 7, column: 10, scope: !89) +// CHECK:STDOUT: !96 = !DILocation(line: 7, column: 3, scope: !89) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core", scope: null, file: !87, line: 6, type: !49, spFlags: DISPFlagDefinition, unit: !88, retainedNodes: !100) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !47) +// CHECK:STDOUT: !99 = !DILocation(line: 6, column: 3, scope: !97) +// CHECK:STDOUT: !100 = !{!98} +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "TestB", linkageName: "_CTestB.Main", scope: null, file: !87, line: 10, type: !46, spFlags: DISPFlagDefinition, unit: !88) +// CHECK:STDOUT: !104 = !DILocation(line: 11, column: 3, scope: !101) +// CHECK:STDOUT: !105 = !DILocation(line: 11, column: 18, scope: !101) +// CHECK:STDOUT: !107 = !DILocation(line: 12, column: 10, scope: !101) +// CHECK:STDOUT: !108 = !DILocation(line: 12, column: 3, scope: !101) +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core", scope: null, file: !87, line: 11, type: !49, spFlags: DISPFlagDefinition, unit: !88, retainedNodes: !112) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !47) +// CHECK:STDOUT: !111 = !DILocation(line: 11, column: 3, scope: !109) +// CHECK:STDOUT: !112 = !{!110} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_lib.carbon' @@ -438,7 +438,7 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: -// CHECK:STDOUT: %struct.A.36 = type { i32, i32 } +// CHECK:STDOUT: %struct.A.38 = type { i32, i32 } // CHECK:STDOUT: // CHECK:STDOUT: $_Z6make_av = comdat any // CHECK:STDOUT: @@ -446,27 +446,27 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: define internal void @_Z6make_av.carbon_thunk.(ptr noundef %return) #0 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !62 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !62 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !64 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !64 // CHECK:STDOUT: %call = call i64 @_Z6make_av() // CHECK:STDOUT: store i64 %call, ptr %0, align 4 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %self) #1 !dbg !113 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %self) #1 !dbg !115 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !115 +// CHECK:STDOUT: ret void, !dbg !117 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local i64 @_Z6make_av() #2 comdat { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %retval = alloca %struct.A.36, align 4 -// CHECK:STDOUT: %a = getelementptr inbounds nuw %struct.A.36, ptr %retval, i32 0, i32 0 -// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !64 -// CHECK:STDOUT: %b = getelementptr inbounds nuw %struct.A.36, ptr %retval, i32 0, i32 1 -// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !65 +// CHECK:STDOUT: %retval = alloca %struct.A.38, align 4 +// CHECK:STDOUT: %a = getelementptr inbounds nuw %struct.A.38, ptr %retval, i32 0, i32 0 +// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !66 +// CHECK:STDOUT: %b = getelementptr inbounds nuw %struct.A.38, ptr %retval, i32 0, i32 1 +// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !67 // CHECK:STDOUT: %0 = load i64, ptr %retval, align 4 // CHECK:STDOUT: ret i64 %0 // CHECK:STDOUT: } @@ -475,7 +475,7 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: attributes #1 = { nounwind } // CHECK:STDOUT: attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!112} +// CHECK:STDOUT: !llvm.dbg.cu = !{!114} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !10, !11} // CHECK:STDOUT: !llvm.errno.tbaa = !{!9} // CHECK:STDOUT: @@ -489,21 +489,21 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: !9 = !{!8, !7, i64 0} // CHECK:STDOUT: !10 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !11 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !45 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !46 = !{null, !45} -// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) -// CHECK:STDOUT: !60 = !{!"any pointer", !6, i64 0} -// CHECK:STDOUT: !61 = !{!"p1 _ZTS1A", !60, i64 0} -// CHECK:STDOUT: !62 = !{!61, !61, i64 0} -// CHECK:STDOUT: !63 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} -// CHECK:STDOUT: !64 = !{!63, !7, i64 0} -// CHECK:STDOUT: !65 = !{!63, !7, i64 4} -// CHECK:STDOUT: !111 = !DIFile(filename: "generic_lib.carbon", directory: "") -// CHECK:STDOUT: !112 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !111, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core", scope: null, file: !111, line: 5, type: !47, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !116) -// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !45) -// CHECK:STDOUT: !115 = !DILocation(line: 5, column: 3, scope: !113) -// CHECK:STDOUT: !116 = !{!114} +// CHECK:STDOUT: !47 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !48 = !{null, !47} +// CHECK:STDOUT: !49 = !DISubroutineType(types: !48) +// CHECK:STDOUT: !62 = !{!"any pointer", !6, i64 0} +// CHECK:STDOUT: !63 = !{!"p1 _ZTS1A", !62, i64 0} +// CHECK:STDOUT: !64 = !{!63, !63, i64 0} +// CHECK:STDOUT: !65 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} +// CHECK:STDOUT: !66 = !{!65, !7, i64 0} +// CHECK:STDOUT: !67 = !{!65, !7, i64 4} +// CHECK:STDOUT: !113 = !DIFile(filename: "generic_lib.carbon", directory: "") +// CHECK:STDOUT: !114 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !113, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core", scope: null, file: !113, line: 5, type: !49, spFlags: DISPFlagDefinition, unit: !114, retainedNodes: !118) +// CHECK:STDOUT: !116 = !DILocalVariable(arg: 1, scope: !115, type: !47) +// CHECK:STDOUT: !117 = !DILocation(line: 5, column: 3, scope: !115) +// CHECK:STDOUT: !118 = !{!116} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'no_cpp_imports.carbon' @@ -511,34 +511,34 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: -// CHECK:STDOUT: %struct.A.39 = type { i32, i32 } +// CHECK:STDOUT: %struct.A.41 = type { i32, i32 } // CHECK:STDOUT: // CHECK:STDOUT: $_Z6make_av = comdat any // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CCallGeneric.Main() #0 !dbg !119 { +// CHECK:STDOUT: define i32 @_CCallGeneric.Main() #0 !dbg !121 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %MakeA.call = call i32 @_CMakeA.Main.084a2801e0f5d754({} zeroinitializer), !dbg !122 -// CHECK:STDOUT: ret i32 %MakeA.call, !dbg !125 +// CHECK:STDOUT: %MakeA.call = call i32 @_CMakeA.Main.084a2801e0f5d754({} zeroinitializer), !dbg !124 +// CHECK:STDOUT: ret i32 %MakeA.call, !dbg !127 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CMakeA.Main.084a2801e0f5d754({} %x) #0 !dbg !126 { -// CHECK:STDOUT: %1 = alloca [8 x i8], align 4, !dbg !131 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !131 -// CHECK:STDOUT: call void @_Z6make_av.carbon_thunk.(ptr %1), !dbg !132 -// CHECK:STDOUT: %b = getelementptr inbounds nuw [8 x i8], ptr %1, i32 0, i32 4, !dbg !134 -// CHECK:STDOUT: %2 = load i32, ptr %b, align 4, !dbg !134 -// CHECK:STDOUT: call void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %1), !dbg !131 -// CHECK:STDOUT: ret i32 %2, !dbg !135 +// CHECK:STDOUT: define linkonce_odr i32 @_CMakeA.Main.084a2801e0f5d754({} %x) #0 !dbg !128 { +// CHECK:STDOUT: %1 = alloca [8 x i8], align 4, !dbg !133 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !133 +// CHECK:STDOUT: call void @_Z6make_av.carbon_thunk.(ptr %1), !dbg !134 +// CHECK:STDOUT: %b = getelementptr inbounds nuw [8 x i8], ptr %1, i32 0, i32 4, !dbg !136 +// CHECK:STDOUT: %2 = load i32, ptr %b, align 4, !dbg !136 +// CHECK:STDOUT: call void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %1), !dbg !133 +// CHECK:STDOUT: ret i32 %2, !dbg !137 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z6make_av.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !62 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !62 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !64 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !64 // CHECK:STDOUT: %call = call i64 @_Z6make_av() // CHECK:STDOUT: store i64 %call, ptr %0, align 4 // CHECK:STDOUT: ret void @@ -552,11 +552,11 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local i64 @_Z6make_av() #3 comdat { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %retval = alloca %struct.A.39, align 4 -// CHECK:STDOUT: %a = getelementptr inbounds nuw %struct.A.39, ptr %retval, i32 0, i32 0 -// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !64 -// CHECK:STDOUT: %b = getelementptr inbounds nuw %struct.A.39, ptr %retval, i32 0, i32 1 -// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !65 +// CHECK:STDOUT: %retval = alloca %struct.A.41, align 4 +// CHECK:STDOUT: %a = getelementptr inbounds nuw %struct.A.41, ptr %retval, i32 0, i32 0 +// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !66 +// CHECK:STDOUT: %b = getelementptr inbounds nuw %struct.A.41, ptr %retval, i32 0, i32 1 +// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !67 // CHECK:STDOUT: %0 = load i64, ptr %retval, align 4 // CHECK:STDOUT: ret i64 %0 // CHECK:STDOUT: } @@ -566,7 +566,7 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!118} +// CHECK:STDOUT: !llvm.dbg.cu = !{!120} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !10, !11} // CHECK:STDOUT: !llvm.errno.tbaa = !{!9} // CHECK:STDOUT: @@ -580,29 +580,29 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: !9 = !{!8, !7, i64 0} // CHECK:STDOUT: !10 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !11 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !42 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !43 = !{!42} -// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) -// CHECK:STDOUT: !45 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !60 = !{!"any pointer", !6, i64 0} -// CHECK:STDOUT: !61 = !{!"p1 _ZTS1A", !60, i64 0} -// CHECK:STDOUT: !62 = !{!61, !61, i64 0} -// CHECK:STDOUT: !63 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} -// CHECK:STDOUT: !64 = !{!63, !7, i64 0} -// CHECK:STDOUT: !65 = !{!63, !7, i64 4} -// CHECK:STDOUT: !111 = !DIFile(filename: "generic_lib.carbon", directory: "") -// CHECK:STDOUT: !117 = !DIFile(filename: "no_cpp_imports.carbon", directory: "") -// CHECK:STDOUT: !118 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !117, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.Main", scope: null, file: !117, line: 4, type: !44, spFlags: DISPFlagDefinition, unit: !118) -// CHECK:STDOUT: !122 = !DILocation(line: 5, column: 10, scope: !119) -// CHECK:STDOUT: !123 = !{!42, !45} -// CHECK:STDOUT: !124 = !DISubroutineType(types: !123) -// CHECK:STDOUT: !125 = !DILocation(line: 5, column: 3, scope: !119) -// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "MakeA", linkageName: "_CMakeA.Main.084a2801e0f5d754", scope: null, file: !111, line: 4, type: !124, spFlags: DISPFlagDefinition, unit: !118, retainedNodes: !136) -// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !45) -// CHECK:STDOUT: !131 = !DILocation(line: 5, column: 3, scope: !126) -// CHECK:STDOUT: !132 = !DILocation(line: 5, column: 18, scope: !126) -// CHECK:STDOUT: !134 = !DILocation(line: 6, column: 10, scope: !126) -// CHECK:STDOUT: !135 = !DILocation(line: 6, column: 3, scope: !126) -// CHECK:STDOUT: !136 = !{!127} +// CHECK:STDOUT: !44 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !45 = !{!44} +// CHECK:STDOUT: !46 = !DISubroutineType(types: !45) +// CHECK:STDOUT: !47 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !62 = !{!"any pointer", !6, i64 0} +// CHECK:STDOUT: !63 = !{!"p1 _ZTS1A", !62, i64 0} +// CHECK:STDOUT: !64 = !{!63, !63, i64 0} +// CHECK:STDOUT: !65 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} +// CHECK:STDOUT: !66 = !{!65, !7, i64 0} +// CHECK:STDOUT: !67 = !{!65, !7, i64 4} +// CHECK:STDOUT: !113 = !DIFile(filename: "generic_lib.carbon", directory: "") +// CHECK:STDOUT: !119 = !DIFile(filename: "no_cpp_imports.carbon", directory: "") +// CHECK:STDOUT: !120 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !119, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.Main", scope: null, file: !119, line: 4, type: !46, spFlags: DISPFlagDefinition, unit: !120) +// CHECK:STDOUT: !124 = !DILocation(line: 5, column: 10, scope: !121) +// CHECK:STDOUT: !125 = !{!44, !47} +// CHECK:STDOUT: !126 = !DISubroutineType(types: !125) +// CHECK:STDOUT: !127 = !DILocation(line: 5, column: 3, scope: !121) +// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "MakeA", linkageName: "_CMakeA.Main.084a2801e0f5d754", scope: null, file: !113, line: 4, type: !126, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !138) +// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !47) +// CHECK:STDOUT: !133 = !DILocation(line: 5, column: 3, scope: !128) +// CHECK:STDOUT: !134 = !DILocation(line: 5, column: 18, scope: !128) +// CHECK:STDOUT: !136 = !DILocation(line: 6, column: 10, scope: !128) +// CHECK:STDOUT: !137 = !DILocation(line: 6, column: 3, scope: !128) +// CHECK:STDOUT: !138 = !{!129} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_pointer.carbon b/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_pointer.carbon index c3f88977b87c..28072447c3c2 100644 --- a/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_pointer.carbon +++ b/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_pointer.carbon @@ -100,7 +100,7 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !17 // CHECK:STDOUT: store ptr getelementptr inbounds ([3 x i32], ptr @array.loc13_50.15, i32 1), ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !17 // CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !20 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr @array), !dbg !18 +// CHECK:STDOUT: call void @"_CSelfDestruct.b3a0adb9db7bb49e:core.Destroy.Core"(ptr @array), !dbg !18 // CHECK:STDOUT: call void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %_.var), !dbg !17 // CHECK:STDOUT: ret void, !dbg !21 // CHECK:STDOUT: } @@ -118,7 +118,7 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !31 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b3a0adb9db7bb49e:core.Destroy.Core"(ptr %self) #0 !dbg !31 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc13_50.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !33 // CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc13_50.1.array.index), !dbg !33 @@ -130,9 +130,9 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !35 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b3a0adb9db7bb49e:core.Destroy.Core"(ptr %self) #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self), !dbg !37 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b3a0adb9db7bb49e:core.Destroy.Core"(ptr %self), !dbg !37 // CHECK:STDOUT: ret void, !dbg !37 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -161,7 +161,7 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: call void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk._(ptr %.loc18_36.3.temp, ptr %_.var), !dbg !44 // CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !47 // CHECK:STDOUT: call void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %.loc18_36.3.temp), !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr @array), !dbg !45 +// CHECK:STDOUT: call void @"_CSelfDestruct.b3a0adb9db7bb49e:core.Destroy.Core"(ptr @array), !dbg !45 // CHECK:STDOUT: call void @"_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core"(ptr %_.var), !dbg !44 // CHECK:STDOUT: ret void, !dbg !48 // CHECK:STDOUT: } @@ -220,7 +220,7 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: %initializer_list.initializer_list.call.array.end = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 1, !dbg !54 // CHECK:STDOUT: store ptr %initializer_list.initializer_list.call.array.end, ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !54 // CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !57 -// CHECK:STDOUT: call void @"_CSelfDestruct.71d86972d5684aff:core.Destroy.Core"(ptr %.loc23_69.17.temp), !dbg !55 +// CHECK:STDOUT: call void @"_CSelfDestruct.880d8b86f475ef6d:core.Destroy.Core"(ptr %.loc23_69.17.temp), !dbg !55 // CHECK:STDOUT: call void @"_CSelfDestruct.b204467699306999:core.Destroy.Core"(ptr %_.var), !dbg !54 // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } @@ -258,7 +258,7 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.880d8b86f475ef6d:core.Destroy.Core"(ptr %self) #0 !dbg !67 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc23_69.1.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %self, i32 0, i64 2, !dbg !69 // CHECK:STDOUT: call void @"_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core"(ptr %.loc23_69.1.array.index), !dbg !69 @@ -270,9 +270,9 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.71d86972d5684aff:core.Destroy.Core"(ptr %self) #0 !dbg !71 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.880d8b86f475ef6d:core.Destroy.Core"(ptr %self) #0 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core"(ptr %self), !dbg !73 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.880d8b86f475ef6d:core.Destroy.Core"(ptr %self), !dbg !73 // CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -350,11 +350,11 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !27, type: !6) // CHECK:STDOUT: !29 = !DILocation(line: 13, column: 42, scope: !27) // CHECK:STDOUT: !30 = !{!28} -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !4, line: 13, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b3a0adb9db7bb49e:core.Destroy.Core", scope: null, file: !4, line: 13, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !9) // CHECK:STDOUT: !33 = !DILocation(line: 13, column: 42, scope: !31) // CHECK:STDOUT: !34 = !{!32} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !4, line: 13, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b3a0adb9db7bb49e:core.Destroy.Core", scope: null, file: !4, line: 13, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !9) // CHECK:STDOUT: !37 = !DILocation(line: 13, column: 42, scope: !35) // CHECK:STDOUT: !38 = !{!36} @@ -384,11 +384,11 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !9) // CHECK:STDOUT: !65 = !DILocation(line: 23, column: 58, scope: !63) // CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.880d8b86f475ef6d:core.Destroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !9) // CHECK:STDOUT: !69 = !DILocation(line: 23, column: 58, scope: !67) // CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.71d86972d5684aff:core.Destroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.880d8b86f475ef6d:core.Destroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !9) // CHECK:STDOUT: !73 = !DILocation(line: 23, column: 58, scope: !71) // CHECK:STDOUT: !74 = !{!72} diff --git a/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_size.carbon b/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_size.carbon index 089e0643aaa1..fe8cf6f0179e 100644 --- a/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_size.carbon +++ b/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_size.carbon @@ -100,7 +100,7 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !18 // CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !18 // CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !21 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr @array), !dbg !19 +// CHECK:STDOUT: call void @"_CSelfDestruct.b3a0adb9db7bb49e:core.Destroy.Core"(ptr @array), !dbg !19 // CHECK:STDOUT: call void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %_.var), !dbg !18 // CHECK:STDOUT: ret void, !dbg !22 // CHECK:STDOUT: } @@ -118,7 +118,7 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !32 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b3a0adb9db7bb49e:core.Destroy.Core"(ptr %self) #0 !dbg !32 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc13_50.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !34 // CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc13_50.1.array.index), !dbg !34 @@ -130,9 +130,9 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !36 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b3a0adb9db7bb49e:core.Destroy.Core"(ptr %self) #0 !dbg !36 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self), !dbg !38 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b3a0adb9db7bb49e:core.Destroy.Core"(ptr %self), !dbg !38 // CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -161,7 +161,7 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: call void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk._(ptr %.loc18_36.3.temp, ptr %_.var), !dbg !45 // CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !48 // CHECK:STDOUT: call void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %.loc18_36.3.temp), !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr @array), !dbg !46 +// CHECK:STDOUT: call void @"_CSelfDestruct.b3a0adb9db7bb49e:core.Destroy.Core"(ptr @array), !dbg !46 // CHECK:STDOUT: call void @"_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core"(ptr %_.var), !dbg !45 // CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } @@ -219,7 +219,7 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !55 // CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !55 // CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.71d86972d5684aff:core.Destroy.Core"(ptr %.loc23_69.17.temp), !dbg !56 +// CHECK:STDOUT: call void @"_CSelfDestruct.880d8b86f475ef6d:core.Destroy.Core"(ptr %.loc23_69.17.temp), !dbg !56 // CHECK:STDOUT: call void @"_CSelfDestruct.b204467699306999:core.Destroy.Core"(ptr %_.var), !dbg !55 // CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } @@ -257,7 +257,7 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core"(ptr %self) #0 !dbg !68 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.880d8b86f475ef6d:core.Destroy.Core"(ptr %self) #0 !dbg !68 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc23_69.1.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %self, i32 0, i64 2, !dbg !70 // CHECK:STDOUT: call void @"_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core"(ptr %.loc23_69.1.array.index), !dbg !70 @@ -269,9 +269,9 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.71d86972d5684aff:core.Destroy.Core"(ptr %self) #0 !dbg !72 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.880d8b86f475ef6d:core.Destroy.Core"(ptr %self) #0 !dbg !72 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core"(ptr %self), !dbg !74 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.880d8b86f475ef6d:core.Destroy.Core"(ptr %self), !dbg !74 // CHECK:STDOUT: ret void, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -349,11 +349,11 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !6) // CHECK:STDOUT: !30 = !DILocation(line: 13, column: 42, scope: !28) // CHECK:STDOUT: !31 = !{!29} -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !4, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !35) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b3a0adb9db7bb49e:core.Destroy.Core", scope: null, file: !4, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !35) // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !10) // CHECK:STDOUT: !34 = !DILocation(line: 13, column: 42, scope: !32) // CHECK:STDOUT: !35 = !{!33} -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !4, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b3a0adb9db7bb49e:core.Destroy.Core", scope: null, file: !4, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !10) // CHECK:STDOUT: !38 = !DILocation(line: 13, column: 42, scope: !36) // CHECK:STDOUT: !39 = !{!37} @@ -383,11 +383,11 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !10) // CHECK:STDOUT: !66 = !DILocation(line: 23, column: 58, scope: !64) // CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.880d8b86f475ef6d:core.Destroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !10) // CHECK:STDOUT: !70 = !DILocation(line: 23, column: 58, scope: !68) // CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.71d86972d5684aff:core.Destroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !75) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.880d8b86f475ef6d:core.Destroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !75) // CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !10) // CHECK:STDOUT: !74 = !DILocation(line: 23, column: 58, scope: !72) // CHECK:STDOUT: !75 = !{!73} diff --git a/toolchain/lower/testdata/interop/cpp/thunks.carbon b/toolchain/lower/testdata/interop/cpp/thunks.carbon index 791a9188911d..2ff6d9cee89c 100644 --- a/toolchain/lower/testdata/interop/cpp/thunks.carbon +++ b/toolchain/lower/testdata/interop/cpp/thunks.carbon @@ -104,15 +104,15 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCall.Main(ptr %n) #0 !dbg !41 { +// CHECK:STDOUT: define void @_CCall.Main(ptr %n) #0 !dbg !43 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n2.var = alloca [1 x i8], align 1, !dbg !44 -// CHECK:STDOUT: %.loc9_34.1.temp = alloca [1 x i8], align 1, !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n2.var), !dbg !44 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_34.1.temp), !dbg !45 -// CHECK:STDOUT: call void @_ZN9NeedThunkC1ERKS_.carbon_thunk._(ptr %n, ptr %n2.var), !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.e015ef96e8aea788:core.Destroy.Core"(ptr %n2.var), !dbg !44 -// CHECK:STDOUT: ret void, !dbg !47 +// CHECK:STDOUT: %n2.var = alloca [1 x i8], align 1, !dbg !46 +// CHECK:STDOUT: %.loc9_34.1.temp = alloca [1 x i8], align 1, !dbg !47 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n2.var), !dbg !46 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_34.1.temp), !dbg !47 +// CHECK:STDOUT: call void @_ZN9NeedThunkC1ERKS_.carbon_thunk._(ptr %n, ptr %n2.var), !dbg !47 +// CHECK:STDOUT: call void @"_CSelfDestruct.e015ef96e8aea788:core.Destroy.Core"(ptr %n2.var), !dbg !46 +// CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -120,31 +120,31 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !66 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !66 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !66 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !66 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !68 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !68 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !68 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !68 // CHECK:STDOUT: call void @_ZN9NeedThunkC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.60e3c6e2415a2ad6.Core:NeedThunk.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !50 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.60e3c6e2415a2ad6.Core:NeedThunk.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !52 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN9NeedThunkC1ERKS_.carbon_thunk._(ptr %self, ptr %return), !dbg !52 -// CHECK:STDOUT: ret void, !dbg !52 +// CHECK:STDOUT: call void @_ZN9NeedThunkC1ERKS_.carbon_thunk._(ptr %self, ptr %return), !dbg !54 +// CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e015ef96e8aea788:core.Destroy.Core"(ptr %self) #0 !dbg !54 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e015ef96e8aea788:core.Destroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy:thunk:Destroy.092ad14c7174f642.Core:NeedThunk.Cpp"(ptr %self) #2 !dbg !58 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy:thunk:Destroy.092ad14c7174f642.Core:NeedThunk.Cpp"(ptr %self) #2 !dbg !60 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !60 +// CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -161,49 +161,49 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} -// CHECK:STDOUT: !llvm.module.flags = !{!68, !69, !70, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!73} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} +// CHECK:STDOUT: !llvm.module.flags = !{!70, !71, !72, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!75} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "multiple_thunks_in_one_class.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !35 = !{null, !34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !39 = !{!34, !34} -// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !32, line: 8, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !48) -// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !34) -// CHECK:STDOUT: !44 = !DILocation(line: 9, column: 3, scope: !41) -// CHECK:STDOUT: !45 = !DILocation(line: 9, column: 34, scope: !41) -// CHECK:STDOUT: !47 = !DILocation(line: 8, column: 1, scope: !41) -// CHECK:STDOUT: !48 = !{!42} -// CHECK:STDOUT: !49 = !DIFile(filename: "./need_thunk.h", directory: "") -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.60e3c6e2415a2ad6.Core:NeedThunk.Cpp", scope: null, file: !49, line: 4, type: !40, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !53) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !34) -// CHECK:STDOUT: !52 = !DILocation(line: 4, column: 3, scope: !50) -// CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e015ef96e8aea788:core.Destroy.Core", scope: null, file: !32, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !57) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !34) -// CHECK:STDOUT: !56 = !DILocation(line: 9, column: 3, scope: !54) -// CHECK:STDOUT: !57 = !{!55} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy:thunk:Destroy.092ad14c7174f642.Core:NeedThunk.Cpp", scope: null, file: !49, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !61) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !34) -// CHECK:STDOUT: !60 = !DILocation(line: 5, column: 3, scope: !58) -// CHECK:STDOUT: !61 = !{!59} -// CHECK:STDOUT: !62 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !63 = !{!"omnipotent char", !62, i64 0} -// CHECK:STDOUT: !64 = !{!"any pointer", !63, i64 0} -// CHECK:STDOUT: !65 = !{!"p1 _ZTS9NeedThunk", !64, i64 0} -// CHECK:STDOUT: !66 = !{!65, !65, i64 0} -// CHECK:STDOUT: !68 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !69 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !70 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !71 = !{!"int", !63, i64 0} -// CHECK:STDOUT: !72 = !{!"__libc_errno", !71, i64 0} -// CHECK:STDOUT: !73 = !{!72, !71, i64 0} +// CHECK:STDOUT: !34 = !DIFile(filename: "multiple_thunks_in_one_class.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !37 = !{null, !36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !41 = !{!36, !36} +// CHECK:STDOUT: !42 = !DISubroutineType(types: !41) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !34, line: 8, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !50) +// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !36) +// CHECK:STDOUT: !46 = !DILocation(line: 9, column: 3, scope: !43) +// CHECK:STDOUT: !47 = !DILocation(line: 9, column: 34, scope: !43) +// CHECK:STDOUT: !49 = !DILocation(line: 8, column: 1, scope: !43) +// CHECK:STDOUT: !50 = !{!44} +// CHECK:STDOUT: !51 = !DIFile(filename: "./need_thunk.h", directory: "") +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.60e3c6e2415a2ad6.Core:NeedThunk.Cpp", scope: null, file: !51, line: 4, type: !42, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !55) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !36) +// CHECK:STDOUT: !54 = !DILocation(line: 4, column: 3, scope: !52) +// CHECK:STDOUT: !55 = !{!53} +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e015ef96e8aea788:core.Destroy.Core", scope: null, file: !34, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !59) +// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !36) +// CHECK:STDOUT: !58 = !DILocation(line: 9, column: 3, scope: !56) +// CHECK:STDOUT: !59 = !{!57} +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy:thunk:Destroy.092ad14c7174f642.Core:NeedThunk.Cpp", scope: null, file: !51, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !63) +// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !36) +// CHECK:STDOUT: !62 = !DILocation(line: 5, column: 3, scope: !60) +// CHECK:STDOUT: !63 = !{!61} +// CHECK:STDOUT: !64 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !65 = !{!"omnipotent char", !64, i64 0} +// CHECK:STDOUT: !66 = !{!"any pointer", !65, i64 0} +// CHECK:STDOUT: !67 = !{!"p1 _ZTS9NeedThunk", !66, i64 0} +// CHECK:STDOUT: !68 = !{!67, !67, i64 0} +// CHECK:STDOUT: !70 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !71 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !72 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !73 = !{!"int", !65, i64 0} +// CHECK:STDOUT: !74 = !{!"__libc_errno", !73, i64 0} +// CHECK:STDOUT: !75 = !{!74, !73, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'thunks_for_distinct_specializations.carbon' @@ -212,21 +212,21 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCall.Main(ptr %a, ptr %b) #0 !dbg !76 { +// CHECK:STDOUT: define void @_CCall.Main(ptr %a, ptr %b) #0 !dbg !78 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a2.var = alloca [1 x i8], align 1, !dbg !81 -// CHECK:STDOUT: %.loc12_35.1.temp = alloca [1 x i8], align 1, !dbg !82 -// CHECK:STDOUT: %b2.var = alloca [1 x i8], align 1, !dbg !84 -// CHECK:STDOUT: %.loc13_35.1.temp = alloca [1 x i8], align 1, !dbg !85 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a2.var), !dbg !81 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_35.1.temp), !dbg !82 -// CHECK:STDOUT: call void @_ZN3BoxI1AEC1ERKS1_.carbon_thunk._(ptr %a, ptr %a2.var), !dbg !82 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b2.var), !dbg !84 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_35.1.temp), !dbg !85 -// CHECK:STDOUT: call void @_ZN3BoxI1BEC1ERKS1_.carbon_thunk._(ptr %b, ptr %b2.var), !dbg !85 -// CHECK:STDOUT: call void @"_CSelfDestruct.c6bde88ac44221c1:core.Destroy.Core"(ptr %b2.var), !dbg !84 -// CHECK:STDOUT: call void @"_CSelfDestruct.35d03e94f0115619:core.Destroy.Core"(ptr %a2.var), !dbg !81 -// CHECK:STDOUT: ret void, !dbg !87 +// CHECK:STDOUT: %a2.var = alloca [1 x i8], align 1, !dbg !83 +// CHECK:STDOUT: %.loc12_35.1.temp = alloca [1 x i8], align 1, !dbg !84 +// CHECK:STDOUT: %b2.var = alloca [1 x i8], align 1, !dbg !86 +// CHECK:STDOUT: %.loc13_35.1.temp = alloca [1 x i8], align 1, !dbg !87 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a2.var), !dbg !83 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_35.1.temp), !dbg !84 +// CHECK:STDOUT: call void @_ZN3BoxI1AEC1ERKS1_.carbon_thunk._(ptr %a, ptr %a2.var), !dbg !84 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b2.var), !dbg !86 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_35.1.temp), !dbg !87 +// CHECK:STDOUT: call void @_ZN3BoxI1BEC1ERKS1_.carbon_thunk._(ptr %b, ptr %b2.var), !dbg !87 +// CHECK:STDOUT: call void @"_CSelfDestruct.c6bde88ac44221c1:core.Destroy.Core"(ptr %b2.var), !dbg !86 +// CHECK:STDOUT: call void @"_CSelfDestruct.35d03e94f0115619:core.Destroy.Core"(ptr %a2.var), !dbg !83 +// CHECK:STDOUT: ret void, !dbg !89 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -234,19 +234,19 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !107 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !107 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !107 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !107 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !109 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !109 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !109 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !109 // CHECK:STDOUT: call void @_ZN3BoxI1AEC1ERKS1_(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.c0735c73762b4d1c.Core:Box.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !90 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.c0735c73762b4d1c.Core:Box.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !92 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN3BoxI1AEC1ERKS1_.carbon_thunk._(ptr %self, ptr %return), !dbg !92 -// CHECK:STDOUT: ret void, !dbg !92 +// CHECK:STDOUT: call void @_ZN3BoxI1AEC1ERKS1_.carbon_thunk._(ptr %self, ptr %return), !dbg !94 +// CHECK:STDOUT: ret void, !dbg !94 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -254,39 +254,39 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !111 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !111 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !111 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !111 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !113 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !113 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !113 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !113 // CHECK:STDOUT: call void @_ZN3BoxI1BEC1ERKS1_(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.2c1dd62357f2b914.Core:Box.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !94 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.2c1dd62357f2b914.Core:Box.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !96 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN3BoxI1BEC1ERKS1_.carbon_thunk._(ptr %self, ptr %return), !dbg !96 -// CHECK:STDOUT: ret void, !dbg !96 +// CHECK:STDOUT: call void @_ZN3BoxI1BEC1ERKS1_.carbon_thunk._(ptr %self, ptr %return), !dbg !98 +// CHECK:STDOUT: ret void, !dbg !98 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: declare void @_ZN3BoxI1BED1Ev(ptr noundef nonnull align 1 dead_on_return(1) dereferenceable(1)) unnamed_addr #3 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c6bde88ac44221c1:core.Destroy.Core"(ptr %self) #0 !dbg !98 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c6bde88ac44221c1:core.Destroy.Core"(ptr %self) #0 !dbg !100 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN3BoxI1BED1Ev(ptr %self), !dbg !100 -// CHECK:STDOUT: ret void, !dbg !100 +// CHECK:STDOUT: call void @_ZN3BoxI1BED1Ev(ptr %self), !dbg !102 +// CHECK:STDOUT: ret void, !dbg !102 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: declare void @_ZN3BoxI1AED1Ev(ptr noundef nonnull align 1 dead_on_return(1) dereferenceable(1)) unnamed_addr #3 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.35d03e94f0115619:core.Destroy.Core"(ptr %self) #0 !dbg !102 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.35d03e94f0115619:core.Destroy.Core"(ptr %self) #0 !dbg !104 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN3BoxI1AED1Ev(ptr %self), !dbg !104 -// CHECK:STDOUT: ret void, !dbg !104 +// CHECK:STDOUT: call void @_ZN3BoxI1AED1Ev(ptr %self), !dbg !106 +// CHECK:STDOUT: ret void, !dbg !106 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -306,60 +306,60 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!75} -// CHECK:STDOUT: !llvm.module.flags = !{!68, !69, !70, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!73} +// CHECK:STDOUT: !llvm.dbg.cu = !{!77} +// CHECK:STDOUT: !llvm.module.flags = !{!70, !71, !72, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!75} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !35 = !{null, !34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !{null, !34, !34} +// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !37 = !{null, !36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = !{!34, !34} +// CHECK:STDOUT: !39 = !{null, !36, !36} // CHECK:STDOUT: !40 = !DISubroutineType(types: !39) -// CHECK:STDOUT: !62 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !63 = !{!"omnipotent char", !62, i64 0} -// CHECK:STDOUT: !64 = !{!"any pointer", !63, i64 0} -// CHECK:STDOUT: !68 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !69 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !70 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !71 = !{!"int", !63, i64 0} -// CHECK:STDOUT: !72 = !{!"__libc_errno", !71, i64 0} -// CHECK:STDOUT: !73 = !{!72, !71, i64 0} -// CHECK:STDOUT: !74 = !DIFile(filename: "thunks_for_distinct_specializations.carbon", directory: "") -// CHECK:STDOUT: !75 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !74, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !74, line: 11, type: !38, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !88) -// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !34) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 2, scope: !76, type: !34) -// CHECK:STDOUT: !81 = !DILocation(line: 12, column: 3, scope: !76) -// CHECK:STDOUT: !82 = !DILocation(line: 12, column: 35, scope: !76) -// CHECK:STDOUT: !84 = !DILocation(line: 13, column: 3, scope: !76) -// CHECK:STDOUT: !85 = !DILocation(line: 13, column: 35, scope: !76) -// CHECK:STDOUT: !87 = !DILocation(line: 11, column: 1, scope: !76) -// CHECK:STDOUT: !88 = !{!77, !78} -// CHECK:STDOUT: !89 = !DIFile(filename: "./box.h", directory: "") -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.c0735c73762b4d1c.Core:Box.Cpp", scope: null, file: !89, line: 8, type: !40, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !93) -// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !34) -// CHECK:STDOUT: !92 = !DILocation(line: 8, column: 3, scope: !90) -// CHECK:STDOUT: !93 = !{!91} -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.2c1dd62357f2b914.Core:Box.Cpp", scope: null, file: !89, line: 8, type: !40, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !97) -// CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !94, type: !34) -// CHECK:STDOUT: !96 = !DILocation(line: 8, column: 3, scope: !94) -// CHECK:STDOUT: !97 = !{!95} -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c6bde88ac44221c1:core.Destroy.Core", scope: null, file: !74, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !101) -// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !34) -// CHECK:STDOUT: !100 = !DILocation(line: 13, column: 3, scope: !98) -// CHECK:STDOUT: !101 = !{!99} -// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.35d03e94f0115619:core.Destroy.Core", scope: null, file: !74, line: 12, type: !36, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !105) -// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !34) -// CHECK:STDOUT: !104 = !DILocation(line: 12, column: 3, scope: !102) -// CHECK:STDOUT: !105 = !{!103} -// CHECK:STDOUT: !106 = !{!"p1 _ZTS3BoxI1AE", !64, i64 0} -// CHECK:STDOUT: !107 = !{!106, !106, i64 0} -// CHECK:STDOUT: !110 = !{!"p1 _ZTS3BoxI1BE", !64, i64 0} -// CHECK:STDOUT: !111 = !{!110, !110, i64 0} +// CHECK:STDOUT: !41 = !{!36, !36} +// CHECK:STDOUT: !42 = !DISubroutineType(types: !41) +// CHECK:STDOUT: !64 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !65 = !{!"omnipotent char", !64, i64 0} +// CHECK:STDOUT: !66 = !{!"any pointer", !65, i64 0} +// CHECK:STDOUT: !70 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !71 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !72 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !73 = !{!"int", !65, i64 0} +// CHECK:STDOUT: !74 = !{!"__libc_errno", !73, i64 0} +// CHECK:STDOUT: !75 = !{!74, !73, i64 0} +// CHECK:STDOUT: !76 = !DIFile(filename: "thunks_for_distinct_specializations.carbon", directory: "") +// CHECK:STDOUT: !77 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !76, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !76, line: 11, type: !40, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !90) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !36) +// CHECK:STDOUT: !80 = !DILocalVariable(arg: 2, scope: !78, type: !36) +// CHECK:STDOUT: !83 = !DILocation(line: 12, column: 3, scope: !78) +// CHECK:STDOUT: !84 = !DILocation(line: 12, column: 35, scope: !78) +// CHECK:STDOUT: !86 = !DILocation(line: 13, column: 3, scope: !78) +// CHECK:STDOUT: !87 = !DILocation(line: 13, column: 35, scope: !78) +// CHECK:STDOUT: !89 = !DILocation(line: 11, column: 1, scope: !78) +// CHECK:STDOUT: !90 = !{!79, !80} +// CHECK:STDOUT: !91 = !DIFile(filename: "./box.h", directory: "") +// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.c0735c73762b4d1c.Core:Box.Cpp", scope: null, file: !91, line: 8, type: !42, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !95) +// CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !92, type: !36) +// CHECK:STDOUT: !94 = !DILocation(line: 8, column: 3, scope: !92) +// CHECK:STDOUT: !95 = !{!93} +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.2c1dd62357f2b914.Core:Box.Cpp", scope: null, file: !91, line: 8, type: !42, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !99) +// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !36) +// CHECK:STDOUT: !98 = !DILocation(line: 8, column: 3, scope: !96) +// CHECK:STDOUT: !99 = !{!97} +// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c6bde88ac44221c1:core.Destroy.Core", scope: null, file: !76, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !103) +// CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !100, type: !36) +// CHECK:STDOUT: !102 = !DILocation(line: 13, column: 3, scope: !100) +// CHECK:STDOUT: !103 = !{!101} +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.35d03e94f0115619:core.Destroy.Core", scope: null, file: !76, line: 12, type: !38, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !107) +// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !36) +// CHECK:STDOUT: !106 = !DILocation(line: 12, column: 3, scope: !104) +// CHECK:STDOUT: !107 = !{!105} +// CHECK:STDOUT: !108 = !{!"p1 _ZTS3BoxI1AE", !66, i64 0} +// CHECK:STDOUT: !109 = !{!108, !108, i64 0} +// CHECK:STDOUT: !112 = !{!"p1 _ZTS3BoxI1BE", !66, i64 0} +// CHECK:STDOUT: !113 = !{!112, !112, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'thunks_for_anonymous_namespace_collision.carbon' @@ -372,21 +372,21 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: $_ZN7CollideC2ERKS_ = comdat any // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCall.Main(ptr %a, ptr %b) #0 !dbg !116 { +// CHECK:STDOUT: define void @_CCall.Main(ptr %a, ptr %b) #0 !dbg !118 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a2.var = alloca [1 x i8], align 1, !dbg !121 -// CHECK:STDOUT: %.loc12_32.1.temp = alloca [1 x i8], align 1, !dbg !122 -// CHECK:STDOUT: %b2.var = alloca [1 x i8], align 1, !dbg !124 -// CHECK:STDOUT: %.loc13_36.1.temp = alloca [1 x i8], align 1, !dbg !125 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a2.var), !dbg !121 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_32.1.temp), !dbg !122 -// CHECK:STDOUT: call void @_ZN7CollideC1ERKS_.carbon_thunk._(ptr %a, ptr %a2.var), !dbg !122 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b2.var), !dbg !124 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_36.1.temp), !dbg !125 -// CHECK:STDOUT: call void @_ZN12_GLOBAL__N_17CollideC1ERKS0_.carbon_thunk._(ptr %b, ptr %b2.var), !dbg !125 -// CHECK:STDOUT: call void @"_CSelfDestruct.c4db6b78eb7f0546:core.Destroy.Core"(ptr %b2.var), !dbg !124 -// CHECK:STDOUT: call void @"_CSelfDestruct.3cee6f1426a47a6f:core.Destroy.Core"(ptr %a2.var), !dbg !121 -// CHECK:STDOUT: ret void, !dbg !127 +// CHECK:STDOUT: %a2.var = alloca [1 x i8], align 1, !dbg !123 +// CHECK:STDOUT: %.loc12_32.1.temp = alloca [1 x i8], align 1, !dbg !124 +// CHECK:STDOUT: %b2.var = alloca [1 x i8], align 1, !dbg !126 +// CHECK:STDOUT: %.loc13_36.1.temp = alloca [1 x i8], align 1, !dbg !127 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a2.var), !dbg !123 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_32.1.temp), !dbg !124 +// CHECK:STDOUT: call void @_ZN7CollideC1ERKS_.carbon_thunk._(ptr %a, ptr %a2.var), !dbg !124 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b2.var), !dbg !126 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_36.1.temp), !dbg !127 +// CHECK:STDOUT: call void @_ZN12_GLOBAL__N_17CollideC1ERKS0_.carbon_thunk._(ptr %b, ptr %b2.var), !dbg !127 +// CHECK:STDOUT: call void @"_CSelfDestruct.c4db6b78eb7f0546:core.Destroy.Core"(ptr %b2.var), !dbg !126 +// CHECK:STDOUT: call void @"_CSelfDestruct.3cee6f1426a47a6f:core.Destroy.Core"(ptr %a2.var), !dbg !123 +// CHECK:STDOUT: ret void, !dbg !129 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -394,19 +394,19 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !147 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !147 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !147 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !147 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !149 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !149 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !149 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !149 // CHECK:STDOUT: call void @_ZN7CollideC2ERKS_(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.9e522bb4dbf82e5c.Core:Collide.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !130 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.9e522bb4dbf82e5c.Core:Collide.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !132 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN7CollideC1ERKS_.carbon_thunk._(ptr %self, ptr %return), !dbg !132 -// CHECK:STDOUT: ret void, !dbg !132 +// CHECK:STDOUT: call void @_ZN7CollideC1ERKS_.carbon_thunk._(ptr %self, ptr %return), !dbg !134 +// CHECK:STDOUT: ret void, !dbg !134 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -414,51 +414,51 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !150 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !150 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !150 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !150 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !152 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !152 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !152 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !152 // CHECK:STDOUT: call void @_ZN12_GLOBAL__N_17CollideC2ERKS0_(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.d1fe27f3241437fa.Core:Collide..Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !134 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.d1fe27f3241437fa.Core:Collide..Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !136 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN12_GLOBAL__N_17CollideC1ERKS0_.carbon_thunk._(ptr %self, ptr %return), !dbg !136 -// CHECK:STDOUT: ret void, !dbg !136 +// CHECK:STDOUT: call void @_ZN12_GLOBAL__N_17CollideC1ERKS0_.carbon_thunk._(ptr %self, ptr %return), !dbg !138 +// CHECK:STDOUT: ret void, !dbg !138 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN12_GLOBAL__N_17CollideD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #3 align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !150 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !152 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4db6b78eb7f0546:core.Destroy.Core"(ptr %self) #0 !dbg !138 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4db6b78eb7f0546:core.Destroy.Core"(ptr %self) #0 !dbg !140 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN12_GLOBAL__N_17CollideD2Ev(ptr %self), !dbg !140 -// CHECK:STDOUT: ret void, !dbg !140 +// CHECK:STDOUT: call void @_ZN12_GLOBAL__N_17CollideD2Ev(ptr %self), !dbg !142 +// CHECK:STDOUT: ret void, !dbg !142 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN7CollideD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #3 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !147 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !149 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3cee6f1426a47a6f:core.Destroy.Core"(ptr %self) #0 !dbg !142 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3cee6f1426a47a6f:core.Destroy.Core"(ptr %self) #0 !dbg !144 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN7CollideD2Ev(ptr %self), !dbg !144 -// CHECK:STDOUT: ret void, !dbg !144 +// CHECK:STDOUT: call void @_ZN7CollideD2Ev(ptr %self), !dbg !146 +// CHECK:STDOUT: ret void, !dbg !146 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -469,8 +469,8 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !147 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !147 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !149 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !149 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -480,8 +480,8 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !150 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !150 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !152 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !152 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -495,58 +495,58 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!115} -// CHECK:STDOUT: !llvm.module.flags = !{!68, !69, !70, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!73} +// CHECK:STDOUT: !llvm.dbg.cu = !{!117} +// CHECK:STDOUT: !llvm.module.flags = !{!70, !71, !72, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!75} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !35 = !{null, !34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !{null, !34, !34} +// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !37 = !{null, !36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = !{!34, !34} +// CHECK:STDOUT: !39 = !{null, !36, !36} // CHECK:STDOUT: !40 = !DISubroutineType(types: !39) -// CHECK:STDOUT: !62 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !63 = !{!"omnipotent char", !62, i64 0} -// CHECK:STDOUT: !64 = !{!"any pointer", !63, i64 0} -// CHECK:STDOUT: !68 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !69 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !70 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !71 = !{!"int", !63, i64 0} -// CHECK:STDOUT: !72 = !{!"__libc_errno", !71, i64 0} -// CHECK:STDOUT: !73 = !{!72, !71, i64 0} -// CHECK:STDOUT: !114 = !DIFile(filename: "thunks_for_anonymous_namespace_collision.carbon", directory: "") -// CHECK:STDOUT: !115 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !114, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !114, line: 11, type: !38, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !128) -// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !34) -// CHECK:STDOUT: !118 = !DILocalVariable(arg: 2, scope: !116, type: !34) -// CHECK:STDOUT: !121 = !DILocation(line: 12, column: 3, scope: !116) -// CHECK:STDOUT: !122 = !DILocation(line: 12, column: 32, scope: !116) -// CHECK:STDOUT: !124 = !DILocation(line: 13, column: 3, scope: !116) -// CHECK:STDOUT: !125 = !DILocation(line: 13, column: 36, scope: !116) -// CHECK:STDOUT: !127 = !DILocation(line: 11, column: 1, scope: !116) -// CHECK:STDOUT: !128 = !{!117, !118} -// CHECK:STDOUT: !129 = !DIFile(filename: "./anonymous_namespace_collision.h", directory: "") -// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.9e522bb4dbf82e5c.Core:Collide.Cpp", scope: null, file: !129, line: 17, type: !40, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !133) -// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !34) -// CHECK:STDOUT: !132 = !DILocation(line: 17, column: 3, scope: !130) -// CHECK:STDOUT: !133 = !{!131} -// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.d1fe27f3241437fa.Core:Collide..Cpp", scope: null, file: !129, line: 8, type: !40, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !137) -// CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !134, type: !34) -// CHECK:STDOUT: !136 = !DILocation(line: 8, column: 3, scope: !134) -// CHECK:STDOUT: !137 = !{!135} -// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4db6b78eb7f0546:core.Destroy.Core", scope: null, file: !114, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !141) -// CHECK:STDOUT: !139 = !DILocalVariable(arg: 1, scope: !138, type: !34) -// CHECK:STDOUT: !140 = !DILocation(line: 13, column: 3, scope: !138) -// CHECK:STDOUT: !141 = !{!139} -// CHECK:STDOUT: !142 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3cee6f1426a47a6f:core.Destroy.Core", scope: null, file: !114, line: 12, type: !36, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !145) -// CHECK:STDOUT: !143 = !DILocalVariable(arg: 1, scope: !142, type: !34) -// CHECK:STDOUT: !144 = !DILocation(line: 12, column: 3, scope: !142) -// CHECK:STDOUT: !145 = !{!143} -// CHECK:STDOUT: !146 = !{!"p1 _ZTS7Collide", !64, i64 0} -// CHECK:STDOUT: !147 = !{!146, !146, i64 0} -// CHECK:STDOUT: !149 = !{!"p1 _ZTSN12_GLOBAL__N_17CollideE", !64, i64 0} -// CHECK:STDOUT: !150 = !{!149, !149, i64 0} +// CHECK:STDOUT: !41 = !{!36, !36} +// CHECK:STDOUT: !42 = !DISubroutineType(types: !41) +// CHECK:STDOUT: !64 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !65 = !{!"omnipotent char", !64, i64 0} +// CHECK:STDOUT: !66 = !{!"any pointer", !65, i64 0} +// CHECK:STDOUT: !70 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !71 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !72 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !73 = !{!"int", !65, i64 0} +// CHECK:STDOUT: !74 = !{!"__libc_errno", !73, i64 0} +// CHECK:STDOUT: !75 = !{!74, !73, i64 0} +// CHECK:STDOUT: !116 = !DIFile(filename: "thunks_for_anonymous_namespace_collision.carbon", directory: "") +// CHECK:STDOUT: !117 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !116, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !116, line: 11, type: !40, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !130) +// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !36) +// CHECK:STDOUT: !120 = !DILocalVariable(arg: 2, scope: !118, type: !36) +// CHECK:STDOUT: !123 = !DILocation(line: 12, column: 3, scope: !118) +// CHECK:STDOUT: !124 = !DILocation(line: 12, column: 32, scope: !118) +// CHECK:STDOUT: !126 = !DILocation(line: 13, column: 3, scope: !118) +// CHECK:STDOUT: !127 = !DILocation(line: 13, column: 36, scope: !118) +// CHECK:STDOUT: !129 = !DILocation(line: 11, column: 1, scope: !118) +// CHECK:STDOUT: !130 = !{!119, !120} +// CHECK:STDOUT: !131 = !DIFile(filename: "./anonymous_namespace_collision.h", directory: "") +// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.9e522bb4dbf82e5c.Core:Collide.Cpp", scope: null, file: !131, line: 17, type: !42, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !135) +// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !36) +// CHECK:STDOUT: !134 = !DILocation(line: 17, column: 3, scope: !132) +// CHECK:STDOUT: !135 = !{!133} +// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.d1fe27f3241437fa.Core:Collide..Cpp", scope: null, file: !131, line: 8, type: !42, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !139) +// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !36) +// CHECK:STDOUT: !138 = !DILocation(line: 8, column: 3, scope: !136) +// CHECK:STDOUT: !139 = !{!137} +// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4db6b78eb7f0546:core.Destroy.Core", scope: null, file: !116, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !143) +// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !36) +// CHECK:STDOUT: !142 = !DILocation(line: 13, column: 3, scope: !140) +// CHECK:STDOUT: !143 = !{!141} +// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3cee6f1426a47a6f:core.Destroy.Core", scope: null, file: !116, line: 12, type: !38, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !147) +// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !36) +// CHECK:STDOUT: !146 = !DILocation(line: 12, column: 3, scope: !144) +// CHECK:STDOUT: !147 = !{!145} +// CHECK:STDOUT: !148 = !{!"p1 _ZTS7Collide", !66, i64 0} +// CHECK:STDOUT: !149 = !{!148, !148, i64 0} +// CHECK:STDOUT: !151 = !{!"p1 _ZTSN12_GLOBAL__N_17CollideE", !66, i64 0} +// CHECK:STDOUT: !152 = !{!151, !151, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/packages/imported_package_mangle.carbon b/toolchain/lower/testdata/packages/imported_package_mangle.carbon index 182f819db7a2..5257223b24cb 100644 --- a/toolchain/lower/testdata/packages/imported_package_mangle.carbon +++ b/toolchain/lower/testdata/packages/imported_package_mangle.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -94,158 +94,158 @@ fn G() { // CHECK:STDOUT: source_filename = "a.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.f327915d949d024f:I.A"() #0 !dbg !22 { +// CHECK:STDOUT: define void @"_CF.Array.c34a6de08fb29ead.Core:I.A"() #0 !dbg !38 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !23 +// CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!19} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !18 = !DIFile(filename: "a.carbon", directory: "") -// CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !20 = !{null} -// CHECK:STDOUT: !21 = !DISubroutineType(types: !20) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "F", linkageName: "_CF.f327915d949d024f:I.A", scope: null, file: !18, line: 10, type: !21, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !23 = !DILocation(line: 10, column: 3, scope: !22) +// CHECK:STDOUT: !34 = !DIFile(filename: "a.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !{null} +// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "F", linkageName: "_CF.Array.c34a6de08fb29ead.Core:I.A", scope: null, file: !34, line: 10, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !39 = !DILocation(line: 10, column: 3, scope: !38) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'b.carbon' // CHECK:STDOUT: source_filename = "b.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.B() #0 !dbg !26 { +// CHECK:STDOUT: define void @_CG.B() #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CF.f327915d949d024f:I.A"(), !dbg !27 -// CHECK:STDOUT: call void @"_CF.b11ad1d729c16944:I.A.91a8a89714fbc21c"(), !dbg !28 -// CHECK:STDOUT: ret void, !dbg !29 +// CHECK:STDOUT: call void @"_CF.Array.c34a6de08fb29ead.Core:I.A"(), !dbg !43 +// CHECK:STDOUT: call void @"_CF.Array.4bcaa430271e27dc.Core:I.A.91a8a89714fbc21c"(), !dbg !44 +// CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CF.f327915d949d024f:I.A"() +// CHECK:STDOUT: declare void @"_CF.Array.c34a6de08fb29ead.Core:I.A"() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CF.b11ad1d729c16944:I.A.91a8a89714fbc21c"() #0 !dbg !30 { -// CHECK:STDOUT: ret void, !dbg !31 +// CHECK:STDOUT: define linkonce_odr void @"_CF.Array.4bcaa430271e27dc.Core:I.A.91a8a89714fbc21c"() #0 !dbg !46 { +// CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!25} +// CHECK:STDOUT: !llvm.dbg.cu = !{!41} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !18 = !DIFile(filename: "a.carbon", directory: "") -// CHECK:STDOUT: !20 = !{null} -// CHECK:STDOUT: !21 = !DISubroutineType(types: !20) -// CHECK:STDOUT: !24 = !DIFile(filename: "b.carbon", directory: "") -// CHECK:STDOUT: !25 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !24, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "G", linkageName: "_CG.B", scope: null, file: !24, line: 4, type: !21, spFlags: DISPFlagDefinition, unit: !25) -// CHECK:STDOUT: !27 = !DILocation(line: 7, column: 3, scope: !26) -// CHECK:STDOUT: !28 = !DILocation(line: 10, column: 3, scope: !26) -// CHECK:STDOUT: !29 = !DILocation(line: 4, column: 1, scope: !26) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "F", linkageName: "_CF.b11ad1d729c16944:I.A.91a8a89714fbc21c", scope: null, file: !18, line: 14, type: !21, spFlags: DISPFlagDefinition, unit: !25) -// CHECK:STDOUT: !31 = !DILocation(line: 14, column: 3, scope: !30) +// CHECK:STDOUT: !34 = !DIFile(filename: "a.carbon", directory: "") +// CHECK:STDOUT: !36 = !{null} +// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) +// CHECK:STDOUT: !40 = !DIFile(filename: "b.carbon", directory: "") +// CHECK:STDOUT: !41 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !40, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "G", linkageName: "_CG.B", scope: null, file: !40, line: 4, type: !37, spFlags: DISPFlagDefinition, unit: !41) +// CHECK:STDOUT: !43 = !DILocation(line: 7, column: 3, scope: !42) +// CHECK:STDOUT: !44 = !DILocation(line: 10, column: 3, scope: !42) +// CHECK:STDOUT: !45 = !DILocation(line: 4, column: 1, scope: !42) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "F", linkageName: "_CF.Array.4bcaa430271e27dc.Core:I.A.91a8a89714fbc21c", scope: null, file: !34, line: 14, type: !37, spFlags: DISPFlagDefinition, unit: !41) +// CHECK:STDOUT: !47 = !DILocation(line: 14, column: 3, scope: !46) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'c.carbon' // CHECK:STDOUT: source_filename = "c.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.f6938aeb3cf77e6f:I.C"() #0 !dbg !34 { +// CHECK:STDOUT: define void @"_CF.Array.64dce905b462d459.Core:I.C"() #0 !dbg !50 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !35 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.f6938aeb3cf77e6f:I.A"() #0 !dbg !36 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !37 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.f327915d949d024f:I.C"() #0 !dbg !38 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !39 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.C() #0 !dbg !40 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CF.f327915d949d024f:I.A"(), !dbg !41 -// CHECK:STDOUT: call void @"_CF.f6938aeb3cf77e6f:I.A"(), !dbg !42 -// CHECK:STDOUT: call void @"_CF.f327915d949d024f:I.C"(), !dbg !43 -// CHECK:STDOUT: call void @"_CF.f6938aeb3cf77e6f:I.C"(), !dbg !44 -// CHECK:STDOUT: call void @"_CF.b11ad1d729c16944:I.A.91a8a89714fbc21c"(), !dbg !45 -// CHECK:STDOUT: call void @"_CF.c2375ae0b92fd5ec:I.A.91a8a89714fbc21c"(), !dbg !46 -// CHECK:STDOUT: call void @"_CF.b11ad1d729c16944:I.C.91a8a89714fbc21c"(), !dbg !47 -// CHECK:STDOUT: call void @"_CF.c2375ae0b92fd5ec:I.C.91a8a89714fbc21c"(), !dbg !48 -// CHECK:STDOUT: ret void, !dbg !49 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CF.f327915d949d024f:I.A"() -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CF.b11ad1d729c16944:I.A.91a8a89714fbc21c"() #0 !dbg !50 { // CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CF.c2375ae0b92fd5ec:I.A.91a8a89714fbc21c"() #0 !dbg !52 { +// CHECK:STDOUT: define void @"_CF.Array.64dce905b462d459.Core:I.A"() #0 !dbg !52 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CF.b11ad1d729c16944:I.C.91a8a89714fbc21c"() #0 !dbg !54 { +// CHECK:STDOUT: define void @"_CF.Array.c34a6de08fb29ead.Core:I.C"() #0 !dbg !54 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CF.c2375ae0b92fd5ec:I.C.91a8a89714fbc21c"() #0 !dbg !56 { +// CHECK:STDOUT: define void @_CG.C() #0 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: call void @"_CF.Array.c34a6de08fb29ead.Core:I.A"(), !dbg !57 +// CHECK:STDOUT: call void @"_CF.Array.64dce905b462d459.Core:I.A"(), !dbg !58 +// CHECK:STDOUT: call void @"_CF.Array.c34a6de08fb29ead.Core:I.C"(), !dbg !59 +// CHECK:STDOUT: call void @"_CF.Array.64dce905b462d459.Core:I.C"(), !dbg !60 +// CHECK:STDOUT: call void @"_CF.Array.4bcaa430271e27dc.Core:I.A.91a8a89714fbc21c"(), !dbg !61 +// CHECK:STDOUT: call void @"_CF.Array.3fc281a4708ed92c.Core:I.A.91a8a89714fbc21c"(), !dbg !62 +// CHECK:STDOUT: call void @"_CF.Array.4bcaa430271e27dc.Core:I.C.91a8a89714fbc21c"(), !dbg !63 +// CHECK:STDOUT: call void @"_CF.Array.3fc281a4708ed92c.Core:I.C.91a8a89714fbc21c"(), !dbg !64 +// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: declare void @"_CF.Array.c34a6de08fb29ead.Core:I.A"() +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @"_CF.Array.4bcaa430271e27dc.Core:I.A.91a8a89714fbc21c"() #0 !dbg !66 { +// CHECK:STDOUT: ret void, !dbg !67 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @"_CF.Array.3fc281a4708ed92c.Core:I.A.91a8a89714fbc21c"() #0 !dbg !68 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @"_CF.Array.4bcaa430271e27dc.Core:I.C.91a8a89714fbc21c"() #0 !dbg !70 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !71 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @"_CF.Array.3fc281a4708ed92c.Core:I.C.91a8a89714fbc21c"() #0 !dbg !72 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!49} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !18 = !DIFile(filename: "a.carbon", directory: "") -// CHECK:STDOUT: !20 = !{null} -// CHECK:STDOUT: !21 = !DISubroutineType(types: !20) -// CHECK:STDOUT: !32 = !DIFile(filename: "c.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "F", linkageName: "_CF.f6938aeb3cf77e6f:I.C", scope: null, file: !32, line: 12, type: !21, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !35 = !DILocation(line: 12, column: 3, scope: !34) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "F", linkageName: "_CF.f6938aeb3cf77e6f:I.A", scope: null, file: !32, line: 20, type: !21, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !37 = !DILocation(line: 20, column: 3, scope: !36) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "F", linkageName: "_CF.f327915d949d024f:I.C", scope: null, file: !32, line: 28, type: !21, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !39 = !DILocation(line: 28, column: 3, scope: !38) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "G", linkageName: "_CG.C", scope: null, file: !32, line: 35, type: !21, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !41 = !DILocation(line: 37, column: 3, scope: !40) -// CHECK:STDOUT: !42 = !DILocation(line: 38, column: 3, scope: !40) -// CHECK:STDOUT: !43 = !DILocation(line: 39, column: 3, scope: !40) -// CHECK:STDOUT: !44 = !DILocation(line: 40, column: 3, scope: !40) -// CHECK:STDOUT: !45 = !DILocation(line: 43, column: 3, scope: !40) -// CHECK:STDOUT: !46 = !DILocation(line: 44, column: 3, scope: !40) -// CHECK:STDOUT: !47 = !DILocation(line: 45, column: 3, scope: !40) -// CHECK:STDOUT: !48 = !DILocation(line: 46, column: 3, scope: !40) -// CHECK:STDOUT: !49 = !DILocation(line: 35, column: 1, scope: !40) -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "F", linkageName: "_CF.b11ad1d729c16944:I.A.91a8a89714fbc21c", scope: null, file: !18, line: 14, type: !21, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !51 = !DILocation(line: 14, column: 3, scope: !50) -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "F", linkageName: "_CF.c2375ae0b92fd5ec:I.A.91a8a89714fbc21c", scope: null, file: !32, line: 24, type: !21, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !53 = !DILocation(line: 24, column: 3, scope: !52) -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "F", linkageName: "_CF.b11ad1d729c16944:I.C.91a8a89714fbc21c", scope: null, file: !32, line: 32, type: !21, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !55 = !DILocation(line: 32, column: 3, scope: !54) -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "F", linkageName: "_CF.c2375ae0b92fd5ec:I.C.91a8a89714fbc21c", scope: null, file: !32, line: 16, type: !21, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !57 = !DILocation(line: 16, column: 3, scope: !56) +// CHECK:STDOUT: !34 = !DIFile(filename: "a.carbon", directory: "") +// CHECK:STDOUT: !36 = !{null} +// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) +// CHECK:STDOUT: !48 = !DIFile(filename: "c.carbon", directory: "") +// CHECK:STDOUT: !49 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !48, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "F", linkageName: "_CF.Array.64dce905b462d459.Core:I.C", scope: null, file: !48, line: 12, type: !37, spFlags: DISPFlagDefinition, unit: !49) +// CHECK:STDOUT: !51 = !DILocation(line: 12, column: 3, scope: !50) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "F", linkageName: "_CF.Array.64dce905b462d459.Core:I.A", scope: null, file: !48, line: 20, type: !37, spFlags: DISPFlagDefinition, unit: !49) +// CHECK:STDOUT: !53 = !DILocation(line: 20, column: 3, scope: !52) +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "F", linkageName: "_CF.Array.c34a6de08fb29ead.Core:I.C", scope: null, file: !48, line: 28, type: !37, spFlags: DISPFlagDefinition, unit: !49) +// CHECK:STDOUT: !55 = !DILocation(line: 28, column: 3, scope: !54) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "G", linkageName: "_CG.C", scope: null, file: !48, line: 35, type: !37, spFlags: DISPFlagDefinition, unit: !49) +// CHECK:STDOUT: !57 = !DILocation(line: 37, column: 3, scope: !56) +// CHECK:STDOUT: !58 = !DILocation(line: 38, column: 3, scope: !56) +// CHECK:STDOUT: !59 = !DILocation(line: 39, column: 3, scope: !56) +// CHECK:STDOUT: !60 = !DILocation(line: 40, column: 3, scope: !56) +// CHECK:STDOUT: !61 = !DILocation(line: 43, column: 3, scope: !56) +// CHECK:STDOUT: !62 = !DILocation(line: 44, column: 3, scope: !56) +// CHECK:STDOUT: !63 = !DILocation(line: 45, column: 3, scope: !56) +// CHECK:STDOUT: !64 = !DILocation(line: 46, column: 3, scope: !56) +// CHECK:STDOUT: !65 = !DILocation(line: 35, column: 1, scope: !56) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "F", linkageName: "_CF.Array.4bcaa430271e27dc.Core:I.A.91a8a89714fbc21c", scope: null, file: !34, line: 14, type: !37, spFlags: DISPFlagDefinition, unit: !49) +// CHECK:STDOUT: !67 = !DILocation(line: 14, column: 3, scope: !66) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "F", linkageName: "_CF.Array.3fc281a4708ed92c.Core:I.A.91a8a89714fbc21c", scope: null, file: !48, line: 24, type: !37, spFlags: DISPFlagDefinition, unit: !49) +// CHECK:STDOUT: !69 = !DILocation(line: 24, column: 3, scope: !68) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "F", linkageName: "_CF.Array.4bcaa430271e27dc.Core:I.C.91a8a89714fbc21c", scope: null, file: !48, line: 32, type: !37, spFlags: DISPFlagDefinition, unit: !49) +// CHECK:STDOUT: !71 = !DILocation(line: 32, column: 3, scope: !70) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "F", linkageName: "_CF.Array.3fc281a4708ed92c.Core:I.C.91a8a89714fbc21c", scope: null, file: !48, line: 16, type: !37, spFlags: DISPFlagDefinition, unit: !49) +// CHECK:STDOUT: !73 = !DILocation(line: 16, column: 3, scope: !72) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/packages/imported_package_mangle_string.carbon b/toolchain/lower/testdata/packages/imported_package_mangle_string.carbon index aa556615a6f6..9c1bf87d9616 100644 --- a/toolchain/lower/testdata/packages/imported_package_mangle_string.carbon +++ b/toolchain/lower/testdata/packages/imported_package_mangle_string.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // // EXTRA-ARGS: --mangle-string-fingerprint // @@ -46,62 +46,62 @@ fn G() { // CHECK:STDOUT: source_filename = "a.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.{array_type,{int_value,{Core.IntLiteral},1},{class_type,C,A,,!invalid,!invalid}}:I.A"() #0 !dbg !22 { +// CHECK:STDOUT: define void @"_CF.Array.{2,{class_type,C,A,,!invalid,!invalid},{int_value,{Core.IntLiteral},1}}.Core:I.A"() #0 !dbg !38 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !23 +// CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.{array_type,{int_value,{Core.IntLiteral},1},{class_type,D,N,A,!invalid,!invalid}}:I.A"() #0 !dbg !24 { +// CHECK:STDOUT: define void @"_CF.Array.{2,{class_type,D,N,A,!invalid,!invalid},{int_value,{Core.IntLiteral},1}}.Core:I.A"() #0 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !25 +// CHECK:STDOUT: ret void, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!19} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !18 = !DIFile(filename: "a.carbon", directory: "") -// CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !20 = !{null} -// CHECK:STDOUT: !21 = !DISubroutineType(types: !20) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "F", linkageName: "_CF.{array_type,{int_value,{Core.IntLiteral},1},{class_type,C,A,,!invalid,!invalid}}:I.A", scope: null, file: !18, line: 10, type: !21, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !23 = !DILocation(line: 10, column: 3, scope: !22) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "F", linkageName: "_CF.{array_type,{int_value,{Core.IntLiteral},1},{class_type,D,N,A,!invalid,!invalid}}:I.A", scope: null, file: !18, line: 17, type: !21, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !25 = !DILocation(line: 17, column: 3, scope: !24) +// CHECK:STDOUT: !34 = !DIFile(filename: "a.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !{null} +// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "F", linkageName: "_CF.Array.{2,{class_type,C,A,,!invalid,!invalid},{int_value,{Core.IntLiteral},1}}.Core:I.A", scope: null, file: !34, line: 10, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !39 = !DILocation(line: 10, column: 3, scope: !38) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "F", linkageName: "_CF.Array.{2,{class_type,D,N,A,!invalid,!invalid},{int_value,{Core.IntLiteral},1}}.Core:I.A", scope: null, file: !34, line: 17, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !41 = !DILocation(line: 17, column: 3, scope: !40) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'b.carbon' // CHECK:STDOUT: source_filename = "b.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.B() #0 !dbg !28 { +// CHECK:STDOUT: define void @_CG.B() #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CF.{array_type,{int_value,{Core.IntLiteral},1},{class_type,C,A,,!invalid,!invalid}}:I.A"(), !dbg !29 -// CHECK:STDOUT: call void @"_CF.{array_type,{int_value,{Core.IntLiteral},1},{class_type,D,N,A,!invalid,!invalid}}:I.A"(), !dbg !30 -// CHECK:STDOUT: ret void, !dbg !31 +// CHECK:STDOUT: call void @"_CF.Array.{2,{class_type,C,A,,!invalid,!invalid},{int_value,{Core.IntLiteral},1}}.Core:I.A"(), !dbg !45 +// CHECK:STDOUT: call void @"_CF.Array.{2,{class_type,D,N,A,!invalid,!invalid},{int_value,{Core.IntLiteral},1}}.Core:I.A"(), !dbg !46 +// CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CF.{array_type,{int_value,{Core.IntLiteral},1},{class_type,C,A,,!invalid,!invalid}}:I.A"() +// CHECK:STDOUT: declare void @"_CF.Array.{2,{class_type,C,A,,!invalid,!invalid},{int_value,{Core.IntLiteral},1}}.Core:I.A"() // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CF.{array_type,{int_value,{Core.IntLiteral},1},{class_type,D,N,A,!invalid,!invalid}}:I.A"() +// CHECK:STDOUT: declare void @"_CF.Array.{2,{class_type,D,N,A,!invalid,!invalid},{int_value,{Core.IntLiteral},1}}.Core:I.A"() // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!27} +// CHECK:STDOUT: !llvm.dbg.cu = !{!43} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !20 = !{null} -// CHECK:STDOUT: !21 = !DISubroutineType(types: !20) -// CHECK:STDOUT: !26 = !DIFile(filename: "b.carbon", directory: "") -// CHECK:STDOUT: !27 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !26, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "G", linkageName: "_CG.B", scope: null, file: !26, line: 4, type: !21, spFlags: DISPFlagDefinition, unit: !27) -// CHECK:STDOUT: !29 = !DILocation(line: 5, column: 3, scope: !28) -// CHECK:STDOUT: !30 = !DILocation(line: 6, column: 3, scope: !28) -// CHECK:STDOUT: !31 = !DILocation(line: 4, column: 1, scope: !28) +// CHECK:STDOUT: !36 = !{null} +// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) +// CHECK:STDOUT: !42 = !DIFile(filename: "b.carbon", directory: "") +// CHECK:STDOUT: !43 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !42, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "G", linkageName: "_CG.B", scope: null, file: !42, line: 4, type: !37, spFlags: DISPFlagDefinition, unit: !43) +// CHECK:STDOUT: !45 = !DILocation(line: 5, column: 3, scope: !44) +// CHECK:STDOUT: !46 = !DILocation(line: 6, column: 3, scope: !44) +// CHECK:STDOUT: !47 = !DILocation(line: 4, column: 1, scope: !44) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/primitives/numeric_literals.carbon b/toolchain/lower/testdata/primitives/numeric_literals.carbon index 6d07a6f6a76f..9be6ab323b37 100644 --- a/toolchain/lower/testdata/primitives/numeric_literals.carbon +++ b/toolchain/lower/testdata/primitives/numeric_literals.carbon @@ -33,89 +33,89 @@ fn F() { // CHECK:STDOUT: ; ModuleID = 'numeric_literals.carbon' // CHECK:STDOUT: source_filename = "numeric_literals.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @array.f6b.loc16_3 = internal constant [4 x i32] [i32 8, i32 9, i32 8, i32 8] -// CHECK:STDOUT: @array.69b.loc22_3 = internal constant [6 x double] [double 9.000000e-01, double 8.000000e+00, double 8.000000e+01, double 1.000000e+07, double 1.000000e+08, double 1.000000e-08] +// CHECK:STDOUT: @array.311.loc16_3 = internal constant [4 x i32] [i32 8, i32 9, i32 8, i32 8] +// CHECK:STDOUT: @array.4d5.loc22_3 = internal constant [6 x double] [double 9.000000e-01, double 8.000000e+00, double 8.000000e+01, double 1.000000e+07, double 1.000000e+08, double 1.000000e-08] // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !42 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var.loc16 = alloca [4 x i32], align 4, !dbg !43 -// CHECK:STDOUT: %_.var.loc22 = alloca [6 x double], align 8, !dbg !46 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !43 -// CHECK:STDOUT: %.loc21_3.3.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 0, !dbg !44 -// CHECK:STDOUT: %.loc21_3.6.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 1, !dbg !44 -// CHECK:STDOUT: %.loc21_3.9.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 2, !dbg !44 -// CHECK:STDOUT: %.loc21_3.12.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 3, !dbg !44 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %_.var.loc16, ptr align 4 @array.f6b.loc16_3, i64 16, i1 false), !dbg !43 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc22), !dbg !46 -// CHECK:STDOUT: %.loc29_3.3.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 0, !dbg !47 -// CHECK:STDOUT: %.loc29_3.6.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 1, !dbg !47 -// CHECK:STDOUT: %.loc29_3.9.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 2, !dbg !47 -// CHECK:STDOUT: %.loc29_3.12.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 3, !dbg !47 -// CHECK:STDOUT: %.loc29_3.15.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 4, !dbg !47 -// CHECK:STDOUT: %.loc29_3.18.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 5, !dbg !47 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc22, ptr align 8 @array.69b.loc22_3, i64 48, i1 false), !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.2891f36f5aa8bde4:core.Destroy.Core"(ptr %_.var.loc22), !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core"(ptr %_.var.loc16), !dbg !43 -// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: %_.var.loc16 = alloca [4 x i32], align 4, !dbg !45 +// CHECK:STDOUT: %_.var.loc22 = alloca [6 x double], align 8, !dbg !48 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !45 +// CHECK:STDOUT: %.loc21_3.3.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 0, !dbg !46 +// CHECK:STDOUT: %.loc21_3.6.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 1, !dbg !46 +// CHECK:STDOUT: %.loc21_3.9.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 2, !dbg !46 +// CHECK:STDOUT: %.loc21_3.12.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 3, !dbg !46 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %_.var.loc16, ptr align 4 @array.311.loc16_3, i64 16, i1 false), !dbg !45 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc22), !dbg !48 +// CHECK:STDOUT: %.loc29_3.3.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 0, !dbg !49 +// CHECK:STDOUT: %.loc29_3.6.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 1, !dbg !49 +// CHECK:STDOUT: %.loc29_3.9.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 2, !dbg !49 +// CHECK:STDOUT: %.loc29_3.12.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 3, !dbg !49 +// CHECK:STDOUT: %.loc29_3.15.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 4, !dbg !49 +// CHECK:STDOUT: %.loc29_3.18.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 5, !dbg !49 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc22, ptr align 8 @array.4d5.loc22_3, i64 48, i1 false), !dbg !48 +// CHECK:STDOUT: call void @"_CSelfDestruct.adf7ea314117bbfa:core.Destroy.Core"(ptr %_.var.loc22), !dbg !48 +// CHECK:STDOUT: call void @"_CSelfDestruct.d15a62aea0967f8e:core.Destroy.Core"(ptr %_.var.loc16), !dbg !45 +// CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !50 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !52 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !52 +// CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2891f36f5aa8bde4:core.Destroy.Core"(ptr %self) #0 !dbg !54 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.adf7ea314117bbfa:core.Destroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22_3.1.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 5, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc22_3.1.array.index), !dbg !56 -// CHECK:STDOUT: %.loc22_3.2.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 4, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc22_3.2.array.index), !dbg !56 -// CHECK:STDOUT: %.loc22_3.3.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 3, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc22_3.3.array.index), !dbg !56 -// CHECK:STDOUT: %.loc22_3.4.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 2, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc22_3.4.array.index), !dbg !56 -// CHECK:STDOUT: %.loc22_3.5.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 1, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc22_3.5.array.index), !dbg !56 -// CHECK:STDOUT: %.loc22_3.6.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 0, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc22_3.6.array.index), !dbg !56 -// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: %.loc22_3.1.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 5, !dbg !58 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc22_3.1.array.index), !dbg !58 +// CHECK:STDOUT: %.loc22_3.2.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 4, !dbg !58 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc22_3.2.array.index), !dbg !58 +// CHECK:STDOUT: %.loc22_3.3.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 3, !dbg !58 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc22_3.3.array.index), !dbg !58 +// CHECK:STDOUT: %.loc22_3.4.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 2, !dbg !58 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc22_3.4.array.index), !dbg !58 +// CHECK:STDOUT: %.loc22_3.5.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 1, !dbg !58 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc22_3.5.array.index), !dbg !58 +// CHECK:STDOUT: %.loc22_3.6.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 0, !dbg !58 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc22_3.6.array.index), !dbg !58 +// CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2891f36f5aa8bde4:core.Destroy.Core"(ptr %self) #0 !dbg !58 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.adf7ea314117bbfa:core.Destroy.Core"(ptr %self) #0 !dbg !60 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2891f36f5aa8bde4:core.Destroy.Core"(ptr %self), !dbg !60 -// CHECK:STDOUT: ret void, !dbg !60 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.adf7ea314117bbfa:core.Destroy.Core"(ptr %self), !dbg !62 +// CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !62 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !64 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !64 +// CHECK:STDOUT: ret void, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core"(ptr %self) #0 !dbg !66 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d15a62aea0967f8e:core.Destroy.Core"(ptr %self) #0 !dbg !68 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 3, !dbg !68 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.1.array.index), !dbg !68 -// CHECK:STDOUT: %.loc16_3.2.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 2, !dbg !68 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.2.array.index), !dbg !68 -// CHECK:STDOUT: %.loc16_3.3.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 1, !dbg !68 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.3.array.index), !dbg !68 -// CHECK:STDOUT: %.loc16_3.4.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 0, !dbg !68 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.4.array.index), !dbg !68 -// CHECK:STDOUT: ret void, !dbg !68 +// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 3, !dbg !70 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.1.array.index), !dbg !70 +// CHECK:STDOUT: %.loc16_3.2.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 2, !dbg !70 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.2.array.index), !dbg !70 +// CHECK:STDOUT: %.loc16_3.3.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 1, !dbg !70 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.3.array.index), !dbg !70 +// CHECK:STDOUT: %.loc16_3.4.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 0, !dbg !70 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc16_3.4.array.index), !dbg !70 +// CHECK:STDOUT: ret void, !dbg !70 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core"(ptr %self) #0 !dbg !70 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d15a62aea0967f8e:core.Destroy.Core"(ptr %self) #0 !dbg !72 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core"(ptr %self), !dbg !72 -// CHECK:STDOUT: ret void, !dbg !72 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d15a62aea0967f8e:core.Destroy.Core"(ptr %self), !dbg !74 +// CHECK:STDOUT: ret void, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -131,49 +131,49 @@ fn F() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "numeric_literals.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !{null} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !38 = !{null, !37} -// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{null, !34} +// CHECK:STDOUT: !34 = !DIFile(filename: "numeric_literals.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !{null} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !40 = !{null, !39} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !32, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !43 = !DILocation(line: 16, column: 3, scope: !42) -// CHECK:STDOUT: !44 = !DILocation(line: 16, column: 26, scope: !42) -// CHECK:STDOUT: !46 = !DILocation(line: 22, column: 3, scope: !42) -// CHECK:STDOUT: !47 = !DILocation(line: 22, column: 26, scope: !42) -// CHECK:STDOUT: !49 = !DILocation(line: 13, column: 1, scope: !42) -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !53) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !37) -// CHECK:STDOUT: !52 = !DILocation(line: 22, column: 3, scope: !50) -// CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2891f36f5aa8bde4:core.Destroy.Core", scope: null, file: !32, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !57) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !37) -// CHECK:STDOUT: !56 = !DILocation(line: 22, column: 3, scope: !54) -// CHECK:STDOUT: !57 = !{!55} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2891f36f5aa8bde4:core.Destroy.Core", scope: null, file: !32, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !61) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !37) -// CHECK:STDOUT: !60 = !DILocation(line: 22, column: 3, scope: !58) -// CHECK:STDOUT: !61 = !{!59} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !65) -// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !34) -// CHECK:STDOUT: !64 = !DILocation(line: 16, column: 3, scope: !62) -// CHECK:STDOUT: !65 = !{!63} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core", scope: null, file: !32, line: 16, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !69) -// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !37) -// CHECK:STDOUT: !68 = !DILocation(line: 16, column: 3, scope: !66) -// CHECK:STDOUT: !69 = !{!67} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core", scope: null, file: !32, line: 16, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !73) -// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !37) -// CHECK:STDOUT: !72 = !DILocation(line: 16, column: 3, scope: !70) -// CHECK:STDOUT: !73 = !{!71} +// CHECK:STDOUT: !42 = !{null, !36} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !34, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !45 = !DILocation(line: 16, column: 3, scope: !44) +// CHECK:STDOUT: !46 = !DILocation(line: 16, column: 26, scope: !44) +// CHECK:STDOUT: !48 = !DILocation(line: 22, column: 3, scope: !44) +// CHECK:STDOUT: !49 = !DILocation(line: 22, column: 26, scope: !44) +// CHECK:STDOUT: !51 = !DILocation(line: 13, column: 1, scope: !44) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !34, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !55) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !39) +// CHECK:STDOUT: !54 = !DILocation(line: 22, column: 3, scope: !52) +// CHECK:STDOUT: !55 = !{!53} +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.adf7ea314117bbfa:core.Destroy.Core", scope: null, file: !34, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !59) +// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !39) +// CHECK:STDOUT: !58 = !DILocation(line: 22, column: 3, scope: !56) +// CHECK:STDOUT: !59 = !{!57} +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.adf7ea314117bbfa:core.Destroy.Core", scope: null, file: !34, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !63) +// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !39) +// CHECK:STDOUT: !62 = !DILocation(line: 22, column: 3, scope: !60) +// CHECK:STDOUT: !63 = !{!61} +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !34, line: 16, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !67) +// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !36) +// CHECK:STDOUT: !66 = !DILocation(line: 16, column: 3, scope: !64) +// CHECK:STDOUT: !67 = !{!65} +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d15a62aea0967f8e:core.Destroy.Core", scope: null, file: !34, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !71) +// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !39) +// CHECK:STDOUT: !70 = !DILocation(line: 16, column: 3, scope: !68) +// CHECK:STDOUT: !71 = !{!69} +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d15a62aea0967f8e:core.Destroy.Core", scope: null, file: !34, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !75) +// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !39) +// CHECK:STDOUT: !74 = !DILocation(line: 16, column: 3, scope: !72) +// CHECK:STDOUT: !75 = !{!73} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/primitives/type_values.carbon b/toolchain/lower/testdata/primitives/type_values.carbon index d3f85a53f573..0267ec29d6d9 100644 --- a/toolchain/lower/testdata/primitives/type_values.carbon +++ b/toolchain/lower/testdata/primitives/type_values.carbon @@ -29,42 +29,42 @@ fn F64() -> type { // CHECK:STDOUT: ; ModuleID = 'type_values.carbon' // CHECK:STDOUT: source_filename = "type_values.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: %type.26 = type {} +// CHECK:STDOUT: %type.28 = type {} // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define %type.26 @_CI32.Main() #0 !dbg !37 { +// CHECK:STDOUT: define %type.28 @_CI32.Main() #0 !dbg !39 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret %type.26 zeroinitializer, !dbg !40 +// CHECK:STDOUT: ret %type.28 zeroinitializer, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define %type.26 @_CI48.Main() #0 !dbg !41 { +// CHECK:STDOUT: define %type.28 @_CI48.Main() #0 !dbg !43 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret %type.26 zeroinitializer, !dbg !44 +// CHECK:STDOUT: ret %type.28 zeroinitializer, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define %type.26 @_CF64.Main() #0 !dbg !45 { +// CHECK:STDOUT: define %type.28 @_CF64.Main() #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret %type.26 zeroinitializer, !dbg !48 +// CHECK:STDOUT: ret %type.28 zeroinitializer, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "type_values.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !35 = !{!34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "I32", linkageName: "_CI32.Main", scope: null, file: !32, line: 16, type: !36, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !40 = !DILocation(line: 17, column: 3, scope: !37) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "I48", linkageName: "_CI48.Main", scope: null, file: !32, line: 20, type: !36, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !44 = !DILocation(line: 21, column: 3, scope: !41) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "F64", linkageName: "_CF64.Main", scope: null, file: !32, line: 24, type: !36, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !48 = !DILocation(line: 25, column: 3, scope: !45) +// CHECK:STDOUT: !34 = !DIFile(filename: "type_values.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !37 = !{!36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "I32", linkageName: "_CI32.Main", scope: null, file: !34, line: 16, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !42 = !DILocation(line: 17, column: 3, scope: !39) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "I48", linkageName: "_CI48.Main", scope: null, file: !34, line: 20, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !46 = !DILocation(line: 21, column: 3, scope: !43) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "F64", linkageName: "_CF64.Main", scope: null, file: !34, line: 24, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !50 = !DILocation(line: 25, column: 3, scope: !47) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/member_access.carbon b/toolchain/lower/testdata/struct/member_access.carbon index e26c746f26cf..f960c8ed34fb 100644 --- a/toolchain/lower/testdata/struct/member_access.carbon +++ b/toolchain/lower/testdata/struct/member_access.carbon @@ -24,55 +24,55 @@ fn Run() -> i32 { // CHECK:STDOUT: @struct.77f.loc14_3 = internal constant <{ double, i32 }> <{ double 0.000000e+00, i32 1 }> // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !42 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca <{ double, i32 }>, align 8, !dbg !45 -// CHECK:STDOUT: %y.var = alloca i32, align 4, !dbg !48 -// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !51 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !45 -// CHECK:STDOUT: %.loc14_48.3.a = getelementptr inbounds nuw <{ double, i32 }>, ptr %x.var, i32 0, i32 0, !dbg !46 -// CHECK:STDOUT: %.loc14_48.6.b = getelementptr inbounds nuw <{ double, i32 }>, ptr %x.var, i32 0, i32 1, !dbg !46 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %x.var, ptr align 8 @struct.77f.loc14_3, i64 12, i1 false), !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !48 -// CHECK:STDOUT: %.loc15_17.1.b = getelementptr inbounds nuw <{ double, i32 }>, ptr %x.var, i32 0, i32 1, !dbg !49 -// CHECK:STDOUT: %.loc15_17.2 = load i32, ptr %.loc15_17.1.b, align 4, !dbg !49 -// CHECK:STDOUT: store i32 %.loc15_17.2, ptr %y.var, align 4, !dbg !48 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !51 -// CHECK:STDOUT: %.loc16 = load i32, ptr %y.var, align 4, !dbg !52 -// CHECK:STDOUT: store i32 %.loc16, ptr %_.var, align 4, !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %_.var), !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %y.var), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.09c9bb256d6f25f6:core.Destroy.Core"(ptr %x.var), !dbg !45 -// CHECK:STDOUT: ret i32 0, !dbg !54 +// CHECK:STDOUT: %x.var = alloca <{ double, i32 }>, align 8, !dbg !47 +// CHECK:STDOUT: %y.var = alloca i32, align 4, !dbg !50 +// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !53 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !47 +// CHECK:STDOUT: %.loc14_48.3.a = getelementptr inbounds nuw <{ double, i32 }>, ptr %x.var, i32 0, i32 0, !dbg !48 +// CHECK:STDOUT: %.loc14_48.6.b = getelementptr inbounds nuw <{ double, i32 }>, ptr %x.var, i32 0, i32 1, !dbg !48 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %x.var, ptr align 8 @struct.77f.loc14_3, i64 12, i1 false), !dbg !47 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !50 +// CHECK:STDOUT: %.loc15_17.1.b = getelementptr inbounds nuw <{ double, i32 }>, ptr %x.var, i32 0, i32 1, !dbg !51 +// CHECK:STDOUT: %.loc15_17.2 = load i32, ptr %.loc15_17.1.b, align 4, !dbg !51 +// CHECK:STDOUT: store i32 %.loc15_17.2, ptr %y.var, align 4, !dbg !50 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !53 +// CHECK:STDOUT: %.loc16 = load i32, ptr %y.var, align 4, !dbg !54 +// CHECK:STDOUT: store i32 %.loc16, ptr %_.var, align 4, !dbg !53 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %_.var), !dbg !53 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %y.var), !dbg !50 +// CHECK:STDOUT: call void @"_CSelfDestruct.09c9bb256d6f25f6:core.Destroy.Core"(ptr %x.var), !dbg !47 +// CHECK:STDOUT: ret i32 0, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !61 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !61 +// CHECK:STDOUT: ret void, !dbg !63 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.09c9bb256d6f25f6:core.Destroy.Core"(ptr %self) #0 !dbg !63 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.09c9bb256d6f25f6:core.Destroy.Core"(ptr %self) #0 !dbg !65 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14_3.1.b = getelementptr inbounds nuw <{ double, i32 }>, ptr %self, i32 0, i32 1, !dbg !65 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc14_3.1.b), !dbg !65 -// CHECK:STDOUT: %.loc14_3.2.a = getelementptr inbounds nuw <{ double, i32 }>, ptr %self, i32 0, i32 0, !dbg !65 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc14_3.2.a), !dbg !65 -// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: %.loc14_3.1.b = getelementptr inbounds nuw <{ double, i32 }>, ptr %self, i32 0, i32 1, !dbg !67 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc14_3.1.b), !dbg !67 +// CHECK:STDOUT: %.loc14_3.2.a = getelementptr inbounds nuw <{ double, i32 }>, ptr %self, i32 0, i32 0, !dbg !67 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc14_3.2.a), !dbg !67 +// CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.09c9bb256d6f25f6:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.09c9bb256d6f25f6:core.Destroy.Core"(ptr %self) #0 !dbg !69 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.09c9bb256d6f25f6:core.Destroy.Core"(ptr %self), !dbg !69 -// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.09c9bb256d6f25f6:core.Destroy.Core"(ptr %self), !dbg !71 +// CHECK:STDOUT: ret void, !dbg !71 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -88,43 +88,43 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "member_access.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !35 = !{!34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !{null, !34} +// CHECK:STDOUT: !34 = !DIFile(filename: "member_access.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !{!36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !40 = !{null, !39} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !32, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !45 = !DILocation(line: 14, column: 3, scope: !42) -// CHECK:STDOUT: !46 = !DILocation(line: 14, column: 31, scope: !42) -// CHECK:STDOUT: !48 = !DILocation(line: 15, column: 3, scope: !42) -// CHECK:STDOUT: !49 = !DILocation(line: 15, column: 16, scope: !42) -// CHECK:STDOUT: !51 = !DILocation(line: 16, column: 3, scope: !42) -// CHECK:STDOUT: !52 = !DILocation(line: 16, column: 16, scope: !42) -// CHECK:STDOUT: !54 = !DILocation(line: 17, column: 3, scope: !42) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 16, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !58) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !34) -// CHECK:STDOUT: !57 = !DILocation(line: 16, column: 3, scope: !55) -// CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !62) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !39) -// CHECK:STDOUT: !61 = !DILocation(line: 14, column: 3, scope: !59) -// CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.09c9bb256d6f25f6:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !39) -// CHECK:STDOUT: !65 = !DILocation(line: 14, column: 3, scope: !63) -// CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.09c9bb256d6f25f6:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !70) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !39) -// CHECK:STDOUT: !69 = !DILocation(line: 14, column: 3, scope: !67) -// CHECK:STDOUT: !70 = !{!68} +// CHECK:STDOUT: !39 = !{null, !36} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !42 = !{null, !41} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !34, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !47 = !DILocation(line: 14, column: 3, scope: !44) +// CHECK:STDOUT: !48 = !DILocation(line: 14, column: 31, scope: !44) +// CHECK:STDOUT: !50 = !DILocation(line: 15, column: 3, scope: !44) +// CHECK:STDOUT: !51 = !DILocation(line: 15, column: 16, scope: !44) +// CHECK:STDOUT: !53 = !DILocation(line: 16, column: 3, scope: !44) +// CHECK:STDOUT: !54 = !DILocation(line: 16, column: 16, scope: !44) +// CHECK:STDOUT: !56 = !DILocation(line: 17, column: 3, scope: !44) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !34, line: 16, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !60) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !36) +// CHECK:STDOUT: !59 = !DILocation(line: 16, column: 3, scope: !57) +// CHECK:STDOUT: !60 = !{!58} +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !34, line: 14, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !64) +// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !41) +// CHECK:STDOUT: !63 = !DILocation(line: 14, column: 3, scope: !61) +// CHECK:STDOUT: !64 = !{!62} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.09c9bb256d6f25f6:core.Destroy.Core", scope: null, file: !34, line: 14, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !68) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !41) +// CHECK:STDOUT: !67 = !DILocation(line: 14, column: 3, scope: !65) +// CHECK:STDOUT: !68 = !{!66} +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.09c9bb256d6f25f6:core.Destroy.Core", scope: null, file: !34, line: 14, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !72) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !41) +// CHECK:STDOUT: !71 = !DILocation(line: 14, column: 3, scope: !69) +// CHECK:STDOUT: !72 = !{!70} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/template/convert.carbon b/toolchain/lower/testdata/template/convert.carbon index 152cc570dd26..53618b587088 100644 --- a/toolchain/lower/testdata/template/convert.carbon +++ b/toolchain/lower/testdata/template/convert.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -166,160 +166,104 @@ fn Test2(c: C) { // CHECK:STDOUT: source_filename = "convert.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTest1.Main(i32 %n) #0 !dbg !26 { +// CHECK:STDOUT: define i32 @_CTest1.Main(i32 %n) #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.84588f41d61dafba(i32 %n), !dbg !32 -// CHECK:STDOUT: ret i32 %F.call, !dbg !33 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.84588f41d61dafba(i32 %n), !dbg !48 +// CHECK:STDOUT: ret i32 %F.call, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @"_CConvert.C.Main:ImplicitAs.84588f41d61dafba.Core"(ptr %self) #0 !dbg !35 { +// CHECK:STDOUT: define i32 @"_CConvert.C.Main:ImplicitAs.84588f41d61dafba.Core"(ptr %self) #0 !dbg !51 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_42.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !40 -// CHECK:STDOUT: %.loc16_42.2 = load i32, ptr %.loc16_42.1.n, align 4, !dbg !40 -// CHECK:STDOUT: ret i32 %.loc16_42.2, !dbg !41 +// CHECK:STDOUT: %.loc16_42.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !56 +// CHECK:STDOUT: %.loc16_42.2 = load i32, ptr %.loc16_42.1.n, align 4, !dbg !56 +// CHECK:STDOUT: ret i32 %.loc16_42.2, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTest2.Main(ptr %c) #0 !dbg !43 { +// CHECK:STDOUT: define i32 @_CTest2.Main(ptr %c) #0 !dbg !59 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.9522ff908e97e267(ptr %c), !dbg !49 -// CHECK:STDOUT: ret i32 %F.call, !dbg !50 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.9522ff908e97e267(ptr %c), !dbg !65 +// CHECK:STDOUT: ret i32 %F.call, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.84588f41d61dafba(i32 %x) #0 !dbg !52 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.84588f41d61dafba(i32 %x) #0 !dbg !68 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !61 +// CHECK:STDOUT: ret i32 %x, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.9522ff908e97e267(ptr %x) #0 !dbg !63 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.9522ff908e97e267(ptr %x) #0 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.call = call i32 @"_CConvert.C.Main:ImplicitAs.84588f41d61dafba.Core"(ptr %x), !dbg !68 -// CHECK:STDOUT: ret i32 %C.as.ImplicitAs.impl.Convert.call, !dbg !72 +// CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.call = call i32 @"_CConvert.C.Main:ImplicitAs.84588f41d61dafba.Core"(ptr %x), !dbg !84 +// CHECK:STDOUT: ret i32 %C.as.ImplicitAs.impl.Convert.call, !dbg !88 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!19} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !18 = !DIFile(filename: "convert.carbon", directory: "") -// CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !21 = !{!20, !20} -// CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !24 = !{!20, !23} -// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Test1", linkageName: "_CTest1.Main", scope: null, file: !18, line: 9, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !34) -// CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !26, type: !20) -// CHECK:STDOUT: !32 = !DILocation(line: 10, column: 10, scope: !26) -// CHECK:STDOUT: !33 = !DILocation(line: 10, column: 3, scope: !26) -// CHECK:STDOUT: !34 = !{!27} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.C.Main:ImplicitAs.84588f41d61dafba.Core", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !42) -// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !23) -// CHECK:STDOUT: !40 = !DILocation(line: 16, column: 38, scope: !35) -// CHECK:STDOUT: !41 = !DILocation(line: 16, column: 31, scope: !35) -// CHECK:STDOUT: !42 = !{!36} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Test2", linkageName: "_CTest2.Main", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) -// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !23) -// CHECK:STDOUT: !49 = !DILocation(line: 21, column: 10, scope: !43) -// CHECK:STDOUT: !50 = !DILocation(line: 21, column: 3, scope: !43) -// CHECK:STDOUT: !51 = !{!44} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !18, line: 4, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !62) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !20) -// CHECK:STDOUT: !61 = !DILocation(line: 6, column: 3, scope: !52) -// CHECK:STDOUT: !62 = !{!53} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !18, line: 4, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !73) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !23) -// CHECK:STDOUT: !68 = !DILocation(line: 5, column: 16, scope: !63) -// CHECK:STDOUT: !72 = !DILocation(line: 6, column: 3, scope: !63) -// CHECK:STDOUT: !73 = !{!64} +// CHECK:STDOUT: !34 = !DIFile(filename: "convert.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !{!36, !36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !40 = !{!36, !39} +// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Test1", linkageName: "_CTest1.Main", scope: null, file: !34, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !50) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !36) +// CHECK:STDOUT: !48 = !DILocation(line: 10, column: 10, scope: !42) +// CHECK:STDOUT: !49 = !DILocation(line: 10, column: 3, scope: !42) +// CHECK:STDOUT: !50 = !{!43} +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.C.Main:ImplicitAs.84588f41d61dafba.Core", scope: null, file: !34, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !58) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !39) +// CHECK:STDOUT: !56 = !DILocation(line: 16, column: 38, scope: !51) +// CHECK:STDOUT: !57 = !DILocation(line: 16, column: 31, scope: !51) +// CHECK:STDOUT: !58 = !{!52} +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "Test2", linkageName: "_CTest2.Main", scope: null, file: !34, line: 20, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !67) +// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !39) +// CHECK:STDOUT: !65 = !DILocation(line: 21, column: 10, scope: !59) +// CHECK:STDOUT: !66 = !DILocation(line: 21, column: 3, scope: !59) +// CHECK:STDOUT: !67 = !{!60} +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !34, line: 4, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !78) +// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !36) +// CHECK:STDOUT: !77 = !DILocation(line: 6, column: 3, scope: !68) +// CHECK:STDOUT: !78 = !{!69} +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !34, line: 4, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !89) +// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !39) +// CHECK:STDOUT: !84 = !DILocation(line: 5, column: 16, scope: !79) +// CHECK:STDOUT: !88 = !DILocation(line: 6, column: 3, scope: !79) +// CHECK:STDOUT: !89 = !{!80} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'initialize_dependent_target_from_literal.carbon' // CHECK:STDOUT: source_filename = "initialize_dependent_target_from_literal.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !80 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !96 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(), !dbg !81 -// CHECK:STDOUT: ret void, !dbg !82 +// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(), !dbg !97 +// CHECK:STDOUT: ret void, !dbg !98 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !83 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !99 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !85 +// CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba() #0 !dbg !87 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba() #0 !dbg !103 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca i32, align 4, !dbg !88 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !88 -// CHECK:STDOUT: store i32 0, ptr %w.var, align 4, !dbg !88 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %w.var), !dbg !88 -// CHECK:STDOUT: ret void, !dbg !90 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) -// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 -// CHECK:STDOUT: -// CHECK:STDOUT: attributes #0 = { nounwind } -// CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -// CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!75} -// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} -// CHECK:STDOUT: -// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !74 = !DIFile(filename: "initialize_dependent_target_from_literal.carbon", directory: "") -// CHECK:STDOUT: !75 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !74, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !76 = !{null} -// CHECK:STDOUT: !77 = !DISubroutineType(types: !76) -// CHECK:STDOUT: !78 = !{null, !20} -// CHECK:STDOUT: !79 = !DISubroutineType(types: !78) -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !74, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !75) -// CHECK:STDOUT: !81 = !DILocation(line: 9, column: 3, scope: !80) -// CHECK:STDOUT: !82 = !DILocation(line: 8, column: 1, scope: !80) -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !74, line: 5, type: !79, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !86) -// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !20) -// CHECK:STDOUT: !85 = !DILocation(line: 5, column: 3, scope: !83) -// CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !74, line: 4, type: !77, spFlags: DISPFlagDefinition, unit: !75) -// CHECK:STDOUT: !88 = !DILocation(line: 5, column: 3, scope: !87) -// CHECK:STDOUT: !90 = !DILocation(line: 4, column: 1, scope: !87) -// CHECK:STDOUT: -// CHECK:STDOUT: ; --- -// CHECK:STDOUT: ; ModuleID = 'initialize_primitive.carbon' -// CHECK:STDOUT: source_filename = "initialize_primitive.carbon" -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !93 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !95 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !97 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 0), !dbg !98 -// CHECK:STDOUT: ret void, !dbg !99 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba(i32 %x) #0 !dbg !100 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca i32, align 4, !dbg !103 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !103 -// CHECK:STDOUT: store i32 %x, ptr %w.var, align 4, !dbg !103 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %w.var), !dbg !103 +// CHECK:STDOUT: %w.var = alloca i32, align 4, !dbg !104 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !104 +// CHECK:STDOUT: store i32 0, ptr %w.var, align 4, !dbg !104 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %w.var), !dbg !104 // CHECK:STDOUT: ret void, !dbg !106 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -329,30 +273,86 @@ fn Test2(c: C) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!92} +// CHECK:STDOUT: !llvm.dbg.cu = !{!91} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !76 = !{null} -// CHECK:STDOUT: !77 = !DISubroutineType(types: !76) -// CHECK:STDOUT: !78 = !{null, !20} -// CHECK:STDOUT: !79 = !DISubroutineType(types: !78) -// CHECK:STDOUT: !91 = !DIFile(filename: "initialize_primitive.carbon", directory: "") -// CHECK:STDOUT: !92 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !91, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !91, line: 5, type: !79, spFlags: DISPFlagDefinition, unit: !92, retainedNodes: !96) -// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !20) -// CHECK:STDOUT: !95 = !DILocation(line: 5, column: 3, scope: !93) -// CHECK:STDOUT: !96 = !{!94} -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !91, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !92) -// CHECK:STDOUT: !98 = !DILocation(line: 9, column: 3, scope: !97) -// CHECK:STDOUT: !99 = !DILocation(line: 8, column: 1, scope: !97) -// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !91, line: 4, type: !79, spFlags: DISPFlagDefinition, unit: !92, retainedNodes: !107) -// CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !100, type: !20) -// CHECK:STDOUT: !103 = !DILocation(line: 5, column: 3, scope: !100) -// CHECK:STDOUT: !106 = !DILocation(line: 4, column: 1, scope: !100) -// CHECK:STDOUT: !107 = !{!101} +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !90 = !DIFile(filename: "initialize_dependent_target_from_literal.carbon", directory: "") +// CHECK:STDOUT: !91 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !90, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !92 = !{null} +// CHECK:STDOUT: !93 = !DISubroutineType(types: !92) +// CHECK:STDOUT: !94 = !{null, !36} +// CHECK:STDOUT: !95 = !DISubroutineType(types: !94) +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !90, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !91) +// CHECK:STDOUT: !97 = !DILocation(line: 9, column: 3, scope: !96) +// CHECK:STDOUT: !98 = !DILocation(line: 8, column: 1, scope: !96) +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !90, line: 5, type: !95, spFlags: DISPFlagDefinition, unit: !91, retainedNodes: !102) +// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !36) +// CHECK:STDOUT: !101 = !DILocation(line: 5, column: 3, scope: !99) +// CHECK:STDOUT: !102 = !{!100} +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !90, line: 4, type: !93, spFlags: DISPFlagDefinition, unit: !91) +// CHECK:STDOUT: !104 = !DILocation(line: 5, column: 3, scope: !103) +// CHECK:STDOUT: !106 = !DILocation(line: 4, column: 1, scope: !103) +// CHECK:STDOUT: +// CHECK:STDOUT: ; --- +// CHECK:STDOUT: ; ModuleID = 'initialize_primitive.carbon' +// CHECK:STDOUT: source_filename = "initialize_primitive.carbon" +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !109 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !111 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !113 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 0), !dbg !114 +// CHECK:STDOUT: ret void, !dbg !115 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba(i32 %x) #0 !dbg !116 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %w.var = alloca i32, align 4, !dbg !119 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !119 +// CHECK:STDOUT: store i32 %x, ptr %w.var, align 4, !dbg !119 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %w.var), !dbg !119 +// CHECK:STDOUT: ret void, !dbg !122 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) +// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 +// CHECK:STDOUT: +// CHECK:STDOUT: attributes #0 = { nounwind } +// CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } +// CHECK:STDOUT: +// CHECK:STDOUT: !llvm.dbg.cu = !{!108} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} +// CHECK:STDOUT: +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !92 = !{null} +// CHECK:STDOUT: !93 = !DISubroutineType(types: !92) +// CHECK:STDOUT: !94 = !{null, !36} +// CHECK:STDOUT: !95 = !DISubroutineType(types: !94) +// CHECK:STDOUT: !107 = !DIFile(filename: "initialize_primitive.carbon", directory: "") +// CHECK:STDOUT: !108 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !107, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !107, line: 5, type: !95, spFlags: DISPFlagDefinition, unit: !108, retainedNodes: !112) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !36) +// CHECK:STDOUT: !111 = !DILocation(line: 5, column: 3, scope: !109) +// CHECK:STDOUT: !112 = !{!110} +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !107, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !108) +// CHECK:STDOUT: !114 = !DILocation(line: 9, column: 3, scope: !113) +// CHECK:STDOUT: !115 = !DILocation(line: 8, column: 1, scope: !113) +// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !107, line: 4, type: !95, spFlags: DISPFlagDefinition, unit: !108, retainedNodes: !123) +// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !36) +// CHECK:STDOUT: !119 = !DILocation(line: 5, column: 3, scope: !116) +// CHECK:STDOUT: !122 = !DILocation(line: 4, column: 1, scope: !116) +// CHECK:STDOUT: !123 = !{!117} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'initialize_from_tuple.carbon' @@ -363,137 +363,137 @@ fn Test2(c: C) { // CHECK:STDOUT: declare void @_CMake.Main(ptr sret({})) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !116 { +// CHECK:STDOUT: define void @"_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !132 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @Y.val.loc14_54, i64 0, i1 false), !dbg !121 -// CHECK:STDOUT: ret void, !dbg !121 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @Y.val.loc14_54, i64 0, i1 false), !dbg !137 +// CHECK:STDOUT: ret void, !dbg !137 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !123 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !139 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.fb3d597a6b1c4ee1(), !dbg !124 -// CHECK:STDOUT: call void @_CF.Main.cd5dea75f888aed4(), !dbg !125 -// CHECK:STDOUT: call void @_CF.Main.be297cc7300419fe(), !dbg !126 -// CHECK:STDOUT: ret void, !dbg !127 +// CHECK:STDOUT: call void @_CF.Main.fb3d597a6b1c4ee1(), !dbg !140 +// CHECK:STDOUT: call void @_CF.Main.2eaa3ac913700940(), !dbg !141 +// CHECK:STDOUT: call void @_CF.Main.be297cc7300419fe(), !dbg !142 +// CHECK:STDOUT: ret void, !dbg !143 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !128 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !144 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !130 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !132 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !134 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.92e03c783d6af646:core.Destroy.Core"(ptr %self) #0 !dbg !136 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %self, i32 0, i32 2, !dbg !138 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !138 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %self, i32 0, i32 1, !dbg !138 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !138 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %self, i32 0, i32 0, !dbg !138 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !138 -// CHECK:STDOUT: ret void, !dbg !138 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.92e03c783d6af646:core.Destroy.Core"(ptr %self) #0 !dbg !140 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.92e03c783d6af646:core.Destroy.Core"(ptr %self), !dbg !142 -// CHECK:STDOUT: ret void, !dbg !142 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4c02ca82d7b9fa3c:core.Destroy.Core"(ptr %self) #0 !dbg !144 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc8_3.1.array.index = getelementptr inbounds [3 x {}], ptr %self, i32 0, i64 2, !dbg !146 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc8_3.1.array.index), !dbg !146 -// CHECK:STDOUT: %.loc8_3.2.array.index = getelementptr inbounds [3 x {}], ptr %self, i32 0, i64 1, !dbg !146 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc8_3.2.array.index), !dbg !146 -// CHECK:STDOUT: %.loc8_3.3.array.index = getelementptr inbounds [3 x {}], ptr %self, i32 0, i64 0, !dbg !146 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc8_3.3.array.index), !dbg !146 // CHECK:STDOUT: ret void, !dbg !146 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4c02ca82d7b9fa3c:core.Destroy.Core"(ptr %self) #0 !dbg !148 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !148 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.4c02ca82d7b9fa3c:core.Destroy.Core"(ptr %self), !dbg !150 // CHECK:STDOUT: ret void, !dbg !150 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %self) #0 !dbg !152 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.92e03c783d6af646:core.Destroy.Core"(ptr %self) #0 !dbg !152 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %self, i32 0, i32 2, !dbg !154 +// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !154 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %self, i32 0, i32 1, !dbg !154 +// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !154 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %self, i32 0, i32 0, !dbg !154 +// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !154 // CHECK:STDOUT: ret void, !dbg !154 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.92e03c783d6af646:core.Destroy.Core"(ptr %self) #0 !dbg !156 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.92e03c783d6af646:core.Destroy.Core"(ptr %self), !dbg !158 +// CHECK:STDOUT: ret void, !dbg !158 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.452a47fbe5382294:core.Destroy.Core"(ptr %self) #0 !dbg !160 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc8_3.1.array.index = getelementptr inbounds [3 x {}], ptr %self, i32 0, i64 2, !dbg !162 +// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc8_3.1.array.index), !dbg !162 +// CHECK:STDOUT: %.loc8_3.2.array.index = getelementptr inbounds [3 x {}], ptr %self, i32 0, i64 1, !dbg !162 +// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc8_3.2.array.index), !dbg !162 +// CHECK:STDOUT: %.loc8_3.3.array.index = getelementptr inbounds [3 x {}], ptr %self, i32 0, i64 0, !dbg !162 +// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc8_3.3.array.index), !dbg !162 +// CHECK:STDOUT: ret void, !dbg !162 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.452a47fbe5382294:core.Destroy.Core"(ptr %self) #0 !dbg !164 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.452a47fbe5382294:core.Destroy.Core"(ptr %self), !dbg !166 +// CHECK:STDOUT: ret void, !dbg !166 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %self) #0 !dbg !168 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !170 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.fb3d597a6b1c4ee1() #0 !dbg !156 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.fb3d597a6b1c4ee1() #0 !dbg !172 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca { {}, {}, {} }, align 1, !dbg !157 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !157 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 0, !dbg !158 -// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem0.tuple.elem), !dbg !159 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 1, !dbg !158 -// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem1.tuple.elem), !dbg !160 -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 2, !dbg !158 -// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem2.tuple.elem), !dbg !161 -// CHECK:STDOUT: call void @"_CSelfDestruct.92e03c783d6af646:core.Destroy.Core"(ptr %w.var), !dbg !157 -// CHECK:STDOUT: ret void, !dbg !163 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.cd5dea75f888aed4() #0 !dbg !164 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca [3 x {}], align 1, !dbg !165 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !165 -// CHECK:STDOUT: %.f75.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 0, !dbg !166 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.f75.array.index), !dbg !167 -// CHECK:STDOUT: %.efc.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 1, !dbg !166 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.efc.array.index), !dbg !168 -// CHECK:STDOUT: %.d3b.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 2, !dbg !166 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.d3b.array.index), !dbg !169 -// CHECK:STDOUT: call void @"_CSelfDestruct.4c02ca82d7b9fa3c:core.Destroy.Core"(ptr %w.var), !dbg !165 -// CHECK:STDOUT: ret void, !dbg !171 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.be297cc7300419fe() #0 !dbg !172 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca {}, align 1, !dbg !173 -// CHECK:STDOUT: %.7a56fd.1.temp = alloca {}, align 1, !dbg !173 -// CHECK:STDOUT: %.7a56fd.2.temp = alloca {}, align 1, !dbg !173 -// CHECK:STDOUT: %.7a56fd.3.temp = alloca {}, align 1, !dbg !173 -// CHECK:STDOUT: %tuple.9aa = alloca { ptr, ptr, ptr }, align 8, !dbg !177 +// CHECK:STDOUT: %w.var = alloca { {}, {}, {} }, align 1, !dbg !173 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !173 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.1.temp), !dbg !173 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.1.temp), !dbg !174 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.2.temp), !dbg !173 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.2.temp), !dbg !175 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.3.temp), !dbg !173 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.3.temp), !dbg !176 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.9aa), !dbg !177 -// CHECK:STDOUT: %tuple.9aa1 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 0, !dbg !177 -// CHECK:STDOUT: store ptr %.7a56fd.1.temp, ptr %tuple.9aa1, align 8, !dbg !177 -// CHECK:STDOUT: %tuple.9aa2 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 1, !dbg !177 -// CHECK:STDOUT: store ptr %.7a56fd.2.temp, ptr %tuple.9aa2, align 8, !dbg !177 -// CHECK:STDOUT: %tuple.9aa3 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 2, !dbg !177 -// CHECK:STDOUT: store ptr %.7a56fd.3.temp, ptr %tuple.9aa3, align 8, !dbg !177 -// CHECK:STDOUT: call void @"_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core"(ptr %w.var, ptr %tuple.9aa), !dbg !173 -// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %w.var), !dbg !173 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 0, !dbg !174 +// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem0.tuple.elem), !dbg !175 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 1, !dbg !174 +// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem1.tuple.elem), !dbg !176 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 2, !dbg !174 +// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem2.tuple.elem), !dbg !177 +// CHECK:STDOUT: call void @"_CSelfDestruct.92e03c783d6af646:core.Destroy.Core"(ptr %w.var), !dbg !173 // CHECK:STDOUT: ret void, !dbg !179 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.2eaa3ac913700940() #0 !dbg !180 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %w.var = alloca [3 x {}], align 1, !dbg !181 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !181 +// CHECK:STDOUT: %.5d0.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 0, !dbg !182 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.5d0.array.index), !dbg !183 +// CHECK:STDOUT: %.502.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 1, !dbg !182 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.502.array.index), !dbg !184 +// CHECK:STDOUT: %.5c5.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 2, !dbg !182 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.5c5.array.index), !dbg !185 +// CHECK:STDOUT: call void @"_CSelfDestruct.452a47fbe5382294:core.Destroy.Core"(ptr %w.var), !dbg !181 +// CHECK:STDOUT: ret void, !dbg !187 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.be297cc7300419fe() #0 !dbg !188 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %w.var = alloca {}, align 1, !dbg !189 +// CHECK:STDOUT: %.7a56fd.1.temp = alloca {}, align 1, !dbg !189 +// CHECK:STDOUT: %.7a56fd.2.temp = alloca {}, align 1, !dbg !189 +// CHECK:STDOUT: %.7a56fd.3.temp = alloca {}, align 1, !dbg !189 +// CHECK:STDOUT: %tuple.9aa = alloca { ptr, ptr, ptr }, align 8, !dbg !193 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !189 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.1.temp), !dbg !189 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.1.temp), !dbg !190 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.2.temp), !dbg !189 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.2.temp), !dbg !191 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.3.temp), !dbg !189 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.3.temp), !dbg !192 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.9aa), !dbg !193 +// CHECK:STDOUT: %tuple.9aa1 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 0, !dbg !193 +// CHECK:STDOUT: store ptr %.7a56fd.1.temp, ptr %tuple.9aa1, align 8, !dbg !193 +// CHECK:STDOUT: %tuple.9aa2 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 1, !dbg !193 +// CHECK:STDOUT: store ptr %.7a56fd.2.temp, ptr %tuple.9aa2, align 8, !dbg !193 +// CHECK:STDOUT: %tuple.9aa3 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 2, !dbg !193 +// CHECK:STDOUT: store ptr %.7a56fd.3.temp, ptr %tuple.9aa3, align 8, !dbg !193 +// CHECK:STDOUT: call void @"_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core"(ptr %w.var, ptr %tuple.9aa), !dbg !189 +// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %w.var), !dbg !189 +// CHECK:STDOUT: ret void, !dbg !195 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -503,78 +503,78 @@ fn Test2(c: C) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!109} +// CHECK:STDOUT: !llvm.dbg.cu = !{!125} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !76 = !{null} -// CHECK:STDOUT: !77 = !DISubroutineType(types: !76) -// CHECK:STDOUT: !108 = !DIFile(filename: "initialize_from_tuple.carbon", directory: "") -// CHECK:STDOUT: !109 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !108, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !112 = !{!23, !23} -// CHECK:STDOUT: !113 = !DISubroutineType(types: !112) -// CHECK:STDOUT: !114 = !{null, !23} -// CHECK:STDOUT: !115 = !DISubroutineType(types: !114) -// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core", scope: null, file: !108, line: 14, type: !113, spFlags: DISPFlagDefinition, unit: !109, retainedNodes: !122) -// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !23) -// CHECK:STDOUT: !121 = !DILocation(line: 14, column: 45, scope: !116) -// CHECK:STDOUT: !122 = !{!117} -// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !108, line: 17, type: !77, spFlags: DISPFlagDefinition, unit: !109) -// CHECK:STDOUT: !124 = !DILocation(line: 18, column: 3, scope: !123) -// CHECK:STDOUT: !125 = !DILocation(line: 20, column: 3, scope: !123) -// CHECK:STDOUT: !126 = !DILocation(line: 22, column: 3, scope: !123) -// CHECK:STDOUT: !127 = !DILocation(line: 17, column: 1, scope: !123) -// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !108, line: 8, type: !115, spFlags: DISPFlagDefinition, unit: !109, retainedNodes: !131) -// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !23) -// CHECK:STDOUT: !130 = !DILocation(line: 8, column: 3, scope: !128) -// CHECK:STDOUT: !131 = !{!129} -// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !108, line: 8, type: !115, spFlags: DISPFlagDefinition, unit: !109, retainedNodes: !135) -// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !23) -// CHECK:STDOUT: !134 = !DILocation(line: 8, column: 3, scope: !132) -// CHECK:STDOUT: !135 = !{!133} -// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.92e03c783d6af646:core.Destroy.Core", scope: null, file: !108, line: 8, type: !115, spFlags: DISPFlagDefinition, unit: !109, retainedNodes: !139) -// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !23) -// CHECK:STDOUT: !138 = !DILocation(line: 8, column: 3, scope: !136) -// CHECK:STDOUT: !139 = !{!137} -// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.92e03c783d6af646:core.Destroy.Core", scope: null, file: !108, line: 8, type: !115, spFlags: DISPFlagDefinition, unit: !109, retainedNodes: !143) -// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !23) -// CHECK:STDOUT: !142 = !DILocation(line: 8, column: 3, scope: !140) -// CHECK:STDOUT: !143 = !{!141} -// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4c02ca82d7b9fa3c:core.Destroy.Core", scope: null, file: !108, line: 8, type: !115, spFlags: DISPFlagDefinition, unit: !109, retainedNodes: !147) -// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !23) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !92 = !{null} +// CHECK:STDOUT: !93 = !DISubroutineType(types: !92) +// CHECK:STDOUT: !124 = !DIFile(filename: "initialize_from_tuple.carbon", directory: "") +// CHECK:STDOUT: !125 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !124, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !128 = !{!39, !39} +// CHECK:STDOUT: !129 = !DISubroutineType(types: !128) +// CHECK:STDOUT: !130 = !{null, !39} +// CHECK:STDOUT: !131 = !DISubroutineType(types: !130) +// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core", scope: null, file: !124, line: 14, type: !129, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !138) +// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !39) +// CHECK:STDOUT: !137 = !DILocation(line: 14, column: 45, scope: !132) +// CHECK:STDOUT: !138 = !{!133} +// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !124, line: 17, type: !93, spFlags: DISPFlagDefinition, unit: !125) +// CHECK:STDOUT: !140 = !DILocation(line: 18, column: 3, scope: !139) +// CHECK:STDOUT: !141 = !DILocation(line: 20, column: 3, scope: !139) +// CHECK:STDOUT: !142 = !DILocation(line: 22, column: 3, scope: !139) +// CHECK:STDOUT: !143 = !DILocation(line: 17, column: 1, scope: !139) +// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !147) +// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !39) // CHECK:STDOUT: !146 = !DILocation(line: 8, column: 3, scope: !144) // CHECK:STDOUT: !147 = !{!145} -// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4c02ca82d7b9fa3c:core.Destroy.Core", scope: null, file: !108, line: 8, type: !115, spFlags: DISPFlagDefinition, unit: !109, retainedNodes: !151) -// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !23) +// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !151) +// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !39) // CHECK:STDOUT: !150 = !DILocation(line: 8, column: 3, scope: !148) // CHECK:STDOUT: !151 = !{!149} -// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core", scope: null, file: !108, line: 8, type: !115, spFlags: DISPFlagDefinition, unit: !109, retainedNodes: !155) -// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !23) +// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.92e03c783d6af646:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !155) +// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !39) // CHECK:STDOUT: !154 = !DILocation(line: 8, column: 3, scope: !152) // CHECK:STDOUT: !155 = !{!153} -// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.fb3d597a6b1c4ee1", scope: null, file: !108, line: 7, type: !77, spFlags: DISPFlagDefinition, unit: !109) -// CHECK:STDOUT: !157 = !DILocation(line: 8, column: 3, scope: !156) -// CHECK:STDOUT: !158 = !DILocation(line: 8, column: 21, scope: !156) -// CHECK:STDOUT: !159 = !DILocation(line: 8, column: 22, scope: !156) -// CHECK:STDOUT: !160 = !DILocation(line: 8, column: 30, scope: !156) -// CHECK:STDOUT: !161 = !DILocation(line: 8, column: 38, scope: !156) -// CHECK:STDOUT: !163 = !DILocation(line: 7, column: 1, scope: !156) -// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.cd5dea75f888aed4", scope: null, file: !108, line: 7, type: !77, spFlags: DISPFlagDefinition, unit: !109) -// CHECK:STDOUT: !165 = !DILocation(line: 8, column: 3, scope: !164) -// CHECK:STDOUT: !166 = !DILocation(line: 8, column: 21, scope: !164) -// CHECK:STDOUT: !167 = !DILocation(line: 8, column: 22, scope: !164) -// CHECK:STDOUT: !168 = !DILocation(line: 8, column: 30, scope: !164) -// CHECK:STDOUT: !169 = !DILocation(line: 8, column: 38, scope: !164) -// CHECK:STDOUT: !171 = !DILocation(line: 7, column: 1, scope: !164) -// CHECK:STDOUT: !172 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.be297cc7300419fe", scope: null, file: !108, line: 7, type: !77, spFlags: DISPFlagDefinition, unit: !109) +// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.92e03c783d6af646:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !159) +// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !39) +// CHECK:STDOUT: !158 = !DILocation(line: 8, column: 3, scope: !156) +// CHECK:STDOUT: !159 = !{!157} +// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.452a47fbe5382294:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !163) +// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !39) +// CHECK:STDOUT: !162 = !DILocation(line: 8, column: 3, scope: !160) +// CHECK:STDOUT: !163 = !{!161} +// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.452a47fbe5382294:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !167) +// CHECK:STDOUT: !165 = !DILocalVariable(arg: 1, scope: !164, type: !39) +// CHECK:STDOUT: !166 = !DILocation(line: 8, column: 3, scope: !164) +// CHECK:STDOUT: !167 = !{!165} +// CHECK:STDOUT: !168 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !171) +// CHECK:STDOUT: !169 = !DILocalVariable(arg: 1, scope: !168, type: !39) +// CHECK:STDOUT: !170 = !DILocation(line: 8, column: 3, scope: !168) +// CHECK:STDOUT: !171 = !{!169} +// CHECK:STDOUT: !172 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.fb3d597a6b1c4ee1", scope: null, file: !124, line: 7, type: !93, spFlags: DISPFlagDefinition, unit: !125) // CHECK:STDOUT: !173 = !DILocation(line: 8, column: 3, scope: !172) -// CHECK:STDOUT: !174 = !DILocation(line: 8, column: 22, scope: !172) -// CHECK:STDOUT: !175 = !DILocation(line: 8, column: 30, scope: !172) -// CHECK:STDOUT: !176 = !DILocation(line: 8, column: 38, scope: !172) -// CHECK:STDOUT: !177 = !DILocation(line: 8, column: 21, scope: !172) +// CHECK:STDOUT: !174 = !DILocation(line: 8, column: 21, scope: !172) +// CHECK:STDOUT: !175 = !DILocation(line: 8, column: 22, scope: !172) +// CHECK:STDOUT: !176 = !DILocation(line: 8, column: 30, scope: !172) +// CHECK:STDOUT: !177 = !DILocation(line: 8, column: 38, scope: !172) // CHECK:STDOUT: !179 = !DILocation(line: 7, column: 1, scope: !172) +// CHECK:STDOUT: !180 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2eaa3ac913700940", scope: null, file: !124, line: 7, type: !93, spFlags: DISPFlagDefinition, unit: !125) +// CHECK:STDOUT: !181 = !DILocation(line: 8, column: 3, scope: !180) +// CHECK:STDOUT: !182 = !DILocation(line: 8, column: 21, scope: !180) +// CHECK:STDOUT: !183 = !DILocation(line: 8, column: 22, scope: !180) +// CHECK:STDOUT: !184 = !DILocation(line: 8, column: 30, scope: !180) +// CHECK:STDOUT: !185 = !DILocation(line: 8, column: 38, scope: !180) +// CHECK:STDOUT: !187 = !DILocation(line: 7, column: 1, scope: !180) +// CHECK:STDOUT: !188 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.be297cc7300419fe", scope: null, file: !124, line: 7, type: !93, spFlags: DISPFlagDefinition, unit: !125) +// CHECK:STDOUT: !189 = !DILocation(line: 8, column: 3, scope: !188) +// CHECK:STDOUT: !190 = !DILocation(line: 8, column: 22, scope: !188) +// CHECK:STDOUT: !191 = !DILocation(line: 8, column: 30, scope: !188) +// CHECK:STDOUT: !192 = !DILocation(line: 8, column: 38, scope: !188) +// CHECK:STDOUT: !193 = !DILocation(line: 8, column: 21, scope: !188) +// CHECK:STDOUT: !195 = !DILocation(line: 7, column: 1, scope: !188) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'initialize_from_nested_literal.carbon' @@ -585,212 +585,212 @@ fn Test2(c: C) { // CHECK:STDOUT: declare void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr sret({}), ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !182 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !198 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.75a9ebb2041c173b(), !dbg !183 -// CHECK:STDOUT: call void @_CF.Main.f5d9b693014ce43e(), !dbg !184 -// CHECK:STDOUT: call void @_CF.Main.84270bb113cb754b(), !dbg !185 -// CHECK:STDOUT: ret void, !dbg !186 +// CHECK:STDOUT: call void @_CF.Main.75a9ebb2041c173b(), !dbg !199 +// CHECK:STDOUT: call void @_CF.Main.f5d9b693014ce43e(), !dbg !200 +// CHECK:STDOUT: call void @_CF.Main.84270bb113cb754b(), !dbg !201 +// CHECK:STDOUT: ret void, !dbg !202 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !187 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !203 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !189 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !191 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !193 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self) #0 !dbg !195 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !197 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc9_3.1.b), !dbg !197 -// CHECK:STDOUT: %.loc9_3.2.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !197 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !197 -// CHECK:STDOUT: ret void, !dbg !197 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self) #0 !dbg !199 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self), !dbg !201 -// CHECK:STDOUT: ret void, !dbg !201 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core"(ptr %self) #0 !dbg !203 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 1, !dbg !205 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !205 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 0, !dbg !205 -// CHECK:STDOUT: call void @"_CSelfDestruct.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !205 // CHECK:STDOUT: ret void, !dbg !205 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core"(ptr %self) #0 !dbg !207 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !207 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core"(ptr %self), !dbg !209 // CHECK:STDOUT: ret void, !dbg !209 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %self) #0 !dbg !211 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self) #0 !dbg !211 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !213 +// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc9_3.1.b), !dbg !213 +// CHECK:STDOUT: %.loc9_3.2.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !213 +// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !213 // CHECK:STDOUT: ret void, !dbg !213 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0950f8aecfaebf0b:core.Destroy.Core"(ptr %self) #0 !dbg !215 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self) #0 !dbg !215 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !217 -// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %.loc9_3.1.b), !dbg !217 -// CHECK:STDOUT: %.loc9_3.2.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !217 -// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !217 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self), !dbg !217 // CHECK:STDOUT: ret void, !dbg !217 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0950f8aecfaebf0b:core.Destroy.Core"(ptr %self) #0 !dbg !219 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core"(ptr %self) #0 !dbg !219 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0950f8aecfaebf0b:core.Destroy.Core"(ptr %self), !dbg !221 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 1, !dbg !221 +// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !221 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 0, !dbg !221 +// CHECK:STDOUT: call void @"_CSelfDestruct.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !221 // CHECK:STDOUT: ret void, !dbg !221 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2f43e328c637647f:core.Destroy.Core"(ptr %self) #0 !dbg !223 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core"(ptr %self) #0 !dbg !223 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 1, !dbg !225 -// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !225 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 0, !dbg !225 -// CHECK:STDOUT: call void @"_CSelfDestruct.0950f8aecfaebf0b:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !225 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core"(ptr %self), !dbg !225 // CHECK:STDOUT: ret void, !dbg !225 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2f43e328c637647f:core.Destroy.Core"(ptr %self) #0 !dbg !227 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %self) #0 !dbg !227 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2f43e328c637647f:core.Destroy.Core"(ptr %self), !dbg !229 // CHECK:STDOUT: ret void, !dbg !229 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2970be6ba4c2615c:core.Destroy.Core"(ptr %self) #0 !dbg !231 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0950f8aecfaebf0b:core.Destroy.Core"(ptr %self) #0 !dbg !231 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !233 // CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %.loc9_3.1.b), !dbg !233 // CHECK:STDOUT: %.loc9_3.2.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !233 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !233 +// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !233 // CHECK:STDOUT: ret void, !dbg !233 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2970be6ba4c2615c:core.Destroy.Core"(ptr %self) #0 !dbg !235 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0950f8aecfaebf0b:core.Destroy.Core"(ptr %self) #0 !dbg !235 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2970be6ba4c2615c:core.Destroy.Core"(ptr %self), !dbg !237 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.0950f8aecfaebf0b:core.Destroy.Core"(ptr %self), !dbg !237 // CHECK:STDOUT: ret void, !dbg !237 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self) #0 !dbg !239 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2f43e328c637647f:core.Destroy.Core"(ptr %self) #0 !dbg !239 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !241 -// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %.loc9_3.1.b), !dbg !241 -// CHECK:STDOUT: %.loc9_3.2.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !241 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !241 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 1, !dbg !241 +// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !241 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 0, !dbg !241 +// CHECK:STDOUT: call void @"_CSelfDestruct.0950f8aecfaebf0b:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !241 // CHECK:STDOUT: ret void, !dbg !241 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self) #0 !dbg !243 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2f43e328c637647f:core.Destroy.Core"(ptr %self) #0 !dbg !243 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self), !dbg !245 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.2f43e328c637647f:core.Destroy.Core"(ptr %self), !dbg !245 // CHECK:STDOUT: ret void, !dbg !245 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core"(ptr %self) #0 !dbg !247 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2970be6ba4c2615c:core.Destroy.Core"(ptr %self) #0 !dbg !247 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 1, !dbg !249 -// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !249 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 0, !dbg !249 -// CHECK:STDOUT: call void @"_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !249 +// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !249 +// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %.loc9_3.1.b), !dbg !249 +// CHECK:STDOUT: %.loc9_3.2.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !249 +// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !249 // CHECK:STDOUT: ret void, !dbg !249 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core"(ptr %self) #0 !dbg !251 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2970be6ba4c2615c:core.Destroy.Core"(ptr %self) #0 !dbg !251 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core"(ptr %self), !dbg !253 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.2970be6ba4c2615c:core.Destroy.Core"(ptr %self), !dbg !253 // CHECK:STDOUT: ret void, !dbg !253 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.75a9ebb2041c173b() #0 !dbg !255 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self) #0 !dbg !255 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !256 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !256 -// CHECK:STDOUT: %tuple.elem0.a28.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !258 -// CHECK:STDOUT: %.d62.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.a28.tuple.elem, i32 0, i32 0, !dbg !257 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.d62.a), !dbg !259 -// CHECK:STDOUT: %.162.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.a28.tuple.elem, i32 0, i32 1, !dbg !257 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.162.b), !dbg !260 -// CHECK:STDOUT: %tuple.elem1.79b.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !258 -// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem1.79b.tuple.elem), !dbg !261 -// CHECK:STDOUT: call void @"_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core"(ptr %w.var), !dbg !256 -// CHECK:STDOUT: ret void, !dbg !263 +// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !257 +// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %.loc9_3.1.b), !dbg !257 +// CHECK:STDOUT: %.loc9_3.2.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !257 +// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !257 +// CHECK:STDOUT: ret void, !dbg !257 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.f5d9b693014ce43e() #0 !dbg !264 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self) #0 !dbg !259 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !265 -// CHECK:STDOUT: %.7a56fd.1.temp = alloca {}, align 1, !dbg !265 -// CHECK:STDOUT: %.7a56fd.2.temp = alloca {}, align 1, !dbg !265 -// CHECK:STDOUT: %.7a56fd.3.temp = alloca {}, align 1, !dbg !265 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !265 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.1.temp), !dbg !265 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.1.temp), !dbg !266 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.2.temp), !dbg !265 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.2.temp), !dbg !267 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.3.temp), !dbg !265 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.3.temp), !dbg !269 -// CHECK:STDOUT: %tuple.elem0.25a.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !270 -// CHECK:STDOUT: %.e68.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.25a.tuple.elem, i32 0, i32 0, !dbg !268 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.e68.a, ptr %.7a56fd.1.temp), !dbg !268 -// CHECK:STDOUT: %.9f2.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.25a.tuple.elem, i32 0, i32 1, !dbg !268 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.9f2.b, ptr %.7a56fd.2.temp), !dbg !268 -// CHECK:STDOUT: %tuple.elem1.0e1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !270 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %tuple.elem1.0e1.tuple.elem, ptr %.7a56fd.3.temp), !dbg !270 -// CHECK:STDOUT: call void @"_CSelfDestruct.2f43e328c637647f:core.Destroy.Core"(ptr %w.var), !dbg !265 -// CHECK:STDOUT: ret void, !dbg !272 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self), !dbg !261 +// CHECK:STDOUT: ret void, !dbg !261 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84270bb113cb754b() #0 !dbg !273 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core"(ptr %self) #0 !dbg !263 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !274 -// CHECK:STDOUT: %.7a56fd.4.temp = alloca {}, align 1, !dbg !274 -// CHECK:STDOUT: %.7a56fd.5.temp = alloca {}, align 1, !dbg !274 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !274 -// CHECK:STDOUT: %tuple.elem0.d0d.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !276 -// CHECK:STDOUT: %.b76.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.d0d.tuple.elem, i32 0, i32 0, !dbg !275 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.b76.a), !dbg !277 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.4.temp), !dbg !274 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.4.temp), !dbg !278 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.5.temp), !dbg !274 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.5.temp), !dbg !279 -// CHECK:STDOUT: %.25e.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.d0d.tuple.elem, i32 0, i32 1, !dbg !275 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.25e.b, ptr %.7a56fd.4.temp), !dbg !275 -// CHECK:STDOUT: %tuple.elem1.c76.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !276 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %tuple.elem1.c76.tuple.elem, ptr %.7a56fd.5.temp), !dbg !276 -// CHECK:STDOUT: call void @"_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core"(ptr %w.var), !dbg !274 -// CHECK:STDOUT: ret void, !dbg !281 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 1, !dbg !265 +// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !265 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 0, !dbg !265 +// CHECK:STDOUT: call void @"_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !265 +// CHECK:STDOUT: ret void, !dbg !265 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core"(ptr %self) #0 !dbg !267 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core"(ptr %self), !dbg !269 +// CHECK:STDOUT: ret void, !dbg !269 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.75a9ebb2041c173b() #0 !dbg !271 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !272 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !272 +// CHECK:STDOUT: %tuple.elem0.a28.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !274 +// CHECK:STDOUT: %.d62.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.a28.tuple.elem, i32 0, i32 0, !dbg !273 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.d62.a), !dbg !275 +// CHECK:STDOUT: %.162.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.a28.tuple.elem, i32 0, i32 1, !dbg !273 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.162.b), !dbg !276 +// CHECK:STDOUT: %tuple.elem1.79b.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !274 +// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem1.79b.tuple.elem), !dbg !277 +// CHECK:STDOUT: call void @"_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core"(ptr %w.var), !dbg !272 +// CHECK:STDOUT: ret void, !dbg !279 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.f5d9b693014ce43e() #0 !dbg !280 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !281 +// CHECK:STDOUT: %.7a56fd.1.temp = alloca {}, align 1, !dbg !281 +// CHECK:STDOUT: %.7a56fd.2.temp = alloca {}, align 1, !dbg !281 +// CHECK:STDOUT: %.7a56fd.3.temp = alloca {}, align 1, !dbg !281 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !281 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.1.temp), !dbg !281 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.1.temp), !dbg !282 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.2.temp), !dbg !281 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.2.temp), !dbg !283 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.3.temp), !dbg !281 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.3.temp), !dbg !285 +// CHECK:STDOUT: %tuple.elem0.25a.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !286 +// CHECK:STDOUT: %.e68.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.25a.tuple.elem, i32 0, i32 0, !dbg !284 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.e68.a, ptr %.7a56fd.1.temp), !dbg !284 +// CHECK:STDOUT: %.9f2.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.25a.tuple.elem, i32 0, i32 1, !dbg !284 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.9f2.b, ptr %.7a56fd.2.temp), !dbg !284 +// CHECK:STDOUT: %tuple.elem1.0e1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !286 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %tuple.elem1.0e1.tuple.elem, ptr %.7a56fd.3.temp), !dbg !286 +// CHECK:STDOUT: call void @"_CSelfDestruct.2f43e328c637647f:core.Destroy.Core"(ptr %w.var), !dbg !281 +// CHECK:STDOUT: ret void, !dbg !288 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84270bb113cb754b() #0 !dbg !289 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !290 +// CHECK:STDOUT: %.7a56fd.4.temp = alloca {}, align 1, !dbg !290 +// CHECK:STDOUT: %.7a56fd.5.temp = alloca {}, align 1, !dbg !290 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !290 +// CHECK:STDOUT: %tuple.elem0.d0d.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !292 +// CHECK:STDOUT: %.b76.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.d0d.tuple.elem, i32 0, i32 0, !dbg !291 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.b76.a), !dbg !293 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.4.temp), !dbg !290 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.4.temp), !dbg !294 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.5.temp), !dbg !290 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.5.temp), !dbg !295 +// CHECK:STDOUT: %.25e.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.d0d.tuple.elem, i32 0, i32 1, !dbg !291 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.25e.b, ptr %.7a56fd.4.temp), !dbg !291 +// CHECK:STDOUT: %tuple.elem1.c76.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !292 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %tuple.elem1.c76.tuple.elem, ptr %.7a56fd.5.temp), !dbg !292 +// CHECK:STDOUT: call void @"_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core"(ptr %w.var), !dbg !290 +// CHECK:STDOUT: ret void, !dbg !297 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -802,277 +802,277 @@ fn Test2(c: C) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!181} +// CHECK:STDOUT: !llvm.dbg.cu = !{!197} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !76 = !{null} -// CHECK:STDOUT: !77 = !DISubroutineType(types: !76) -// CHECK:STDOUT: !114 = !{null, !23} -// CHECK:STDOUT: !115 = !DISubroutineType(types: !114) -// CHECK:STDOUT: !180 = !DIFile(filename: "initialize_from_nested_literal.carbon", directory: "") -// CHECK:STDOUT: !181 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !180, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !182 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !180, line: 24, type: !77, spFlags: DISPFlagDefinition, unit: !181) -// CHECK:STDOUT: !183 = !DILocation(line: 25, column: 3, scope: !182) -// CHECK:STDOUT: !184 = !DILocation(line: 27, column: 3, scope: !182) -// CHECK:STDOUT: !185 = !DILocation(line: 29, column: 3, scope: !182) -// CHECK:STDOUT: !186 = !DILocation(line: 24, column: 1, scope: !182) -// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !190) -// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !23) -// CHECK:STDOUT: !189 = !DILocation(line: 9, column: 3, scope: !187) -// CHECK:STDOUT: !190 = !{!188} -// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !194) -// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !23) -// CHECK:STDOUT: !193 = !DILocation(line: 9, column: 3, scope: !191) -// CHECK:STDOUT: !194 = !{!192} -// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !198) -// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !23) -// CHECK:STDOUT: !197 = !DILocation(line: 9, column: 3, scope: !195) -// CHECK:STDOUT: !198 = !{!196} -// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f38e1c3ccdfe019b:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !202) -// CHECK:STDOUT: !200 = !DILocalVariable(arg: 1, scope: !199, type: !23) -// CHECK:STDOUT: !201 = !DILocation(line: 9, column: 3, scope: !199) -// CHECK:STDOUT: !202 = !{!200} -// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !206) -// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !23) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !92 = !{null} +// CHECK:STDOUT: !93 = !DISubroutineType(types: !92) +// CHECK:STDOUT: !130 = !{null, !39} +// CHECK:STDOUT: !131 = !DISubroutineType(types: !130) +// CHECK:STDOUT: !196 = !DIFile(filename: "initialize_from_nested_literal.carbon", directory: "") +// CHECK:STDOUT: !197 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !196, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !198 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !196, line: 24, type: !93, spFlags: DISPFlagDefinition, unit: !197) +// CHECK:STDOUT: !199 = !DILocation(line: 25, column: 3, scope: !198) +// CHECK:STDOUT: !200 = !DILocation(line: 27, column: 3, scope: !198) +// CHECK:STDOUT: !201 = !DILocation(line: 29, column: 3, scope: !198) +// CHECK:STDOUT: !202 = !DILocation(line: 24, column: 1, scope: !198) +// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !206) +// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !39) // CHECK:STDOUT: !205 = !DILocation(line: 9, column: 3, scope: !203) // CHECK:STDOUT: !206 = !{!204} -// CHECK:STDOUT: !207 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !210) -// CHECK:STDOUT: !208 = !DILocalVariable(arg: 1, scope: !207, type: !23) +// CHECK:STDOUT: !207 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !210) +// CHECK:STDOUT: !208 = !DILocalVariable(arg: 1, scope: !207, type: !39) // CHECK:STDOUT: !209 = !DILocation(line: 9, column: 3, scope: !207) // CHECK:STDOUT: !210 = !{!208} -// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !214) -// CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !23) +// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !214) +// CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !39) // CHECK:STDOUT: !213 = !DILocation(line: 9, column: 3, scope: !211) // CHECK:STDOUT: !214 = !{!212} -// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0950f8aecfaebf0b:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !218) -// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !23) +// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f38e1c3ccdfe019b:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !218) +// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !39) // CHECK:STDOUT: !217 = !DILocation(line: 9, column: 3, scope: !215) // CHECK:STDOUT: !218 = !{!216} -// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0950f8aecfaebf0b:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !222) -// CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !23) +// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !222) +// CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !39) // CHECK:STDOUT: !221 = !DILocation(line: 9, column: 3, scope: !219) // CHECK:STDOUT: !222 = !{!220} -// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2f43e328c637647f:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !226) -// CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !23) +// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !226) +// CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !39) // CHECK:STDOUT: !225 = !DILocation(line: 9, column: 3, scope: !223) // CHECK:STDOUT: !226 = !{!224} -// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2f43e328c637647f:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !230) -// CHECK:STDOUT: !228 = !DILocalVariable(arg: 1, scope: !227, type: !23) +// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !230) +// CHECK:STDOUT: !228 = !DILocalVariable(arg: 1, scope: !227, type: !39) // CHECK:STDOUT: !229 = !DILocation(line: 9, column: 3, scope: !227) // CHECK:STDOUT: !230 = !{!228} -// CHECK:STDOUT: !231 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2970be6ba4c2615c:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !234) -// CHECK:STDOUT: !232 = !DILocalVariable(arg: 1, scope: !231, type: !23) +// CHECK:STDOUT: !231 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0950f8aecfaebf0b:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !234) +// CHECK:STDOUT: !232 = !DILocalVariable(arg: 1, scope: !231, type: !39) // CHECK:STDOUT: !233 = !DILocation(line: 9, column: 3, scope: !231) // CHECK:STDOUT: !234 = !{!232} -// CHECK:STDOUT: !235 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2970be6ba4c2615c:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !238) -// CHECK:STDOUT: !236 = !DILocalVariable(arg: 1, scope: !235, type: !23) +// CHECK:STDOUT: !235 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0950f8aecfaebf0b:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !238) +// CHECK:STDOUT: !236 = !DILocalVariable(arg: 1, scope: !235, type: !39) // CHECK:STDOUT: !237 = !DILocation(line: 9, column: 3, scope: !235) // CHECK:STDOUT: !238 = !{!236} -// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !242) -// CHECK:STDOUT: !240 = !DILocalVariable(arg: 1, scope: !239, type: !23) +// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2f43e328c637647f:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !242) +// CHECK:STDOUT: !240 = !DILocalVariable(arg: 1, scope: !239, type: !39) // CHECK:STDOUT: !241 = !DILocation(line: 9, column: 3, scope: !239) // CHECK:STDOUT: !242 = !{!240} -// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !246) -// CHECK:STDOUT: !244 = !DILocalVariable(arg: 1, scope: !243, type: !23) +// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2f43e328c637647f:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !246) +// CHECK:STDOUT: !244 = !DILocalVariable(arg: 1, scope: !243, type: !39) // CHECK:STDOUT: !245 = !DILocation(line: 9, column: 3, scope: !243) // CHECK:STDOUT: !246 = !{!244} -// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !250) -// CHECK:STDOUT: !248 = !DILocalVariable(arg: 1, scope: !247, type: !23) +// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2970be6ba4c2615c:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !250) +// CHECK:STDOUT: !248 = !DILocalVariable(arg: 1, scope: !247, type: !39) // CHECK:STDOUT: !249 = !DILocation(line: 9, column: 3, scope: !247) // CHECK:STDOUT: !250 = !{!248} -// CHECK:STDOUT: !251 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core", scope: null, file: !180, line: 9, type: !115, spFlags: DISPFlagDefinition, unit: !181, retainedNodes: !254) -// CHECK:STDOUT: !252 = !DILocalVariable(arg: 1, scope: !251, type: !23) +// CHECK:STDOUT: !251 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2970be6ba4c2615c:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !254) +// CHECK:STDOUT: !252 = !DILocalVariable(arg: 1, scope: !251, type: !39) // CHECK:STDOUT: !253 = !DILocation(line: 9, column: 3, scope: !251) // CHECK:STDOUT: !254 = !{!252} -// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.75a9ebb2041c173b", scope: null, file: !180, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !181) -// CHECK:STDOUT: !256 = !DILocation(line: 9, column: 3, scope: !255) -// CHECK:STDOUT: !257 = !DILocation(line: 9, column: 22, scope: !255) -// CHECK:STDOUT: !258 = !DILocation(line: 9, column: 21, scope: !255) -// CHECK:STDOUT: !259 = !DILocation(line: 9, column: 28, scope: !255) -// CHECK:STDOUT: !260 = !DILocation(line: 9, column: 41, scope: !255) -// CHECK:STDOUT: !261 = !DILocation(line: 9, column: 50, scope: !255) -// CHECK:STDOUT: !263 = !DILocation(line: 8, column: 1, scope: !255) -// CHECK:STDOUT: !264 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.f5d9b693014ce43e", scope: null, file: !180, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !181) -// CHECK:STDOUT: !265 = !DILocation(line: 9, column: 3, scope: !264) -// CHECK:STDOUT: !266 = !DILocation(line: 9, column: 28, scope: !264) -// CHECK:STDOUT: !267 = !DILocation(line: 9, column: 41, scope: !264) -// CHECK:STDOUT: !268 = !DILocation(line: 9, column: 22, scope: !264) -// CHECK:STDOUT: !269 = !DILocation(line: 9, column: 50, scope: !264) -// CHECK:STDOUT: !270 = !DILocation(line: 9, column: 21, scope: !264) -// CHECK:STDOUT: !272 = !DILocation(line: 8, column: 1, scope: !264) -// CHECK:STDOUT: !273 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84270bb113cb754b", scope: null, file: !180, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !181) -// CHECK:STDOUT: !274 = !DILocation(line: 9, column: 3, scope: !273) -// CHECK:STDOUT: !275 = !DILocation(line: 9, column: 22, scope: !273) -// CHECK:STDOUT: !276 = !DILocation(line: 9, column: 21, scope: !273) -// CHECK:STDOUT: !277 = !DILocation(line: 9, column: 28, scope: !273) -// CHECK:STDOUT: !278 = !DILocation(line: 9, column: 41, scope: !273) -// CHECK:STDOUT: !279 = !DILocation(line: 9, column: 50, scope: !273) -// CHECK:STDOUT: !281 = !DILocation(line: 8, column: 1, scope: !273) +// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !258) +// CHECK:STDOUT: !256 = !DILocalVariable(arg: 1, scope: !255, type: !39) +// CHECK:STDOUT: !257 = !DILocation(line: 9, column: 3, scope: !255) +// CHECK:STDOUT: !258 = !{!256} +// CHECK:STDOUT: !259 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !262) +// CHECK:STDOUT: !260 = !DILocalVariable(arg: 1, scope: !259, type: !39) +// CHECK:STDOUT: !261 = !DILocation(line: 9, column: 3, scope: !259) +// CHECK:STDOUT: !262 = !{!260} +// CHECK:STDOUT: !263 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !266) +// CHECK:STDOUT: !264 = !DILocalVariable(arg: 1, scope: !263, type: !39) +// CHECK:STDOUT: !265 = !DILocation(line: 9, column: 3, scope: !263) +// CHECK:STDOUT: !266 = !{!264} +// CHECK:STDOUT: !267 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !270) +// CHECK:STDOUT: !268 = !DILocalVariable(arg: 1, scope: !267, type: !39) +// CHECK:STDOUT: !269 = !DILocation(line: 9, column: 3, scope: !267) +// CHECK:STDOUT: !270 = !{!268} +// CHECK:STDOUT: !271 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.75a9ebb2041c173b", scope: null, file: !196, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !197) +// CHECK:STDOUT: !272 = !DILocation(line: 9, column: 3, scope: !271) +// CHECK:STDOUT: !273 = !DILocation(line: 9, column: 22, scope: !271) +// CHECK:STDOUT: !274 = !DILocation(line: 9, column: 21, scope: !271) +// CHECK:STDOUT: !275 = !DILocation(line: 9, column: 28, scope: !271) +// CHECK:STDOUT: !276 = !DILocation(line: 9, column: 41, scope: !271) +// CHECK:STDOUT: !277 = !DILocation(line: 9, column: 50, scope: !271) +// CHECK:STDOUT: !279 = !DILocation(line: 8, column: 1, scope: !271) +// CHECK:STDOUT: !280 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.f5d9b693014ce43e", scope: null, file: !196, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !197) +// CHECK:STDOUT: !281 = !DILocation(line: 9, column: 3, scope: !280) +// CHECK:STDOUT: !282 = !DILocation(line: 9, column: 28, scope: !280) +// CHECK:STDOUT: !283 = !DILocation(line: 9, column: 41, scope: !280) +// CHECK:STDOUT: !284 = !DILocation(line: 9, column: 22, scope: !280) +// CHECK:STDOUT: !285 = !DILocation(line: 9, column: 50, scope: !280) +// CHECK:STDOUT: !286 = !DILocation(line: 9, column: 21, scope: !280) +// CHECK:STDOUT: !288 = !DILocation(line: 8, column: 1, scope: !280) +// CHECK:STDOUT: !289 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84270bb113cb754b", scope: null, file: !196, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !197) +// CHECK:STDOUT: !290 = !DILocation(line: 9, column: 3, scope: !289) +// CHECK:STDOUT: !291 = !DILocation(line: 9, column: 22, scope: !289) +// CHECK:STDOUT: !292 = !DILocation(line: 9, column: 21, scope: !289) +// CHECK:STDOUT: !293 = !DILocation(line: 9, column: 28, scope: !289) +// CHECK:STDOUT: !294 = !DILocation(line: 9, column: 41, scope: !289) +// CHECK:STDOUT: !295 = !DILocation(line: 9, column: 50, scope: !289) +// CHECK:STDOUT: !297 = !DILocation(line: 8, column: 1, scope: !289) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'as.carbon' // CHECK:STDOUT: source_filename = "as.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest1.Main(i32 %n) #0 !dbg !284 { +// CHECK:STDOUT: define void @_CTest1.Main(i32 %n) #0 !dbg !300 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %AsI32.call = call i32 @_CAsI32.Main.84588f41d61dafba(i32 %n), !dbg !288 -// CHECK:STDOUT: ret void, !dbg !291 +// CHECK:STDOUT: %AsI32.call = call i32 @_CAsI32.Main.84588f41d61dafba(i32 %n), !dbg !304 +// CHECK:STDOUT: ret void, !dbg !307 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %self) #0 !dbg !293 { +// CHECK:STDOUT: define i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %self) #0 !dbg !309 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15_42.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !298 -// CHECK:STDOUT: %.loc15_42.2 = load i32, ptr %.loc15_42.1.n, align 4, !dbg !298 -// CHECK:STDOUT: ret i32 %.loc15_42.2, !dbg !299 +// CHECK:STDOUT: %.loc15_42.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !314 +// CHECK:STDOUT: %.loc15_42.2 = load i32, ptr %.loc15_42.1.n, align 4, !dbg !314 +// CHECK:STDOUT: ret i32 %.loc15_42.2, !dbg !315 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest2.Main(ptr %c) #0 !dbg !301 { +// CHECK:STDOUT: define void @_CTest2.Main(ptr %c) #0 !dbg !317 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %AsI32.call = call i32 @_CAsI32.Main.9522ff908e97e267(ptr %c), !dbg !305 -// CHECK:STDOUT: ret void, !dbg !308 +// CHECK:STDOUT: %AsI32.call = call i32 @_CAsI32.Main.9522ff908e97e267(ptr %c), !dbg !321 +// CHECK:STDOUT: ret void, !dbg !324 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CAsI32.Main.84588f41d61dafba(i32 %x) #0 !dbg !310 { +// CHECK:STDOUT: define linkonce_odr i32 @_CAsI32.Main.84588f41d61dafba(i32 %x) #0 !dbg !326 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !316 +// CHECK:STDOUT: ret i32 %x, !dbg !332 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CAsI32.Main.9522ff908e97e267(ptr %x) #0 !dbg !318 { +// CHECK:STDOUT: define linkonce_odr i32 @_CAsI32.Main.9522ff908e97e267(ptr %x) #0 !dbg !334 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %C.as.As.impl.Convert.call = call i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %x), !dbg !323 -// CHECK:STDOUT: ret i32 %C.as.As.impl.Convert.call, !dbg !324 +// CHECK:STDOUT: %C.as.As.impl.Convert.call = call i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %x), !dbg !339 +// CHECK:STDOUT: ret i32 %C.as.As.impl.Convert.call, !dbg !340 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!283} +// CHECK:STDOUT: !llvm.dbg.cu = !{!299} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !21 = !{!20, !20} -// CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !24 = !{!20, !23} -// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !78 = !{null, !20} -// CHECK:STDOUT: !79 = !DISubroutineType(types: !78) -// CHECK:STDOUT: !114 = !{null, !23} -// CHECK:STDOUT: !115 = !DISubroutineType(types: !114) -// CHECK:STDOUT: !282 = !DIFile(filename: "as.carbon", directory: "") -// CHECK:STDOUT: !283 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !282, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !284 = distinct !DISubprogram(name: "Test1", linkageName: "_CTest1.Main", scope: null, file: !282, line: 8, type: !79, spFlags: DISPFlagDefinition, unit: !283, retainedNodes: !292) -// CHECK:STDOUT: !285 = !DILocalVariable(arg: 1, scope: !284, type: !20) -// CHECK:STDOUT: !288 = !DILocation(line: 9, column: 16, scope: !284) -// CHECK:STDOUT: !291 = !DILocation(line: 8, column: 1, scope: !284) -// CHECK:STDOUT: !292 = !{!285} -// CHECK:STDOUT: !293 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.C.Main:As.84588f41d61dafba.Core", scope: null, file: !282, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !283, retainedNodes: !300) -// CHECK:STDOUT: !294 = !DILocalVariable(arg: 1, scope: !293, type: !23) -// CHECK:STDOUT: !298 = !DILocation(line: 15, column: 38, scope: !293) -// CHECK:STDOUT: !299 = !DILocation(line: 15, column: 31, scope: !293) -// CHECK:STDOUT: !300 = !{!294} -// CHECK:STDOUT: !301 = distinct !DISubprogram(name: "Test2", linkageName: "_CTest2.Main", scope: null, file: !282, line: 19, type: !115, spFlags: DISPFlagDefinition, unit: !283, retainedNodes: !309) -// CHECK:STDOUT: !302 = !DILocalVariable(arg: 1, scope: !301, type: !23) -// CHECK:STDOUT: !305 = !DILocation(line: 20, column: 16, scope: !301) -// CHECK:STDOUT: !308 = !DILocation(line: 19, column: 1, scope: !301) -// CHECK:STDOUT: !309 = !{!302} -// CHECK:STDOUT: !310 = distinct !DISubprogram(name: "AsI32", linkageName: "_CAsI32.Main.84588f41d61dafba", scope: null, file: !282, line: 4, type: !22, spFlags: DISPFlagDefinition, unit: !283, retainedNodes: !317) -// CHECK:STDOUT: !311 = !DILocalVariable(arg: 1, scope: !310, type: !20) -// CHECK:STDOUT: !316 = !DILocation(line: 5, column: 3, scope: !310) -// CHECK:STDOUT: !317 = !{!311} -// CHECK:STDOUT: !318 = distinct !DISubprogram(name: "AsI32", linkageName: "_CAsI32.Main.9522ff908e97e267", scope: null, file: !282, line: 4, type: !25, spFlags: DISPFlagDefinition, unit: !283, retainedNodes: !325) -// CHECK:STDOUT: !319 = !DILocalVariable(arg: 1, scope: !318, type: !23) -// CHECK:STDOUT: !323 = !DILocation(line: 5, column: 10, scope: !318) -// CHECK:STDOUT: !324 = !DILocation(line: 5, column: 3, scope: !318) -// CHECK:STDOUT: !325 = !{!319} +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !37 = !{!36, !36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !40 = !{!36, !39} +// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) +// CHECK:STDOUT: !94 = !{null, !36} +// CHECK:STDOUT: !95 = !DISubroutineType(types: !94) +// CHECK:STDOUT: !130 = !{null, !39} +// CHECK:STDOUT: !131 = !DISubroutineType(types: !130) +// CHECK:STDOUT: !298 = !DIFile(filename: "as.carbon", directory: "") +// CHECK:STDOUT: !299 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !298, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !300 = distinct !DISubprogram(name: "Test1", linkageName: "_CTest1.Main", scope: null, file: !298, line: 8, type: !95, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !308) +// CHECK:STDOUT: !301 = !DILocalVariable(arg: 1, scope: !300, type: !36) +// CHECK:STDOUT: !304 = !DILocation(line: 9, column: 16, scope: !300) +// CHECK:STDOUT: !307 = !DILocation(line: 8, column: 1, scope: !300) +// CHECK:STDOUT: !308 = !{!301} +// CHECK:STDOUT: !309 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.C.Main:As.84588f41d61dafba.Core", scope: null, file: !298, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !316) +// CHECK:STDOUT: !310 = !DILocalVariable(arg: 1, scope: !309, type: !39) +// CHECK:STDOUT: !314 = !DILocation(line: 15, column: 38, scope: !309) +// CHECK:STDOUT: !315 = !DILocation(line: 15, column: 31, scope: !309) +// CHECK:STDOUT: !316 = !{!310} +// CHECK:STDOUT: !317 = distinct !DISubprogram(name: "Test2", linkageName: "_CTest2.Main", scope: null, file: !298, line: 19, type: !131, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !325) +// CHECK:STDOUT: !318 = !DILocalVariable(arg: 1, scope: !317, type: !39) +// CHECK:STDOUT: !321 = !DILocation(line: 20, column: 16, scope: !317) +// CHECK:STDOUT: !324 = !DILocation(line: 19, column: 1, scope: !317) +// CHECK:STDOUT: !325 = !{!318} +// CHECK:STDOUT: !326 = distinct !DISubprogram(name: "AsI32", linkageName: "_CAsI32.Main.84588f41d61dafba", scope: null, file: !298, line: 4, type: !38, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !333) +// CHECK:STDOUT: !327 = !DILocalVariable(arg: 1, scope: !326, type: !36) +// CHECK:STDOUT: !332 = !DILocation(line: 5, column: 3, scope: !326) +// CHECK:STDOUT: !333 = !{!327} +// CHECK:STDOUT: !334 = distinct !DISubprogram(name: "AsI32", linkageName: "_CAsI32.Main.9522ff908e97e267", scope: null, file: !298, line: 4, type: !41, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !341) +// CHECK:STDOUT: !335 = !DILocalVariable(arg: 1, scope: !334, type: !39) +// CHECK:STDOUT: !339 = !DILocation(line: 5, column: 10, scope: !334) +// CHECK:STDOUT: !340 = !DILocation(line: 5, column: 3, scope: !334) +// CHECK:STDOUT: !341 = !{!335} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'as_type.carbon' // CHECK:STDOUT: source_filename = "as_type.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest1.Main(i32 %n) #0 !dbg !328 { +// CHECK:STDOUT: define void @_CTest1.Main(i32 %n) #0 !dbg !344 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CAsType.Main.8122a03446648385(i32 %n), !dbg !332 -// CHECK:STDOUT: ret void, !dbg !333 +// CHECK:STDOUT: call void @_CAsType.Main.8122a03446648385(i32 %n), !dbg !348 +// CHECK:STDOUT: ret void, !dbg !349 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %self) #0 !dbg !335 { +// CHECK:STDOUT: define i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %self) #0 !dbg !351 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15_42.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !340 -// CHECK:STDOUT: %.loc15_42.2 = load i32, ptr %.loc15_42.1.n, align 4, !dbg !340 -// CHECK:STDOUT: ret i32 %.loc15_42.2, !dbg !341 +// CHECK:STDOUT: %.loc15_42.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !356 +// CHECK:STDOUT: %.loc15_42.2 = load i32, ptr %.loc15_42.1.n, align 4, !dbg !356 +// CHECK:STDOUT: ret i32 %.loc15_42.2, !dbg !357 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest2.Main(ptr %c) #0 !dbg !343 { +// CHECK:STDOUT: define void @_CTest2.Main(ptr %c) #0 !dbg !359 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CAsType.Main.3280a9d16838b780(ptr %c), !dbg !347 -// CHECK:STDOUT: ret void, !dbg !348 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CAsType.Main.8122a03446648385(i32 %x) #0 !dbg !350 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !356 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CAsType.Main.3280a9d16838b780(ptr %x) #0 !dbg !358 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %C.as.As.impl.Convert.call = call i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %x), !dbg !361 +// CHECK:STDOUT: call void @_CAsType.Main.3280a9d16838b780(ptr %c), !dbg !363 // CHECK:STDOUT: ret void, !dbg !364 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CAsType.Main.8122a03446648385(i32 %x) #0 !dbg !366 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !372 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CAsType.Main.3280a9d16838b780(ptr %x) #0 !dbg !374 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %C.as.As.impl.Convert.call = call i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %x), !dbg !377 +// CHECK:STDOUT: ret void, !dbg !380 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!327} +// CHECK:STDOUT: !llvm.dbg.cu = !{!343} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !24 = !{!20, !23} -// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !78 = !{null, !20} -// CHECK:STDOUT: !79 = !DISubroutineType(types: !78) -// CHECK:STDOUT: !114 = !{null, !23} -// CHECK:STDOUT: !115 = !DISubroutineType(types: !114) -// CHECK:STDOUT: !326 = !DIFile(filename: "as_type.carbon", directory: "") -// CHECK:STDOUT: !327 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !326, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !328 = distinct !DISubprogram(name: "Test1", linkageName: "_CTest1.Main", scope: null, file: !326, line: 8, type: !79, spFlags: DISPFlagDefinition, unit: !327, retainedNodes: !334) -// CHECK:STDOUT: !329 = !DILocalVariable(arg: 1, scope: !328, type: !20) -// CHECK:STDOUT: !332 = !DILocation(line: 9, column: 3, scope: !328) -// CHECK:STDOUT: !333 = !DILocation(line: 8, column: 1, scope: !328) -// CHECK:STDOUT: !334 = !{!329} -// CHECK:STDOUT: !335 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.C.Main:As.84588f41d61dafba.Core", scope: null, file: !326, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !327, retainedNodes: !342) -// CHECK:STDOUT: !336 = !DILocalVariable(arg: 1, scope: !335, type: !23) -// CHECK:STDOUT: !340 = !DILocation(line: 15, column: 38, scope: !335) -// CHECK:STDOUT: !341 = !DILocation(line: 15, column: 31, scope: !335) -// CHECK:STDOUT: !342 = !{!336} -// CHECK:STDOUT: !343 = distinct !DISubprogram(name: "Test2", linkageName: "_CTest2.Main", scope: null, file: !326, line: 19, type: !115, spFlags: DISPFlagDefinition, unit: !327, retainedNodes: !349) -// CHECK:STDOUT: !344 = !DILocalVariable(arg: 1, scope: !343, type: !23) -// CHECK:STDOUT: !347 = !DILocation(line: 20, column: 3, scope: !343) -// CHECK:STDOUT: !348 = !DILocation(line: 19, column: 1, scope: !343) -// CHECK:STDOUT: !349 = !{!344} -// CHECK:STDOUT: !350 = distinct !DISubprogram(name: "AsType", linkageName: "_CAsType.Main.8122a03446648385", scope: null, file: !326, line: 4, type: !79, spFlags: DISPFlagDefinition, unit: !327, retainedNodes: !357) -// CHECK:STDOUT: !351 = !DILocalVariable(arg: 1, scope: !350, type: !20) -// CHECK:STDOUT: !356 = !DILocation(line: 4, column: 1, scope: !350) -// CHECK:STDOUT: !357 = !{!351} -// CHECK:STDOUT: !358 = distinct !DISubprogram(name: "AsType", linkageName: "_CAsType.Main.3280a9d16838b780", scope: null, file: !326, line: 4, type: !115, spFlags: DISPFlagDefinition, unit: !327, retainedNodes: !365) -// CHECK:STDOUT: !359 = !DILocalVariable(arg: 1, scope: !358, type: !23) -// CHECK:STDOUT: !361 = !DILocation(line: 5, column: 14, scope: !358) -// CHECK:STDOUT: !364 = !DILocation(line: 4, column: 1, scope: !358) -// CHECK:STDOUT: !365 = !{!359} +// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !40 = !{!36, !39} +// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) +// CHECK:STDOUT: !94 = !{null, !36} +// CHECK:STDOUT: !95 = !DISubroutineType(types: !94) +// CHECK:STDOUT: !130 = !{null, !39} +// CHECK:STDOUT: !131 = !DISubroutineType(types: !130) +// CHECK:STDOUT: !342 = !DIFile(filename: "as_type.carbon", directory: "") +// CHECK:STDOUT: !343 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !342, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !344 = distinct !DISubprogram(name: "Test1", linkageName: "_CTest1.Main", scope: null, file: !342, line: 8, type: !95, spFlags: DISPFlagDefinition, unit: !343, retainedNodes: !350) +// CHECK:STDOUT: !345 = !DILocalVariable(arg: 1, scope: !344, type: !36) +// CHECK:STDOUT: !348 = !DILocation(line: 9, column: 3, scope: !344) +// CHECK:STDOUT: !349 = !DILocation(line: 8, column: 1, scope: !344) +// CHECK:STDOUT: !350 = !{!345} +// CHECK:STDOUT: !351 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.C.Main:As.84588f41d61dafba.Core", scope: null, file: !342, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !343, retainedNodes: !358) +// CHECK:STDOUT: !352 = !DILocalVariable(arg: 1, scope: !351, type: !39) +// CHECK:STDOUT: !356 = !DILocation(line: 15, column: 38, scope: !351) +// CHECK:STDOUT: !357 = !DILocation(line: 15, column: 31, scope: !351) +// CHECK:STDOUT: !358 = !{!352} +// CHECK:STDOUT: !359 = distinct !DISubprogram(name: "Test2", linkageName: "_CTest2.Main", scope: null, file: !342, line: 19, type: !131, spFlags: DISPFlagDefinition, unit: !343, retainedNodes: !365) +// CHECK:STDOUT: !360 = !DILocalVariable(arg: 1, scope: !359, type: !39) +// CHECK:STDOUT: !363 = !DILocation(line: 20, column: 3, scope: !359) +// CHECK:STDOUT: !364 = !DILocation(line: 19, column: 1, scope: !359) +// CHECK:STDOUT: !365 = !{!360} +// CHECK:STDOUT: !366 = distinct !DISubprogram(name: "AsType", linkageName: "_CAsType.Main.8122a03446648385", scope: null, file: !342, line: 4, type: !95, spFlags: DISPFlagDefinition, unit: !343, retainedNodes: !373) +// CHECK:STDOUT: !367 = !DILocalVariable(arg: 1, scope: !366, type: !36) +// CHECK:STDOUT: !372 = !DILocation(line: 4, column: 1, scope: !366) +// CHECK:STDOUT: !373 = !{!367} +// CHECK:STDOUT: !374 = distinct !DISubprogram(name: "AsType", linkageName: "_CAsType.Main.3280a9d16838b780", scope: null, file: !342, line: 4, type: !131, spFlags: DISPFlagDefinition, unit: !343, retainedNodes: !381) +// CHECK:STDOUT: !375 = !DILocalVariable(arg: 1, scope: !374, type: !39) +// CHECK:STDOUT: !377 = !DILocation(line: 5, column: 14, scope: !374) +// CHECK:STDOUT: !380 = !DILocation(line: 4, column: 1, scope: !374) +// CHECK:STDOUT: !381 = !{!375} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/var/destroy_control_flow.carbon b/toolchain/lower/testdata/var/destroy_control_flow.carbon index a7ae0f976bef..051c6a7f6162 100644 --- a/toolchain/lower/testdata/var/destroy_control_flow.carbon +++ b/toolchain/lower/testdata/var/destroy_control_flow.carbon @@ -120,30 +120,30 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: declare void @"_COp.Destructible.Main:Destroy.Core"(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Destroy.3fda586d04e243ea.Core:Destructible.Main:Destroy.Core"(ptr %self) #0 !dbg !37 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Destroy.3fda586d04e243ea.Core:Destructible.Main:Destroy.Core"(ptr %self) #0 !dbg !39 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_COp.Destructible.Main:Destroy.Core"(ptr %self), !dbg !40 -// CHECK:STDOUT: ret void, !dbg !40 +// CHECK:STDOUT: call void @"_COp.Destructible.Main:Destroy.Core"(ptr %self), !dbg !42 +// CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CUse.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !32 = !DIFile(filename: "destructible.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !35 = !{null, !34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Destroy.3fda586d04e243ea.Core:Destructible.Main:Destroy.Core", scope: null, file: !32, line: 7, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !41) -// CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !34) -// CHECK:STDOUT: !40 = !DILocation(line: 7, column: 5, scope: !37) -// CHECK:STDOUT: !41 = !{!38} +// CHECK:STDOUT: !34 = !DIFile(filename: "destructible.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !37 = !{null, !36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Destroy.3fda586d04e243ea.Core:Destructible.Main:Destroy.Core", scope: null, file: !34, line: 7, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !43) +// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !36) +// CHECK:STDOUT: !42 = !DILocation(line: 7, column: 5, scope: !39) +// CHECK:STDOUT: !43 = !{!40} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'if_then.carbon' @@ -152,40 +152,40 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: @Destructible.val.loc6_3 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CIfThen.Main(i1 %cond) #0 !dbg !44 { +// CHECK:STDOUT: define void @_CIfThen.Main(i1 %cond) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !47 -// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !54 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !47 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !47 -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !51 -// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !53 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !49 +// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !56 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !49 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !49 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !53 +// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !55 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !54 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !54 -// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !54 -// CHECK:STDOUT: br label %if.else, !dbg !59 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !56 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !56 +// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !60 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !56 +// CHECK:STDOUT: br label %if.else, !dbg !61 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %if.then, %entry -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !62 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !47 -// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !64 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !49 +// CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CUse.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !65 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !67 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !67 +// CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !69 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !71 +// CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -203,35 +203,35 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!43} +// CHECK:STDOUT: !llvm.dbg.cu = !{!45} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !35 = !{null, !34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !42 = !DIFile(filename: "if_then.carbon", directory: "") -// CHECK:STDOUT: !43 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !42, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "IfThen", linkageName: "_CIfThen.Main", scope: null, file: !42, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !64) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !34) -// CHECK:STDOUT: !47 = !DILocation(line: 6, column: 3, scope: !44) -// CHECK:STDOUT: !51 = !DILocation(line: 7, column: 3, scope: !44) -// CHECK:STDOUT: !53 = !DILocation(line: 8, column: 6, scope: !44) -// CHECK:STDOUT: !54 = !DILocation(line: 9, column: 5, scope: !44) -// CHECK:STDOUT: !58 = !DILocation(line: 10, column: 5, scope: !44) -// CHECK:STDOUT: !59 = !DILocation(line: 8, column: 3, scope: !44) -// CHECK:STDOUT: !62 = !DILocation(line: 12, column: 3, scope: !44) -// CHECK:STDOUT: !63 = !DILocation(line: 5, column: 1, scope: !44) -// CHECK:STDOUT: !64 = !{!45} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !42, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !68) -// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !34) -// CHECK:STDOUT: !67 = !DILocation(line: 9, column: 5, scope: !65) -// CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !42, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !72) -// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !34) -// CHECK:STDOUT: !71 = !DILocation(line: 9, column: 5, scope: !69) -// CHECK:STDOUT: !72 = !{!70} +// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !37 = !{null, !36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !44 = !DIFile(filename: "if_then.carbon", directory: "") +// CHECK:STDOUT: !45 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !44, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "IfThen", linkageName: "_CIfThen.Main", scope: null, file: !44, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !45, retainedNodes: !66) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !36) +// CHECK:STDOUT: !49 = !DILocation(line: 6, column: 3, scope: !46) +// CHECK:STDOUT: !53 = !DILocation(line: 7, column: 3, scope: !46) +// CHECK:STDOUT: !55 = !DILocation(line: 8, column: 6, scope: !46) +// CHECK:STDOUT: !56 = !DILocation(line: 9, column: 5, scope: !46) +// CHECK:STDOUT: !60 = !DILocation(line: 10, column: 5, scope: !46) +// CHECK:STDOUT: !61 = !DILocation(line: 8, column: 3, scope: !46) +// CHECK:STDOUT: !64 = !DILocation(line: 12, column: 3, scope: !46) +// CHECK:STDOUT: !65 = !DILocation(line: 5, column: 1, scope: !46) +// CHECK:STDOUT: !66 = !{!47} +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !44, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !45, retainedNodes: !70) +// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !36) +// CHECK:STDOUT: !69 = !DILocation(line: 9, column: 5, scope: !67) +// CHECK:STDOUT: !70 = !{!68} +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !44, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !45, retainedNodes: !74) +// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !36) +// CHECK:STDOUT: !73 = !DILocation(line: 9, column: 5, scope: !71) +// CHECK:STDOUT: !74 = !{!72} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'if_else.carbon' @@ -240,48 +240,48 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: @Destructible.val.loc6_3 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CIfElse.Main(i1 %cond) #0 !dbg !75 { +// CHECK:STDOUT: define void @_CIfElse.Main(i1 %cond) #0 !dbg !77 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !78 -// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !85 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !91 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !78 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !78 -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !82 -// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !84 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !80 +// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !87 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !93 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !80 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !80 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !84 +// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !86 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !85 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !85 -// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !89 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !85 -// CHECK:STDOUT: br label %if.done, !dbg !90 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !87 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !87 +// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !91 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !87 +// CHECK:STDOUT: br label %if.done, !dbg !92 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !91 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !91 -// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !95 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !91 -// CHECK:STDOUT: br label %if.done, !dbg !90 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !93 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !93 +// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !97 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !93 +// CHECK:STDOUT: br label %if.done, !dbg !92 // CHECK:STDOUT: // CHECK:STDOUT: if.done: ; preds = %if.else, %if.then -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !98 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !78 -// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !100 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !80 +// CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CUse.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !101 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !103 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !103 +// CHECK:STDOUT: ret void, !dbg !105 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !105 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !107 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !107 +// CHECK:STDOUT: ret void, !dbg !109 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -299,37 +299,37 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!74} +// CHECK:STDOUT: !llvm.dbg.cu = !{!76} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !35 = !{null, !34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !73 = !DIFile(filename: "if_else.carbon", directory: "") -// CHECK:STDOUT: !74 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !73, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "IfElse", linkageName: "_CIfElse.Main", scope: null, file: !73, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !74, retainedNodes: !100) -// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !34) -// CHECK:STDOUT: !78 = !DILocation(line: 6, column: 3, scope: !75) -// CHECK:STDOUT: !82 = !DILocation(line: 7, column: 3, scope: !75) -// CHECK:STDOUT: !84 = !DILocation(line: 8, column: 6, scope: !75) -// CHECK:STDOUT: !85 = !DILocation(line: 9, column: 5, scope: !75) -// CHECK:STDOUT: !89 = !DILocation(line: 10, column: 5, scope: !75) -// CHECK:STDOUT: !90 = !DILocation(line: 8, column: 3, scope: !75) -// CHECK:STDOUT: !91 = !DILocation(line: 12, column: 5, scope: !75) -// CHECK:STDOUT: !95 = !DILocation(line: 13, column: 5, scope: !75) -// CHECK:STDOUT: !98 = !DILocation(line: 15, column: 3, scope: !75) -// CHECK:STDOUT: !99 = !DILocation(line: 5, column: 1, scope: !75) -// CHECK:STDOUT: !100 = !{!76} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !73, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !74, retainedNodes: !104) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !34) -// CHECK:STDOUT: !103 = !DILocation(line: 9, column: 5, scope: !101) -// CHECK:STDOUT: !104 = !{!102} -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !73, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !74, retainedNodes: !108) -// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !34) -// CHECK:STDOUT: !107 = !DILocation(line: 9, column: 5, scope: !105) -// CHECK:STDOUT: !108 = !{!106} +// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !37 = !{null, !36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !75 = !DIFile(filename: "if_else.carbon", directory: "") +// CHECK:STDOUT: !76 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !75, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "IfElse", linkageName: "_CIfElse.Main", scope: null, file: !75, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !76, retainedNodes: !102) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !36) +// CHECK:STDOUT: !80 = !DILocation(line: 6, column: 3, scope: !77) +// CHECK:STDOUT: !84 = !DILocation(line: 7, column: 3, scope: !77) +// CHECK:STDOUT: !86 = !DILocation(line: 8, column: 6, scope: !77) +// CHECK:STDOUT: !87 = !DILocation(line: 9, column: 5, scope: !77) +// CHECK:STDOUT: !91 = !DILocation(line: 10, column: 5, scope: !77) +// CHECK:STDOUT: !92 = !DILocation(line: 8, column: 3, scope: !77) +// CHECK:STDOUT: !93 = !DILocation(line: 12, column: 5, scope: !77) +// CHECK:STDOUT: !97 = !DILocation(line: 13, column: 5, scope: !77) +// CHECK:STDOUT: !100 = !DILocation(line: 15, column: 3, scope: !77) +// CHECK:STDOUT: !101 = !DILocation(line: 5, column: 1, scope: !77) +// CHECK:STDOUT: !102 = !{!78} +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !75, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !76, retainedNodes: !106) +// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !36) +// CHECK:STDOUT: !105 = !DILocation(line: 9, column: 5, scope: !103) +// CHECK:STDOUT: !106 = !{!104} +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !75, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !76, retainedNodes: !110) +// CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !36) +// CHECK:STDOUT: !109 = !DILocation(line: 9, column: 5, scope: !107) +// CHECK:STDOUT: !110 = !{!108} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'if_return.carbon' @@ -338,40 +338,40 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: @Destructible.val.loc6_3 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CIfReturn.Main(i1 %cond) #0 !dbg !111 { +// CHECK:STDOUT: define void @_CIfReturn.Main(i1 %cond) #0 !dbg !113 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !114 -// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !121 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !114 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !114 -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !118 -// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !120 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !116 +// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !123 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !116 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !116 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !120 +// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !122 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !121 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !121 -// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !125 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !121 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !114 -// CHECK:STDOUT: ret void, !dbg !126 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !123 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !123 +// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !127 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !123 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !116 +// CHECK:STDOUT: ret void, !dbg !128 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !114 -// CHECK:STDOUT: ret void, !dbg !127 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !116 +// CHECK:STDOUT: ret void, !dbg !129 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CUse.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !129 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !131 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !131 +// CHECK:STDOUT: ret void, !dbg !133 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !133 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !135 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !135 +// CHECK:STDOUT: ret void, !dbg !137 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -389,34 +389,34 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!110} +// CHECK:STDOUT: !llvm.dbg.cu = !{!112} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !35 = !{null, !34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !109 = !DIFile(filename: "if_return.carbon", directory: "") -// CHECK:STDOUT: !110 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !109, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "IfReturn", linkageName: "_CIfReturn.Main", scope: null, file: !109, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !110, retainedNodes: !128) -// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !34) -// CHECK:STDOUT: !114 = !DILocation(line: 6, column: 3, scope: !111) -// CHECK:STDOUT: !118 = !DILocation(line: 7, column: 3, scope: !111) -// CHECK:STDOUT: !120 = !DILocation(line: 8, column: 6, scope: !111) -// CHECK:STDOUT: !121 = !DILocation(line: 9, column: 5, scope: !111) -// CHECK:STDOUT: !125 = !DILocation(line: 10, column: 5, scope: !111) -// CHECK:STDOUT: !126 = !DILocation(line: 11, column: 5, scope: !111) -// CHECK:STDOUT: !127 = !DILocation(line: 5, column: 1, scope: !111) -// CHECK:STDOUT: !128 = !{!112} -// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !109, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !110, retainedNodes: !132) -// CHECK:STDOUT: !130 = !DILocalVariable(arg: 1, scope: !129, type: !34) -// CHECK:STDOUT: !131 = !DILocation(line: 9, column: 5, scope: !129) -// CHECK:STDOUT: !132 = !{!130} -// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !109, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !110, retainedNodes: !136) -// CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !133, type: !34) -// CHECK:STDOUT: !135 = !DILocation(line: 9, column: 5, scope: !133) -// CHECK:STDOUT: !136 = !{!134} +// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !37 = !{null, !36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !111 = !DIFile(filename: "if_return.carbon", directory: "") +// CHECK:STDOUT: !112 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !111, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "IfReturn", linkageName: "_CIfReturn.Main", scope: null, file: !111, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !130) +// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !36) +// CHECK:STDOUT: !116 = !DILocation(line: 6, column: 3, scope: !113) +// CHECK:STDOUT: !120 = !DILocation(line: 7, column: 3, scope: !113) +// CHECK:STDOUT: !122 = !DILocation(line: 8, column: 6, scope: !113) +// CHECK:STDOUT: !123 = !DILocation(line: 9, column: 5, scope: !113) +// CHECK:STDOUT: !127 = !DILocation(line: 10, column: 5, scope: !113) +// CHECK:STDOUT: !128 = !DILocation(line: 11, column: 5, scope: !113) +// CHECK:STDOUT: !129 = !DILocation(line: 5, column: 1, scope: !113) +// CHECK:STDOUT: !130 = !{!114} +// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !111, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !134) +// CHECK:STDOUT: !132 = !DILocalVariable(arg: 1, scope: !131, type: !36) +// CHECK:STDOUT: !133 = !DILocation(line: 9, column: 5, scope: !131) +// CHECK:STDOUT: !134 = !{!132} +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !111, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !138) +// CHECK:STDOUT: !136 = !DILocalVariable(arg: 1, scope: !135, type: !36) +// CHECK:STDOUT: !137 = !DILocation(line: 9, column: 5, scope: !135) +// CHECK:STDOUT: !138 = !{!136} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'while_break.carbon' @@ -425,56 +425,56 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: @Destructible.val.loc6_3 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CWhileBreak.Main(i1 %cond) #0 !dbg !139 { +// CHECK:STDOUT: define void @_CWhileBreak.Main(i1 %cond) #0 !dbg !141 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !142 -// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !152 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !159 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !142 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !142 -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !146 -// CHECK:STDOUT: br label %while.cond, !dbg !147 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !144 +// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !154 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !161 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !144 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !144 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !148 +// CHECK:STDOUT: br label %while.cond, !dbg !149 // CHECK:STDOUT: // CHECK:STDOUT: while.cond: ; preds = %if.else, %entry -// CHECK:STDOUT: br i1 %cond, label %while.body, label %while.done, !dbg !147 +// CHECK:STDOUT: br i1 %cond, label %while.body, label %while.done, !dbg !149 // CHECK:STDOUT: // CHECK:STDOUT: while.body: ; preds = %while.cond -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !151 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !152 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !152 -// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !156 -// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !158 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !153 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !154 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !154 +// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !158 +// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !160 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %while.body -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !159 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !159 -// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !163 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !159 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !152 -// CHECK:STDOUT: br label %while.done, !dbg !164 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !161 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !161 +// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !165 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !161 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !154 +// CHECK:STDOUT: br label %while.done, !dbg !166 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %while.body -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !152 -// CHECK:STDOUT: br label %while.cond, !dbg !165 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !154 +// CHECK:STDOUT: br label %while.cond, !dbg !167 // CHECK:STDOUT: // CHECK:STDOUT: while.done: ; preds = %if.then, %while.cond -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !168 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !142 -// CHECK:STDOUT: ret void, !dbg !169 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !170 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !144 +// CHECK:STDOUT: ret void, !dbg !171 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CUse.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !171 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !173 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !173 +// CHECK:STDOUT: ret void, !dbg !175 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !175 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !177 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !177 +// CHECK:STDOUT: ret void, !dbg !179 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -492,40 +492,40 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!138} +// CHECK:STDOUT: !llvm.dbg.cu = !{!140} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !35 = !{null, !34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !137 = !DIFile(filename: "while_break.carbon", directory: "") -// CHECK:STDOUT: !138 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !137, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "WhileBreak", linkageName: "_CWhileBreak.Main", scope: null, file: !137, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !138, retainedNodes: !170) -// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !34) -// CHECK:STDOUT: !142 = !DILocation(line: 6, column: 3, scope: !139) -// CHECK:STDOUT: !146 = !DILocation(line: 7, column: 3, scope: !139) -// CHECK:STDOUT: !147 = !DILocation(line: 8, column: 9, scope: !139) -// CHECK:STDOUT: !151 = !DILocation(line: 9, column: 5, scope: !139) -// CHECK:STDOUT: !152 = !DILocation(line: 10, column: 5, scope: !139) -// CHECK:STDOUT: !156 = !DILocation(line: 11, column: 5, scope: !139) -// CHECK:STDOUT: !158 = !DILocation(line: 12, column: 8, scope: !139) -// CHECK:STDOUT: !159 = !DILocation(line: 13, column: 7, scope: !139) -// CHECK:STDOUT: !163 = !DILocation(line: 14, column: 7, scope: !139) -// CHECK:STDOUT: !164 = !DILocation(line: 15, column: 7, scope: !139) -// CHECK:STDOUT: !165 = !DILocation(line: 8, column: 3, scope: !139) -// CHECK:STDOUT: !168 = !DILocation(line: 18, column: 3, scope: !139) -// CHECK:STDOUT: !169 = !DILocation(line: 5, column: 1, scope: !139) -// CHECK:STDOUT: !170 = !{!140} -// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !137, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !138, retainedNodes: !174) -// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !34) -// CHECK:STDOUT: !173 = !DILocation(line: 13, column: 7, scope: !171) -// CHECK:STDOUT: !174 = !{!172} -// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !137, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !138, retainedNodes: !178) -// CHECK:STDOUT: !176 = !DILocalVariable(arg: 1, scope: !175, type: !34) -// CHECK:STDOUT: !177 = !DILocation(line: 13, column: 7, scope: !175) -// CHECK:STDOUT: !178 = !{!176} +// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !37 = !{null, !36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !139 = !DIFile(filename: "while_break.carbon", directory: "") +// CHECK:STDOUT: !140 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !139, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "WhileBreak", linkageName: "_CWhileBreak.Main", scope: null, file: !139, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !172) +// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !36) +// CHECK:STDOUT: !144 = !DILocation(line: 6, column: 3, scope: !141) +// CHECK:STDOUT: !148 = !DILocation(line: 7, column: 3, scope: !141) +// CHECK:STDOUT: !149 = !DILocation(line: 8, column: 9, scope: !141) +// CHECK:STDOUT: !153 = !DILocation(line: 9, column: 5, scope: !141) +// CHECK:STDOUT: !154 = !DILocation(line: 10, column: 5, scope: !141) +// CHECK:STDOUT: !158 = !DILocation(line: 11, column: 5, scope: !141) +// CHECK:STDOUT: !160 = !DILocation(line: 12, column: 8, scope: !141) +// CHECK:STDOUT: !161 = !DILocation(line: 13, column: 7, scope: !141) +// CHECK:STDOUT: !165 = !DILocation(line: 14, column: 7, scope: !141) +// CHECK:STDOUT: !166 = !DILocation(line: 15, column: 7, scope: !141) +// CHECK:STDOUT: !167 = !DILocation(line: 8, column: 3, scope: !141) +// CHECK:STDOUT: !170 = !DILocation(line: 18, column: 3, scope: !141) +// CHECK:STDOUT: !171 = !DILocation(line: 5, column: 1, scope: !141) +// CHECK:STDOUT: !172 = !{!142} +// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !139, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !176) +// CHECK:STDOUT: !174 = !DILocalVariable(arg: 1, scope: !173, type: !36) +// CHECK:STDOUT: !175 = !DILocation(line: 13, column: 7, scope: !173) +// CHECK:STDOUT: !176 = !{!174} +// CHECK:STDOUT: !177 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !139, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !180) +// CHECK:STDOUT: !178 = !DILocalVariable(arg: 1, scope: !177, type: !36) +// CHECK:STDOUT: !179 = !DILocation(line: 13, column: 7, scope: !177) +// CHECK:STDOUT: !180 = !{!178} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'while_continue.carbon' @@ -534,56 +534,56 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: @Destructible.val.loc6_3 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CWhileContinue.Main(i1 %cond) #0 !dbg !181 { +// CHECK:STDOUT: define void @_CWhileContinue.Main(i1 %cond) #0 !dbg !183 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !184 -// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !194 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !201 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !184 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !184 -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !188 -// CHECK:STDOUT: br label %while.cond, !dbg !189 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !186 +// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !196 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !203 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !186 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !186 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !190 +// CHECK:STDOUT: br label %while.cond, !dbg !191 // CHECK:STDOUT: // CHECK:STDOUT: while.cond: ; preds = %if.else, %if.then, %entry -// CHECK:STDOUT: br i1 %cond, label %while.body, label %while.done, !dbg !189 +// CHECK:STDOUT: br i1 %cond, label %while.body, label %while.done, !dbg !191 // CHECK:STDOUT: // CHECK:STDOUT: while.body: ; preds = %while.cond -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !193 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !194 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !194 -// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !198 -// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !200 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !195 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !196 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !196 +// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !200 +// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !202 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %while.body -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !201 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !201 -// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !205 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !201 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !194 -// CHECK:STDOUT: br label %while.cond, !dbg !206 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !203 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !203 +// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !207 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !203 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !196 +// CHECK:STDOUT: br label %while.cond, !dbg !208 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %while.body -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !194 -// CHECK:STDOUT: br label %while.cond, !dbg !207 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !196 +// CHECK:STDOUT: br label %while.cond, !dbg !209 // CHECK:STDOUT: // CHECK:STDOUT: while.done: ; preds = %while.cond -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !210 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !184 -// CHECK:STDOUT: ret void, !dbg !211 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !212 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !186 +// CHECK:STDOUT: ret void, !dbg !213 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CUse.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !213 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !215 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !215 +// CHECK:STDOUT: ret void, !dbg !217 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !217 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !219 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !219 +// CHECK:STDOUT: ret void, !dbg !221 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -601,38 +601,38 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!180} +// CHECK:STDOUT: !llvm.dbg.cu = !{!182} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !35 = !{null, !34} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !179 = !DIFile(filename: "while_continue.carbon", directory: "") -// CHECK:STDOUT: !180 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !179, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !181 = distinct !DISubprogram(name: "WhileContinue", linkageName: "_CWhileContinue.Main", scope: null, file: !179, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !180, retainedNodes: !212) -// CHECK:STDOUT: !182 = !DILocalVariable(arg: 1, scope: !181, type: !34) -// CHECK:STDOUT: !184 = !DILocation(line: 6, column: 3, scope: !181) -// CHECK:STDOUT: !188 = !DILocation(line: 7, column: 3, scope: !181) -// CHECK:STDOUT: !189 = !DILocation(line: 8, column: 9, scope: !181) -// CHECK:STDOUT: !193 = !DILocation(line: 9, column: 5, scope: !181) -// CHECK:STDOUT: !194 = !DILocation(line: 10, column: 5, scope: !181) -// CHECK:STDOUT: !198 = !DILocation(line: 11, column: 5, scope: !181) -// CHECK:STDOUT: !200 = !DILocation(line: 12, column: 8, scope: !181) -// CHECK:STDOUT: !201 = !DILocation(line: 13, column: 7, scope: !181) -// CHECK:STDOUT: !205 = !DILocation(line: 14, column: 7, scope: !181) -// CHECK:STDOUT: !206 = !DILocation(line: 15, column: 7, scope: !181) -// CHECK:STDOUT: !207 = !DILocation(line: 8, column: 3, scope: !181) -// CHECK:STDOUT: !210 = !DILocation(line: 18, column: 3, scope: !181) -// CHECK:STDOUT: !211 = !DILocation(line: 5, column: 1, scope: !181) -// CHECK:STDOUT: !212 = !{!182} -// CHECK:STDOUT: !213 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !179, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !180, retainedNodes: !216) -// CHECK:STDOUT: !214 = !DILocalVariable(arg: 1, scope: !213, type: !34) -// CHECK:STDOUT: !215 = !DILocation(line: 13, column: 7, scope: !213) -// CHECK:STDOUT: !216 = !{!214} -// CHECK:STDOUT: !217 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !179, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !180, retainedNodes: !220) -// CHECK:STDOUT: !218 = !DILocalVariable(arg: 1, scope: !217, type: !34) -// CHECK:STDOUT: !219 = !DILocation(line: 13, column: 7, scope: !217) -// CHECK:STDOUT: !220 = !{!218} +// CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !37 = !{null, !36} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !181 = !DIFile(filename: "while_continue.carbon", directory: "") +// CHECK:STDOUT: !182 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !181, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "WhileContinue", linkageName: "_CWhileContinue.Main", scope: null, file: !181, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !182, retainedNodes: !214) +// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !36) +// CHECK:STDOUT: !186 = !DILocation(line: 6, column: 3, scope: !183) +// CHECK:STDOUT: !190 = !DILocation(line: 7, column: 3, scope: !183) +// CHECK:STDOUT: !191 = !DILocation(line: 8, column: 9, scope: !183) +// CHECK:STDOUT: !195 = !DILocation(line: 9, column: 5, scope: !183) +// CHECK:STDOUT: !196 = !DILocation(line: 10, column: 5, scope: !183) +// CHECK:STDOUT: !200 = !DILocation(line: 11, column: 5, scope: !183) +// CHECK:STDOUT: !202 = !DILocation(line: 12, column: 8, scope: !183) +// CHECK:STDOUT: !203 = !DILocation(line: 13, column: 7, scope: !183) +// CHECK:STDOUT: !207 = !DILocation(line: 14, column: 7, scope: !183) +// CHECK:STDOUT: !208 = !DILocation(line: 15, column: 7, scope: !183) +// CHECK:STDOUT: !209 = !DILocation(line: 8, column: 3, scope: !183) +// CHECK:STDOUT: !212 = !DILocation(line: 18, column: 3, scope: !183) +// CHECK:STDOUT: !213 = !DILocation(line: 5, column: 1, scope: !183) +// CHECK:STDOUT: !214 = !{!184} +// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !181, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !182, retainedNodes: !218) +// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !36) +// CHECK:STDOUT: !217 = !DILocation(line: 13, column: 7, scope: !215) +// CHECK:STDOUT: !218 = !{!216} +// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !181, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !182, retainedNodes: !222) +// CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !36) +// CHECK:STDOUT: !221 = !DILocation(line: 13, column: 7, scope: !219) +// CHECK:STDOUT: !222 = !{!220} // CHECK:STDOUT: diff --git a/toolchain/sem_ir/builtin_function_kind.cpp b/toolchain/sem_ir/builtin_function_kind.cpp index 8bb40da7e33e..d61fb294685c 100644 --- a/toolchain/sem_ir/builtin_function_kind.cpp +++ b/toolchain/sem_ir/builtin_function_kind.cpp @@ -130,6 +130,9 @@ using Bool = BuiltinType; // Constraint that a type is `Core.CharLiteral`. using CharLiteral = BuiltinType; +// Constraint that a type is `Core.IntLiteral`. +using IntLiteral = BuiltinType; + // Constraint that a type is `u8` or an adapted type, including `Core.Char`. struct CharCompatible { static auto CheckType(const File& sem_ir, ValidateState& /*state*/, @@ -457,6 +460,10 @@ constexpr BuiltinInfo BoolMakeType = {"bool.make_type", constexpr BuiltinInfo MaybeUnformedMakeType = { "maybe_unformed.make_type", ValidateSignatureType>}; +// Returns the primitive `array(T, N)` type. +constexpr BuiltinInfo ArrayMakeType = { + "array.make_type", ValidateSignatureType>}; + // Returns the `Form` type. constexpr BuiltinInfo FormMakeType = {"form.make_type", ValidateSignatureType>}; diff --git a/toolchain/sem_ir/builtin_function_kind.def b/toolchain/sem_ir/builtin_function_kind.def index 41b469f1bd94..51d6b35147da 100644 --- a/toolchain/sem_ir/builtin_function_kind.def +++ b/toolchain/sem_ir/builtin_function_kind.def @@ -44,6 +44,7 @@ CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntMakeTypeUnsigned) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(FloatMakeType) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(BoolMakeType) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(MaybeUnformedMakeType) +CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(ArrayMakeType) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(FormMakeType) // Character conversion. diff --git a/toolchain/sem_ir/inst_namer.cpp b/toolchain/sem_ir/inst_namer.cpp index 0e45d767246f..10a2dc47185a 100644 --- a/toolchain/sem_ir/inst_namer.cpp +++ b/toolchain/sem_ir/inst_namer.cpp @@ -1479,7 +1479,8 @@ auto InstNamer::NamingContext::NameInst() -> void { return; } case CARBON_KIND(TupleValue inst): { - if (sem_ir().types().Is(inst.type_id)) { + if (sem_ir().types().Is( + sem_ir().types().GetTransitiveAdaptedType(inst.type_id))) { AddInstName("array"); } else if (inst.elements_id == InstBlockId::Empty) { AddInstName("empty_tuple"); diff --git a/toolchain/sem_ir/stringify.cpp b/toolchain/sem_ir/stringify.cpp index 67f8a00aac7a..a893c47d028a 100644 --- a/toolchain/sem_ir/stringify.cpp +++ b/toolchain/sem_ir/stringify.cpp @@ -375,8 +375,8 @@ class Stringifier { } auto StringifyInst(InstId /*inst_id*/, ArrayType inst) -> void { - *out_ << "array("; - step_stack_->Push(inst.element_type_inst_id, ", ", inst.bound_id, ")"); + *out_ << "Push(inst.element_type_inst_id, ", ", inst.bound_id, ")>"); } auto StringifyInst(InstId /*inst_id*/, AssociatedConstantDecl inst) -> void { @@ -579,6 +579,14 @@ class Stringifier { const auto& class_info = sem_ir_->classes().Get(inst.class_id); if (auto type_info = RecognizedTypeInfo::ForType(*sem_ir_, inst); type_info.is_valid()) { + if (type_info.kind == RecognizedTypeInfo::Array) { + auto args = sem_ir_->inst_blocks().Get(type_info.args_id); + if (args.size() == 2) { + *out_ << "array("; + step_stack_->Push(args[0], ", ", args[1], ")"); + return; + } + } if (type_info.PrintLiteral(*sem_ir_, *out_)) { return; } @@ -1150,7 +1158,7 @@ auto StringifySpecific(const File& sem_ir, SpecificId specific_id) auto decl = sem_ir.insts().Get(generic.decl_id); CARBON_KIND_SWITCH(decl) { case CARBON_KIND(ClassDecl class_decl): { - // Print `Core.Int(N)` as `iN`. + // Print `Core.Int(N)` as `iN` and `Core.Array(T, N)` as `array(T, N)`. // TODO: This duplicates work done in StringifyInst for ClassType. const auto& class_info = sem_ir.classes().Get(class_decl.class_id); if (auto type_info = RecognizedTypeInfo::ForType( @@ -1158,6 +1166,13 @@ auto StringifySpecific(const File& sem_ir, SpecificId specific_id) .class_id = class_decl.class_id, .specific_id = specific_id}); type_info.is_valid()) { + if (type_info.kind == RecognizedTypeInfo::Array) { + auto args = sem_ir.inst_blocks().Get(type_info.args_id); + if (args.size() == 2) { + step_stack.Push("array(", args[0], ", ", args[1], ")"); + break; + } + } RawStringOstream out; if (type_info.PrintLiteral(sem_ir, out)) { return out.TakeStr(); diff --git a/toolchain/sem_ir/type_info.cpp b/toolchain/sem_ir/type_info.cpp index 802fee568eb9..07b81a7d6045 100644 --- a/toolchain/sem_ir/type_info.cpp +++ b/toolchain/sem_ir/type_info.cpp @@ -146,7 +146,8 @@ auto NumericTypeLiteralInfo::PrintLiteral(const File& file, // Returns whether this kind of recognized type should have a generic argument // list. static auto ExpectsArgs(RecognizedTypeInfo::Kind kind) -> bool { - return kind == RecognizedTypeInfo::Optional; + return kind == RecognizedTypeInfo::Optional || + kind == RecognizedTypeInfo::Array; } auto RecognizedTypeInfo::ForType(const File& file, ClassType class_type) @@ -184,6 +185,7 @@ auto RecognizedTypeInfo::ForType(const File& file, ClassType class_type) if (!parent_scope_name_id.has_value()) { Kind kind = llvm::StringSwitch(*name_ident) + .Case("Array", Array) .Case("Char", Char) .Case("Optional", Optional) .Case("String", Str) @@ -274,6 +276,9 @@ auto RecognizedTypeInfo::PrintLiteral(const File& file, } break; case Optional: + case Array: + // Printing these requires stringifying the arguments, which is handled + // by the caller. break; case Str: out << "str"; diff --git a/toolchain/sem_ir/type_info.h b/toolchain/sem_ir/type_info.h index 13373aadf97b..631fbccb9634 100644 --- a/toolchain/sem_ir/type_info.h +++ b/toolchain/sem_ir/type_info.h @@ -381,6 +381,8 @@ struct RecognizedTypeInfo { // `str` / `Core.String`. // TODO: Rename `Core.String` to `Core.Str`. Str, + // `array(T, N)` / `Core.Array(T, N)`. + Array, }; // Returns the type literal that would evaluate to this class type, if any. diff --git a/toolchain/sem_ir/typed_insts.h b/toolchain/sem_ir/typed_insts.h index 250659f27eda..0110b8b9b999 100644 --- a/toolchain/sem_ir/typed_insts.h +++ b/toolchain/sem_ir/typed_insts.h @@ -150,7 +150,8 @@ struct AliasBinding { InstId value_id; }; -// An array indexing operation, such as `array[index]`. +// An array indexing operation, such as `array[index]`. The type of `array_id` +// is an array type or a type that transitively adapts one. struct ArrayIndex { // Parse node is usually Parse::IndexExprId. static constexpr auto Kind = InstKind::ArrayIndex.Define( @@ -178,9 +179,10 @@ struct ArrayInit { DestInstId dest_id; }; -// An array of `element_type_id` values, sized to `bound_id`. +// A primitive array of `element_type_id` values, sized to `bound_id`. The +// `Core.Array` class is defined as an adapter for this type. struct ArrayType { - static constexpr auto Kind = InstKind::ArrayType.Define( + static constexpr auto Kind = InstKind::ArrayType.Define( {.ir_name = "array_type", .is_type = InstIsType::Always, .constant_kind = InstConstantKind::Conditional, diff --git a/toolchain/testing/testdata/min_prelude/array.carbon b/toolchain/testing/testdata/min_prelude/array.carbon new file mode 100644 index 000000000000..f11f61402fbe --- /dev/null +++ b/toolchain/testing/testdata/min_prelude/array.carbon @@ -0,0 +1,16 @@ +// 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 +// +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/array.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int.carbon +// EXTRA-ARGS: --custom-core --exclude-dump-file-prefix=min_prelude/ + +// --- min_prelude/array.carbon + +// A minimal prelude for testing arrays. Also includes integer support since +// that's generally necessary when using arrays. +package Core library "prelude"; + +export import library "prelude/parts/array"; +export import library "prelude/parts/int"; diff --git a/toolchain/testing/testdata/min_prelude/int.carbon b/toolchain/testing/testdata/min_prelude/int.carbon index f709432bbc91..7373017f2e36 100644 --- a/toolchain/testing/testdata/min_prelude/int.carbon +++ b/toolchain/testing/testdata/min_prelude/int.carbon @@ -7,7 +7,7 @@ // --- min_prelude/int.carbon -// A minimal prelude for testing using `Int` or `i32`; required for arrays. +// A minimal prelude for testing `Int` or `i32`. package Core library "prelude"; export import library "prelude/parts/int"; diff --git a/toolchain/testing/testdata/min_prelude/parts/array.carbon b/toolchain/testing/testdata/min_prelude/parts/array.carbon new file mode 100644 index 000000000000..c1a950023e31 --- /dev/null +++ b/toolchain/testing/testdata/min_prelude/parts/array.carbon @@ -0,0 +1,20 @@ +// 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 +// +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int_literal.carbon + +// --- min_prelude/parts/array.carbon + +package Core library "prelude/parts/array"; + +export import library "prelude/parts/int_literal"; + +// Arrays. + +private fn MakeArray(element_type: type, bound: IntLiteral) -> type = + "array.make_type"; + +class Array(T: type, N: IntLiteral) { + adapt MakeArray(T, N); +} diff --git a/toolchain/testing/testdata/min_prelude/primitives.carbon b/toolchain/testing/testdata/min_prelude/primitives.carbon index a36e4a9153be..387e8813fb75 100644 --- a/toolchain/testing/testdata/min_prelude/primitives.carbon +++ b/toolchain/testing/testdata/min_prelude/primitives.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/array.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/bool.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/char.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/copy.carbon @@ -16,6 +17,7 @@ // A minimal prelude for testing with primitive types. package Core library "prelude"; +export import library "prelude/parts/array"; export import library "prelude/parts/bool"; export import library "prelude/parts/char"; export import library "prelude/parts/copy";