| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383 |
- // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- // Exceptions. See /LICENSE for license information.
- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- //
- // AUTOUPDATE
- // TIP: To test this file alone, run:
- // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/function/declaration/import.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/declaration/import.carbon
- // ============================================================================
- // Setup files
- // ============================================================================
- // --- api.carbon
- library "api";
- fn A();
- fn B(b: i32) -> i32;
- fn C(c: (i32,)) -> {.c: i32};
- extern fn D();
- namespace NS;
- fn NS.E();
- // --- extern_api.carbon
- library "extern_api";
- extern fn A();
- extern fn B(b: i32) -> i32;
- extern fn C(c: (i32,)) -> {.c: i32};
- extern fn D();
- namespace NS;
- extern fn NS.E();
- // ============================================================================
- // Test files
- // ============================================================================
- // --- basics.carbon
- library "basics";
- import library "api";
- var a: () = A();
- var b: i32 = B(1);
- var c: {.c: i32} = C((1,));
- var d: () = D();
- var e: () = NS.E();
- // --- redecl_api.carbon
- library "redecl_api";
- import library "api";
- extern fn A();
- extern fn B(b: i32) -> i32;
- extern fn C(c: (i32,)) -> {.c: i32};
- extern fn D();
- extern fn NS.E();
- var a: () = A();
- var b: i32 = B(1);
- var c: {.c: i32} = C((1,));
- var d: () = D();
- var e: () = NS.E();
- // --- redecl_extern_api.carbon
- library "redecl_extern_api";
- import library "extern_api";
- extern fn A();
- extern fn B(b: i32) -> i32;
- extern fn C(c: (i32,)) -> {.c: i32};
- extern fn D();
- extern fn NS.E();
- var a: () = A();
- var b: i32 = B(1);
- var c: {.c: i32} = C((1,));
- var d: () = D();
- var e: () = NS.E();
- // --- fail_todo_merge.carbon
- library "merge";
- import library "api";
- // CHECK:STDERR: fail_todo_merge.carbon:[[@LINE+65]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:4:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: extern fn A();
- // CHECK:STDERR: ^~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_merge.carbon:[[@LINE-7]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:4:1: Name is previously declared here.
- // CHECK:STDERR: fn A();
- // CHECK:STDERR: ^~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_todo_merge.carbon:[[@LINE+52]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:5:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: extern fn B(b: i32) -> i32;
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_merge.carbon:[[@LINE-20]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:5:1: Name is previously declared here.
- // CHECK:STDERR: fn B(b: i32) -> i32;
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_todo_merge.carbon:[[@LINE+39]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:6:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: extern fn C(c: (i32,)) -> {.c: i32};
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_merge.carbon:[[@LINE-33]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:6:1: Name is previously declared here.
- // CHECK:STDERR: fn C(c: (i32,)) -> {.c: i32};
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_todo_merge.carbon:[[@LINE+26]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:7:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: extern fn D();
- // CHECK:STDERR: ^~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_merge.carbon:[[@LINE-46]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:7:1: Name is previously declared here.
- // CHECK:STDERR: extern fn D();
- // CHECK:STDERR: ^~~~~~~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_todo_merge.carbon:[[@LINE+13]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:10:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: extern fn NS.E();
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_merge.carbon:[[@LINE-59]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:10:1: Name is previously declared here.
- // CHECK:STDERR: fn NS.E();
- // CHECK:STDERR: ^~~~~~~~~~
- // CHECK:STDERR:
- import library "extern_api";
- var a: () = A();
- var b: i32 = B(1);
- var c: {.c: i32} = C((1,));
- var d: () = D();
- var e: () = NS.E();
- // --- fail_todo_merge_reverse.carbon
- library "merge_reverse";
- import library "extern_api";
- // CHECK:STDERR: fail_todo_merge_reverse.carbon:[[@LINE+65]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:4:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: fn A();
- // CHECK:STDERR: ^~~~~~~
- // CHECK:STDERR: fail_todo_merge_reverse.carbon:[[@LINE-7]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:4:1: Name is previously declared here.
- // CHECK:STDERR: extern fn A();
- // CHECK:STDERR: ^~~~~~~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_todo_merge_reverse.carbon:[[@LINE+52]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:5:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: fn B(b: i32) -> i32;
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_merge_reverse.carbon:[[@LINE-20]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:5:1: Name is previously declared here.
- // CHECK:STDERR: extern fn B(b: i32) -> i32;
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_todo_merge_reverse.carbon:[[@LINE+39]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:6:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: fn C(c: (i32,)) -> {.c: i32};
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_merge_reverse.carbon:[[@LINE-33]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:6:1: Name is previously declared here.
- // CHECK:STDERR: extern fn C(c: (i32,)) -> {.c: i32};
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_todo_merge_reverse.carbon:[[@LINE+26]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:7:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: extern fn D();
- // CHECK:STDERR: ^~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_merge_reverse.carbon:[[@LINE-46]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:7:1: Name is previously declared here.
- // CHECK:STDERR: extern fn D();
- // CHECK:STDERR: ^~~~~~~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_todo_merge_reverse.carbon:[[@LINE+13]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:10:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: fn NS.E();
- // CHECK:STDERR: ^~~~~~~~~~
- // CHECK:STDERR: fail_todo_merge_reverse.carbon:[[@LINE-59]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:10:1: Name is previously declared here.
- // CHECK:STDERR: extern fn NS.E();
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- import library "api";
- var a: () = A();
- var b: i32 = B(1);
- var c: {.c: i32} = C((1,));
- var d: () = D();
- var e: () = NS.E();
- // --- decl_after_use.carbon
- library "decl_after_use";
- import library "extern_api";
- var a: () = A();
- fn A();
- // --- fail_redecl_mismatch_after_use.carbon
- library "redecl_mismatch_after_use";
- import library "extern_api";
- var a: () = A();
- // CHECK:STDERR: fail_redecl_mismatch_after_use.carbon:[[@LINE+10]]:1: ERROR: Function redeclaration differs because return type is `i32`.
- // CHECK:STDERR: fn A() -> i32;
- // CHECK:STDERR: ^~~~~~~~~~~~~~
- // CHECK:STDERR: fail_redecl_mismatch_after_use.carbon:[[@LINE-7]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:4:1: Previously declared with no return type.
- // CHECK:STDERR: extern fn A();
- // CHECK:STDERR: ^~~~~~~~~~~~~~
- // CHECK:STDERR:
- fn A() -> i32;
- // --- todo_fail_extern_after_use.carbon
- library "extern_after_use";
- import library "api";
- var a: () = A();
- extern fn A();
- // --- unloaded.carbon
- library "unloaded";
- import library "api";
- // --- unloaded_extern.carbon
- library "unloaded_extern";
- import library "extern_api";
- // --- fail_todo_loaded_merge.carbon
- library "loaded_merge";
- import library "api";
- // CHECK:STDERR: fail_todo_loaded_merge.carbon:[[@LINE+64]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:4:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: extern fn A();
- // CHECK:STDERR: ^~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_loaded_merge.carbon:[[@LINE-7]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:4:1: Name is previously declared here.
- // CHECK:STDERR: fn A();
- // CHECK:STDERR: ^~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_todo_loaded_merge.carbon:[[@LINE+51]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:5:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: extern fn B(b: i32) -> i32;
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_loaded_merge.carbon:[[@LINE-20]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:5:1: Name is previously declared here.
- // CHECK:STDERR: fn B(b: i32) -> i32;
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_todo_loaded_merge.carbon:[[@LINE+38]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:6:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: extern fn C(c: (i32,)) -> {.c: i32};
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_loaded_merge.carbon:[[@LINE-33]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:6:1: Name is previously declared here.
- // CHECK:STDERR: fn C(c: (i32,)) -> {.c: i32};
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_todo_loaded_merge.carbon:[[@LINE+25]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:7:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: extern fn D();
- // CHECK:STDERR: ^~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_loaded_merge.carbon:[[@LINE-46]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:7:1: Name is previously declared here.
- // CHECK:STDERR: extern fn D();
- // CHECK:STDERR: ^~~~~~~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_todo_loaded_merge.carbon:[[@LINE+12]]:1: In import.
- // CHECK:STDERR: import library "extern_api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: extern_api.carbon:10:1: ERROR: Duplicate name being declared in the same scope.
- // CHECK:STDERR: extern fn NS.E();
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_loaded_merge.carbon:[[@LINE-59]]:1: In import.
- // CHECK:STDERR: import library "api";
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR: api.carbon:10:1: Name is previously declared here.
- // CHECK:STDERR: fn NS.E();
- // CHECK:STDERR: ^~~~~~~~~~
- import library "extern_api";
- // CHECK:STDOUT: --- api.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %A.type: type = fn_type @A [template]
- // CHECK:STDOUT: %.1: type = tuple_type () [template]
- // CHECK:STDOUT: %A: %A.type = struct_value () [template]
- // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
- // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
- // CHECK:STDOUT: %B.type: type = fn_type @B [template]
- // CHECK:STDOUT: %B: %B.type = struct_value () [template]
- // CHECK:STDOUT: %.2: type = tuple_type (type) [template]
- // CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
- // CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template]
- // CHECK:STDOUT: %C.type: type = fn_type @C [template]
- // CHECK:STDOUT: %C: %C.type = struct_value () [template]
- // CHECK:STDOUT: %D.type: type = fn_type @D [template]
- // CHECK:STDOUT: %D: %D.type = struct_value () [template]
- // CHECK:STDOUT: %E.type: type = fn_type @E [template]
- // CHECK:STDOUT: %E: %E.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Core = %Core
- // CHECK:STDOUT: .A = %A.decl
- // CHECK:STDOUT: .B = %B.decl
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .D = %D.decl
- // CHECK:STDOUT: .NS = %NS
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
- // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
- // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {
- // CHECK:STDOUT: %int.make_type_32.loc5_9: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc5_9.1: type = value_of_initializer %int.make_type_32.loc5_9 [template = i32]
- // CHECK:STDOUT: %.loc5_9.2: type = converted %int.make_type_32.loc5_9, %.loc5_9.1 [template = i32]
- // CHECK:STDOUT: %b.loc5_6.1: i32 = param b
- // CHECK:STDOUT: @B.%b: i32 = bind_name b, %b.loc5_6.1
- // CHECK:STDOUT: %int.make_type_32.loc5_17: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc5_17.1: type = value_of_initializer %int.make_type_32.loc5_17 [template = i32]
- // CHECK:STDOUT: %.loc5_17.2: type = converted %int.make_type_32.loc5_17, %.loc5_17.1 [template = i32]
- // CHECK:STDOUT: @B.%return: ref i32 = var <return slot>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {
- // CHECK:STDOUT: %int.make_type_32.loc6_10: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc6_14.1: %.2 = tuple_literal (%int.make_type_32.loc6_10)
- // CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_32.loc6_10 [template = i32]
- // CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_32.loc6_10, %.loc6_14.2 [template = i32]
- // CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%.3 [template = constants.%.3]
- // CHECK:STDOUT: %c.loc6_6.1: %.3 = param c
- // CHECK:STDOUT: @C.%c: %.3 = bind_name c, %c.loc6_6.1
- // CHECK:STDOUT: %int.make_type_32.loc6_25: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_32.loc6_25 [template = i32]
- // CHECK:STDOUT: %.loc6_25.2: type = converted %int.make_type_32.loc6_25, %.loc6_25.1 [template = i32]
- // CHECK:STDOUT: %.loc6_28: type = struct_type {.c: i32} [template = constants.%.4]
- // CHECK:STDOUT: @C.%return: ref %.4 = var <return slot>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {}
- // CHECK:STDOUT: %NS: <namespace> = namespace [template] {
- // CHECK:STDOUT: .E = %E.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @A();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @B(%b: i32) -> i32;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @C(%c: %.3) -> %.4;
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @D();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @E();
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- extern_api.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %A.type: type = fn_type @A [template]
- // CHECK:STDOUT: %.1: type = tuple_type () [template]
- // CHECK:STDOUT: %A: %A.type = struct_value () [template]
- // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
- // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
- // CHECK:STDOUT: %B.type: type = fn_type @B [template]
- // CHECK:STDOUT: %B: %B.type = struct_value () [template]
- // CHECK:STDOUT: %.2: type = tuple_type (type) [template]
- // CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
- // CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template]
- // CHECK:STDOUT: %C.type: type = fn_type @C [template]
- // CHECK:STDOUT: %C: %C.type = struct_value () [template]
- // CHECK:STDOUT: %D.type: type = fn_type @D [template]
- // CHECK:STDOUT: %D: %D.type = struct_value () [template]
- // CHECK:STDOUT: %E.type: type = fn_type @E [template]
- // CHECK:STDOUT: %E: %E.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Core = %Core
- // CHECK:STDOUT: .A = %A.decl
- // CHECK:STDOUT: .B = %B.decl
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .D = %D.decl
- // CHECK:STDOUT: .NS = %NS
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
- // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
- // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {
- // CHECK:STDOUT: %int.make_type_32.loc5_16: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc5_16.1: type = value_of_initializer %int.make_type_32.loc5_16 [template = i32]
- // CHECK:STDOUT: %.loc5_16.2: type = converted %int.make_type_32.loc5_16, %.loc5_16.1 [template = i32]
- // CHECK:STDOUT: %b.loc5_13.1: i32 = param b
- // CHECK:STDOUT: @B.%b: i32 = bind_name b, %b.loc5_13.1
- // CHECK:STDOUT: %int.make_type_32.loc5_24: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc5_24.1: type = value_of_initializer %int.make_type_32.loc5_24 [template = i32]
- // CHECK:STDOUT: %.loc5_24.2: type = converted %int.make_type_32.loc5_24, %.loc5_24.1 [template = i32]
- // CHECK:STDOUT: @B.%return: ref i32 = var <return slot>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {
- // CHECK:STDOUT: %int.make_type_32.loc6_17: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc6_21.1: %.2 = tuple_literal (%int.make_type_32.loc6_17)
- // CHECK:STDOUT: %.loc6_21.2: type = value_of_initializer %int.make_type_32.loc6_17 [template = i32]
- // CHECK:STDOUT: %.loc6_21.3: type = converted %int.make_type_32.loc6_17, %.loc6_21.2 [template = i32]
- // CHECK:STDOUT: %.loc6_21.4: type = converted %.loc6_21.1, constants.%.3 [template = constants.%.3]
- // CHECK:STDOUT: %c.loc6_13.1: %.3 = param c
- // CHECK:STDOUT: @C.%c: %.3 = bind_name c, %c.loc6_13.1
- // CHECK:STDOUT: %int.make_type_32.loc6_32: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc6_32.1: type = value_of_initializer %int.make_type_32.loc6_32 [template = i32]
- // CHECK:STDOUT: %.loc6_32.2: type = converted %int.make_type_32.loc6_32, %.loc6_32.1 [template = i32]
- // CHECK:STDOUT: %.loc6_35: type = struct_type {.c: i32} [template = constants.%.4]
- // CHECK:STDOUT: @C.%return: ref %.4 = var <return slot>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {}
- // CHECK:STDOUT: %NS: <namespace> = namespace [template] {
- // CHECK:STDOUT: .E = %E.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @A();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @B(%b: i32) -> i32;
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @C(%c: %.3) -> %.4;
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @D();
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @E();
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- basics.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %.1: type = tuple_type () [template]
- // CHECK:STDOUT: %A.type: type = fn_type @A [template]
- // CHECK:STDOUT: %A: %A.type = struct_value () [template]
- // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
- // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
- // CHECK:STDOUT: %B.type: type = fn_type @B [template]
- // CHECK:STDOUT: %B: %B.type = struct_value () [template]
- // CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
- // CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template]
- // CHECK:STDOUT: %.4: type = tuple_type (i32) [template]
- // CHECK:STDOUT: %C.type: type = fn_type @C [template]
- // CHECK:STDOUT: %C: %C.type = struct_value () [template]
- // CHECK:STDOUT: %tuple: %.4 = tuple_value (%.2) [template]
- // CHECK:STDOUT: %D.type: type = fn_type @D [template]
- // CHECK:STDOUT: %D: %D.type = struct_value () [template]
- // CHECK:STDOUT: %E.type: type = fn_type @E [template]
- // CHECK:STDOUT: %E: %E.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .A = %import_ref.1
- // CHECK:STDOUT: .B = %import_ref.2
- // CHECK:STDOUT: .C = %import_ref.3
- // CHECK:STDOUT: .D = %import_ref.4
- // CHECK:STDOUT: .NS = %NS
- // CHECK:STDOUT: .Core = %Core
- // CHECK:STDOUT: .a = %a
- // CHECK:STDOUT: .b = %b
- // CHECK:STDOUT: .c = %c
- // CHECK:STDOUT: .d = %d
- // CHECK:STDOUT: .e = %e
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.2: %B.type = import_ref ir1, inst+21, loaded [template = constants.%B]
- // CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir1, inst+43, loaded [template = constants.%C]
- // CHECK:STDOUT: %import_ref.4: %D.type = import_ref ir1, inst+46, loaded [template = constants.%D]
- // CHECK:STDOUT: %import_ref.5: <namespace> = import_ref ir1, inst+49, loaded
- // CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
- // CHECK:STDOUT: .E = %import_ref.6
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.6: %E.type = import_ref ir1, inst+50, loaded [template = constants.%E]
- // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
- // CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %a.var: ref %.1 = var a
- // CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var
- // CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32]
- // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32]
- // CHECK:STDOUT: %b.var: ref i32 = var b
- // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var
- // CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32]
- // CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_32.loc8, %.loc8_13.1 [template = i32]
- // CHECK:STDOUT: %.loc8_16: type = struct_type {.c: i32} [template = constants.%.3]
- // CHECK:STDOUT: %c.var: ref %.3 = var c
- // CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var
- // CHECK:STDOUT: %.loc9_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %d.var: ref %.1 = var d
- // CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var
- // CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %e.var: ref %.1 = var e
- // CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @A();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @B(%b: i32) -> i32;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @C(%c: %.4) -> %.3;
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @D();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @E();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @__global_init() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.1 [template = constants.%A]
- // CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
- // CHECK:STDOUT: assign file.%a.var, %A.call
- // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%import_ref.2 [template = constants.%B]
- // CHECK:STDOUT: %.loc7: i32 = int_literal 1 [template = constants.%.2]
- // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc7)
- // CHECK:STDOUT: assign file.%b.var, %B.call
- // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%import_ref.3 [template = constants.%C]
- // CHECK:STDOUT: %.loc8_23: i32 = int_literal 1 [template = constants.%.2]
- // CHECK:STDOUT: %.loc8_25: %.4 = tuple_literal (%.loc8_23)
- // CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc8_23) [template = constants.%tuple]
- // CHECK:STDOUT: %.loc8_21: %.4 = converted %.loc8_25, %tuple [template = constants.%tuple]
- // CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc8_21)
- // CHECK:STDOUT: assign file.%c.var, %C.call
- // CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%import_ref.4 [template = constants.%D]
- // CHECK:STDOUT: %D.call: init %.1 = call %D.ref()
- // CHECK:STDOUT: assign file.%d.var, %D.call
- // CHECK:STDOUT: %NS.ref: <namespace> = name_ref NS, file.%NS [template = file.%NS]
- // CHECK:STDOUT: %E.ref: %E.type = name_ref E, file.%import_ref.6 [template = constants.%E]
- // CHECK:STDOUT: %E.call: init %.1 = call %E.ref()
- // CHECK:STDOUT: assign file.%e.var, %E.call
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- redecl_api.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %A.type: type = fn_type @A [template]
- // CHECK:STDOUT: %.1: type = tuple_type () [template]
- // CHECK:STDOUT: %A: %A.type = struct_value () [template]
- // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
- // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
- // CHECK:STDOUT: %B.type: type = fn_type @B [template]
- // CHECK:STDOUT: %B: %B.type = struct_value () [template]
- // CHECK:STDOUT: %.2: type = tuple_type (type) [template]
- // CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
- // CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template]
- // CHECK:STDOUT: %C.type: type = fn_type @C [template]
- // CHECK:STDOUT: %C: %C.type = struct_value () [template]
- // CHECK:STDOUT: %D.type: type = fn_type @D [template]
- // CHECK:STDOUT: %D: %D.type = struct_value () [template]
- // CHECK:STDOUT: %E.type: type = fn_type @E [template]
- // CHECK:STDOUT: %E: %E.type = struct_value () [template]
- // CHECK:STDOUT: %.5: i32 = int_literal 1 [template]
- // CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5) [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .A = %A.decl
- // CHECK:STDOUT: .B = %B.decl
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .D = %D.decl
- // CHECK:STDOUT: .NS = %NS
- // CHECK:STDOUT: .Core = %Core
- // CHECK:STDOUT: .a = %a
- // CHECK:STDOUT: .b = %b.loc13
- // CHECK:STDOUT: .c = %c.loc14
- // CHECK:STDOUT: .d = %d
- // CHECK:STDOUT: .e = %e
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.2: %B.type = import_ref ir1, inst+21, loaded [template = constants.%B]
- // CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir1, inst+43, loaded [template = constants.%C]
- // CHECK:STDOUT: %import_ref.4: %D.type = import_ref ir1, inst+46, loaded [template = constants.%D]
- // CHECK:STDOUT: %import_ref.5: <namespace> = import_ref ir1, inst+49, loaded
- // CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
- // CHECK:STDOUT: .E = %E.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.6: %E.type = import_ref ir1, inst+50, loaded [template = constants.%E]
- // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
- // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
- // CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {
- // CHECK:STDOUT: %int.make_type_32.loc7_16: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_32.loc7_16 [template = i32]
- // CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_32.loc7_16, %.loc7_16.1 [template = i32]
- // CHECK:STDOUT: %b.loc7_13.1: i32 = param b
- // CHECK:STDOUT: %b.loc7_13.2: i32 = bind_name b, %b.loc7_13.1
- // CHECK:STDOUT: %int.make_type_32.loc7_24: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc7_24.1: type = value_of_initializer %int.make_type_32.loc7_24 [template = i32]
- // CHECK:STDOUT: %.loc7_24.2: type = converted %int.make_type_32.loc7_24, %.loc7_24.1 [template = i32]
- // CHECK:STDOUT: %return.var.loc7: ref i32 = var <return slot>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {
- // CHECK:STDOUT: %int.make_type_32.loc8_17: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc8_21.1: %.2 = tuple_literal (%int.make_type_32.loc8_17)
- // CHECK:STDOUT: %.loc8_21.2: type = value_of_initializer %int.make_type_32.loc8_17 [template = i32]
- // CHECK:STDOUT: %.loc8_21.3: type = converted %int.make_type_32.loc8_17, %.loc8_21.2 [template = i32]
- // CHECK:STDOUT: %.loc8_21.4: type = converted %.loc8_21.1, constants.%.3 [template = constants.%.3]
- // CHECK:STDOUT: %c.loc8_13.1: %.3 = param c
- // CHECK:STDOUT: %c.loc8_13.2: %.3 = bind_name c, %c.loc8_13.1
- // CHECK:STDOUT: %int.make_type_32.loc8_32: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc8_32.1: type = value_of_initializer %int.make_type_32.loc8_32 [template = i32]
- // CHECK:STDOUT: %.loc8_32.2: type = converted %int.make_type_32.loc8_32, %.loc8_32.1 [template = i32]
- // CHECK:STDOUT: %.loc8_35: type = struct_type {.c: i32} [template = constants.%.4]
- // CHECK:STDOUT: %return.var.loc8: ref %.4 = var <return slot>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {}
- // CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {}
- // CHECK:STDOUT: %.loc12_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %a.var: ref %.1 = var a
- // CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var
- // CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32]
- // CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_32.loc13, %.loc13_8.1 [template = i32]
- // CHECK:STDOUT: %b.var: ref i32 = var b
- // CHECK:STDOUT: %b.loc13: ref i32 = bind_name b, %b.var
- // CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32]
- // CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32.loc14, %.loc14_13.1 [template = i32]
- // CHECK:STDOUT: %.loc14_16: type = struct_type {.c: i32} [template = constants.%.4]
- // CHECK:STDOUT: %c.var: ref %.4 = var c
- // CHECK:STDOUT: %c.loc14: ref %.4 = bind_name c, %c.var
- // CHECK:STDOUT: %.loc15_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc15_9.2: type = converted %.loc15_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %d.var: ref %.1 = var d
- // CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var
- // CHECK:STDOUT: %.loc16_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc16_9.2: type = converted %.loc16_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %e.var: ref %.1 = var e
- // CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @A();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @B(%b: i32) -> i32;
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @C(%c: %.3) -> %.4;
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @D();
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @E();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @__global_init() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A]
- // CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
- // CHECK:STDOUT: assign file.%a.var, %A.call
- // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B]
- // CHECK:STDOUT: %.loc13: i32 = int_literal 1 [template = constants.%.5]
- // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc13)
- // CHECK:STDOUT: assign file.%b.var, %B.call
- // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %.loc14_23: i32 = int_literal 1 [template = constants.%.5]
- // CHECK:STDOUT: %.loc14_25: %.3 = tuple_literal (%.loc14_23)
- // CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc14_23) [template = constants.%tuple]
- // CHECK:STDOUT: %.loc14_21: %.3 = converted %.loc14_25, %tuple [template = constants.%tuple]
- // CHECK:STDOUT: %C.call: init %.4 = call %C.ref(%.loc14_21)
- // CHECK:STDOUT: assign file.%c.var, %C.call
- // CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [template = constants.%D]
- // CHECK:STDOUT: %D.call: init %.1 = call %D.ref()
- // CHECK:STDOUT: assign file.%d.var, %D.call
- // CHECK:STDOUT: %NS.ref: <namespace> = name_ref NS, file.%NS [template = file.%NS]
- // CHECK:STDOUT: %E.ref: %E.type = name_ref E, file.%E.decl [template = constants.%E]
- // CHECK:STDOUT: %E.call: init %.1 = call %E.ref()
- // CHECK:STDOUT: assign file.%e.var, %E.call
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- redecl_extern_api.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %A.type: type = fn_type @A [template]
- // CHECK:STDOUT: %.1: type = tuple_type () [template]
- // CHECK:STDOUT: %A: %A.type = struct_value () [template]
- // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
- // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
- // CHECK:STDOUT: %B.type: type = fn_type @B [template]
- // CHECK:STDOUT: %B: %B.type = struct_value () [template]
- // CHECK:STDOUT: %.2: type = tuple_type (type) [template]
- // CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
- // CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template]
- // CHECK:STDOUT: %C.type: type = fn_type @C [template]
- // CHECK:STDOUT: %C: %C.type = struct_value () [template]
- // CHECK:STDOUT: %D.type: type = fn_type @D [template]
- // CHECK:STDOUT: %D: %D.type = struct_value () [template]
- // CHECK:STDOUT: %E.type: type = fn_type @E [template]
- // CHECK:STDOUT: %E: %E.type = struct_value () [template]
- // CHECK:STDOUT: %.5: i32 = int_literal 1 [template]
- // CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5) [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .A = %A.decl
- // CHECK:STDOUT: .B = %B.decl
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .D = %D.decl
- // CHECK:STDOUT: .NS = %NS
- // CHECK:STDOUT: .Core = %Core
- // CHECK:STDOUT: .a = %a
- // CHECK:STDOUT: .b = %b.loc13
- // CHECK:STDOUT: .c = %c.loc14
- // CHECK:STDOUT: .d = %d
- // CHECK:STDOUT: .e = %e
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.2: %B.type = import_ref ir1, inst+21, loaded [template = constants.%B]
- // CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir1, inst+43, loaded [template = constants.%C]
- // CHECK:STDOUT: %import_ref.4: %D.type = import_ref ir1, inst+46, loaded [template = constants.%D]
- // CHECK:STDOUT: %import_ref.5: <namespace> = import_ref ir1, inst+49, loaded
- // CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
- // CHECK:STDOUT: .E = %E.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.6: %E.type = import_ref ir1, inst+50, loaded [template = constants.%E]
- // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
- // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
- // CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {
- // CHECK:STDOUT: %int.make_type_32.loc7_16: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_32.loc7_16 [template = i32]
- // CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_32.loc7_16, %.loc7_16.1 [template = i32]
- // CHECK:STDOUT: %b.loc7_13.1: i32 = param b
- // CHECK:STDOUT: %b.loc7_13.2: i32 = bind_name b, %b.loc7_13.1
- // CHECK:STDOUT: %int.make_type_32.loc7_24: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc7_24.1: type = value_of_initializer %int.make_type_32.loc7_24 [template = i32]
- // CHECK:STDOUT: %.loc7_24.2: type = converted %int.make_type_32.loc7_24, %.loc7_24.1 [template = i32]
- // CHECK:STDOUT: %return.var.loc7: ref i32 = var <return slot>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {
- // CHECK:STDOUT: %int.make_type_32.loc8_17: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc8_21.1: %.2 = tuple_literal (%int.make_type_32.loc8_17)
- // CHECK:STDOUT: %.loc8_21.2: type = value_of_initializer %int.make_type_32.loc8_17 [template = i32]
- // CHECK:STDOUT: %.loc8_21.3: type = converted %int.make_type_32.loc8_17, %.loc8_21.2 [template = i32]
- // CHECK:STDOUT: %.loc8_21.4: type = converted %.loc8_21.1, constants.%.3 [template = constants.%.3]
- // CHECK:STDOUT: %c.loc8_13.1: %.3 = param c
- // CHECK:STDOUT: %c.loc8_13.2: %.3 = bind_name c, %c.loc8_13.1
- // CHECK:STDOUT: %int.make_type_32.loc8_32: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc8_32.1: type = value_of_initializer %int.make_type_32.loc8_32 [template = i32]
- // CHECK:STDOUT: %.loc8_32.2: type = converted %int.make_type_32.loc8_32, %.loc8_32.1 [template = i32]
- // CHECK:STDOUT: %.loc8_35: type = struct_type {.c: i32} [template = constants.%.4]
- // CHECK:STDOUT: %return.var.loc8: ref %.4 = var <return slot>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {}
- // CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {}
- // CHECK:STDOUT: %.loc12_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %a.var: ref %.1 = var a
- // CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var
- // CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32]
- // CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_32.loc13, %.loc13_8.1 [template = i32]
- // CHECK:STDOUT: %b.var: ref i32 = var b
- // CHECK:STDOUT: %b.loc13: ref i32 = bind_name b, %b.var
- // CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32]
- // CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32.loc14, %.loc14_13.1 [template = i32]
- // CHECK:STDOUT: %.loc14_16: type = struct_type {.c: i32} [template = constants.%.4]
- // CHECK:STDOUT: %c.var: ref %.4 = var c
- // CHECK:STDOUT: %c.loc14: ref %.4 = bind_name c, %c.var
- // CHECK:STDOUT: %.loc15_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc15_9.2: type = converted %.loc15_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %d.var: ref %.1 = var d
- // CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var
- // CHECK:STDOUT: %.loc16_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc16_9.2: type = converted %.loc16_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %e.var: ref %.1 = var e
- // CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @A();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @B(%b: i32) -> i32;
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @C(%c: %.3) -> %.4;
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @D();
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @E();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @__global_init() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A]
- // CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
- // CHECK:STDOUT: assign file.%a.var, %A.call
- // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B]
- // CHECK:STDOUT: %.loc13: i32 = int_literal 1 [template = constants.%.5]
- // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc13)
- // CHECK:STDOUT: assign file.%b.var, %B.call
- // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %.loc14_23: i32 = int_literal 1 [template = constants.%.5]
- // CHECK:STDOUT: %.loc14_25: %.3 = tuple_literal (%.loc14_23)
- // CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc14_23) [template = constants.%tuple]
- // CHECK:STDOUT: %.loc14_21: %.3 = converted %.loc14_25, %tuple [template = constants.%tuple]
- // CHECK:STDOUT: %C.call: init %.4 = call %C.ref(%.loc14_21)
- // CHECK:STDOUT: assign file.%c.var, %C.call
- // CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [template = constants.%D]
- // CHECK:STDOUT: %D.call: init %.1 = call %D.ref()
- // CHECK:STDOUT: assign file.%d.var, %D.call
- // CHECK:STDOUT: %NS.ref: <namespace> = name_ref NS, file.%NS [template = file.%NS]
- // CHECK:STDOUT: %E.ref: %E.type = name_ref E, file.%E.decl [template = constants.%E]
- // CHECK:STDOUT: %E.call: init %.1 = call %E.ref()
- // CHECK:STDOUT: assign file.%e.var, %E.call
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_todo_merge.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %.1: type = tuple_type () [template]
- // CHECK:STDOUT: %A.type: type = fn_type @A [template]
- // CHECK:STDOUT: %A: %A.type = struct_value () [template]
- // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
- // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
- // CHECK:STDOUT: %B.type: type = fn_type @B [template]
- // CHECK:STDOUT: %B: %B.type = struct_value () [template]
- // CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
- // CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template]
- // CHECK:STDOUT: %.4: type = tuple_type (i32) [template]
- // CHECK:STDOUT: %C.type: type = fn_type @C [template]
- // CHECK:STDOUT: %C: %C.type = struct_value () [template]
- // CHECK:STDOUT: %tuple: %.4 = tuple_value (%.2) [template]
- // CHECK:STDOUT: %D.type: type = fn_type @D [template]
- // CHECK:STDOUT: %D: %D.type = struct_value () [template]
- // CHECK:STDOUT: %E.type: type = fn_type @E [template]
- // CHECK:STDOUT: %E: %E.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .A = %import_ref.1
- // CHECK:STDOUT: .B = %import_ref.2
- // CHECK:STDOUT: .C = %import_ref.3
- // CHECK:STDOUT: .D = %import_ref.4
- // CHECK:STDOUT: .NS = %NS
- // CHECK:STDOUT: .Core = %Core
- // CHECK:STDOUT: .a = %a
- // CHECK:STDOUT: .b = %b
- // CHECK:STDOUT: .c = %c
- // CHECK:STDOUT: .d = %d
- // CHECK:STDOUT: .e = %e
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.2: %B.type = import_ref ir1, inst+21, loaded [template = constants.%B]
- // CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir1, inst+43, loaded [template = constants.%C]
- // CHECK:STDOUT: %import_ref.4: %D.type = import_ref ir1, inst+46, loaded [template = constants.%D]
- // CHECK:STDOUT: %import_ref.5: <namespace> = import_ref ir1, inst+49, loaded
- // CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
- // CHECK:STDOUT: .E = %import_ref.6
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.6: %E.type = import_ref ir1, inst+50, loaded [template = constants.%E]
- // CHECK:STDOUT: %import_ref.7 = import_ref ir2, inst+2, unloaded
- // CHECK:STDOUT: %import_ref.8 = import_ref ir2, inst+21, unloaded
- // CHECK:STDOUT: %import_ref.9 = import_ref ir2, inst+43, unloaded
- // CHECK:STDOUT: %import_ref.10 = import_ref ir2, inst+46, unloaded
- // CHECK:STDOUT: %import_ref.11 = import_ref ir2, inst+50, unloaded
- // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
- // CHECK:STDOUT: %.loc72_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc72_9.2: type = converted %.loc72_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %a.var: ref %.1 = var a
- // CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var
- // CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir5, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %int.make_type_32.loc73: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc73_8.1: type = value_of_initializer %int.make_type_32.loc73 [template = i32]
- // CHECK:STDOUT: %.loc73_8.2: type = converted %int.make_type_32.loc73, %.loc73_8.1 [template = i32]
- // CHECK:STDOUT: %b.var: ref i32 = var b
- // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var
- // CHECK:STDOUT: %import_ref.13: %Int32.type = import_ref ir5, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %int.make_type_32.loc74: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc74_13.1: type = value_of_initializer %int.make_type_32.loc74 [template = i32]
- // CHECK:STDOUT: %.loc74_13.2: type = converted %int.make_type_32.loc74, %.loc74_13.1 [template = i32]
- // CHECK:STDOUT: %.loc74_16: type = struct_type {.c: i32} [template = constants.%.3]
- // CHECK:STDOUT: %c.var: ref %.3 = var c
- // CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var
- // CHECK:STDOUT: %.loc75_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc75_9.2: type = converted %.loc75_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %d.var: ref %.1 = var d
- // CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var
- // CHECK:STDOUT: %.loc76_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc76_9.2: type = converted %.loc76_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %e.var: ref %.1 = var e
- // CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @A();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @B(%b: i32) -> i32;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @C(%c: %.4) -> %.3;
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @D();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @E();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @__global_init() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.1 [template = constants.%A]
- // CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
- // CHECK:STDOUT: assign file.%a.var, %A.call
- // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%import_ref.2 [template = constants.%B]
- // CHECK:STDOUT: %.loc73: i32 = int_literal 1 [template = constants.%.2]
- // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc73)
- // CHECK:STDOUT: assign file.%b.var, %B.call
- // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%import_ref.3 [template = constants.%C]
- // CHECK:STDOUT: %.loc74_23: i32 = int_literal 1 [template = constants.%.2]
- // CHECK:STDOUT: %.loc74_25: %.4 = tuple_literal (%.loc74_23)
- // CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc74_23) [template = constants.%tuple]
- // CHECK:STDOUT: %.loc74_21: %.4 = converted %.loc74_25, %tuple [template = constants.%tuple]
- // CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc74_21)
- // CHECK:STDOUT: assign file.%c.var, %C.call
- // CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%import_ref.4 [template = constants.%D]
- // CHECK:STDOUT: %D.call: init %.1 = call %D.ref()
- // CHECK:STDOUT: assign file.%d.var, %D.call
- // CHECK:STDOUT: %NS.ref: <namespace> = name_ref NS, file.%NS [template = file.%NS]
- // CHECK:STDOUT: %E.ref: %E.type = name_ref E, file.%import_ref.6 [template = constants.%E]
- // CHECK:STDOUT: %E.call: init %.1 = call %E.ref()
- // CHECK:STDOUT: assign file.%e.var, %E.call
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_todo_merge_reverse.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %.1: type = tuple_type () [template]
- // CHECK:STDOUT: %A.type: type = fn_type @A [template]
- // CHECK:STDOUT: %A: %A.type = struct_value () [template]
- // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
- // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
- // CHECK:STDOUT: %B.type: type = fn_type @B [template]
- // CHECK:STDOUT: %B: %B.type = struct_value () [template]
- // CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
- // CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template]
- // CHECK:STDOUT: %.4: type = tuple_type (i32) [template]
- // CHECK:STDOUT: %C.type: type = fn_type @C [template]
- // CHECK:STDOUT: %C: %C.type = struct_value () [template]
- // CHECK:STDOUT: %tuple: %.4 = tuple_value (%.2) [template]
- // CHECK:STDOUT: %D.type: type = fn_type @D [template]
- // CHECK:STDOUT: %D: %D.type = struct_value () [template]
- // CHECK:STDOUT: %E.type: type = fn_type @E [template]
- // CHECK:STDOUT: %E: %E.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .A = %import_ref.1
- // CHECK:STDOUT: .B = %import_ref.2
- // CHECK:STDOUT: .C = %import_ref.3
- // CHECK:STDOUT: .D = %import_ref.4
- // CHECK:STDOUT: .NS = %NS
- // CHECK:STDOUT: .Core = %Core
- // CHECK:STDOUT: .a = %a
- // CHECK:STDOUT: .b = %b
- // CHECK:STDOUT: .c = %c
- // CHECK:STDOUT: .d = %d
- // CHECK:STDOUT: .e = %e
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.2: %B.type = import_ref ir1, inst+21, loaded [template = constants.%B]
- // CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir1, inst+43, loaded [template = constants.%C]
- // CHECK:STDOUT: %import_ref.4: %D.type = import_ref ir1, inst+46, loaded [template = constants.%D]
- // CHECK:STDOUT: %import_ref.5: <namespace> = import_ref ir1, inst+49, loaded
- // CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
- // CHECK:STDOUT: .E = %import_ref.6
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.6: %E.type = import_ref ir1, inst+50, loaded [template = constants.%E]
- // CHECK:STDOUT: %import_ref.7 = import_ref ir2, inst+2, unloaded
- // CHECK:STDOUT: %import_ref.8 = import_ref ir2, inst+21, unloaded
- // CHECK:STDOUT: %import_ref.9 = import_ref ir2, inst+43, unloaded
- // CHECK:STDOUT: %import_ref.10 = import_ref ir2, inst+46, unloaded
- // CHECK:STDOUT: %import_ref.11 = import_ref ir2, inst+50, unloaded
- // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
- // CHECK:STDOUT: %.loc72_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc72_9.2: type = converted %.loc72_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %a.var: ref %.1 = var a
- // CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var
- // CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir5, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %int.make_type_32.loc73: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc73_8.1: type = value_of_initializer %int.make_type_32.loc73 [template = i32]
- // CHECK:STDOUT: %.loc73_8.2: type = converted %int.make_type_32.loc73, %.loc73_8.1 [template = i32]
- // CHECK:STDOUT: %b.var: ref i32 = var b
- // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var
- // CHECK:STDOUT: %import_ref.13: %Int32.type = import_ref ir5, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %int.make_type_32.loc74: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc74_13.1: type = value_of_initializer %int.make_type_32.loc74 [template = i32]
- // CHECK:STDOUT: %.loc74_13.2: type = converted %int.make_type_32.loc74, %.loc74_13.1 [template = i32]
- // CHECK:STDOUT: %.loc74_16: type = struct_type {.c: i32} [template = constants.%.3]
- // CHECK:STDOUT: %c.var: ref %.3 = var c
- // CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var
- // CHECK:STDOUT: %.loc75_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc75_9.2: type = converted %.loc75_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %d.var: ref %.1 = var d
- // CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var
- // CHECK:STDOUT: %.loc76_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc76_9.2: type = converted %.loc76_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %e.var: ref %.1 = var e
- // CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @A();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @B(%b: i32) -> i32;
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @C(%c: %.4) -> %.3;
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @D();
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @E();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @__global_init() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.1 [template = constants.%A]
- // CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
- // CHECK:STDOUT: assign file.%a.var, %A.call
- // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%import_ref.2 [template = constants.%B]
- // CHECK:STDOUT: %.loc73: i32 = int_literal 1 [template = constants.%.2]
- // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc73)
- // CHECK:STDOUT: assign file.%b.var, %B.call
- // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%import_ref.3 [template = constants.%C]
- // CHECK:STDOUT: %.loc74_23: i32 = int_literal 1 [template = constants.%.2]
- // CHECK:STDOUT: %.loc74_25: %.4 = tuple_literal (%.loc74_23)
- // CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc74_23) [template = constants.%tuple]
- // CHECK:STDOUT: %.loc74_21: %.4 = converted %.loc74_25, %tuple [template = constants.%tuple]
- // CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc74_21)
- // CHECK:STDOUT: assign file.%c.var, %C.call
- // CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%import_ref.4 [template = constants.%D]
- // CHECK:STDOUT: %D.call: init %.1 = call %D.ref()
- // CHECK:STDOUT: assign file.%d.var, %D.call
- // CHECK:STDOUT: %NS.ref: <namespace> = name_ref NS, file.%NS [template = file.%NS]
- // CHECK:STDOUT: %E.ref: %E.type = name_ref E, file.%import_ref.6 [template = constants.%E]
- // CHECK:STDOUT: %E.call: init %.1 = call %E.ref()
- // CHECK:STDOUT: assign file.%e.var, %E.call
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- decl_after_use.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %.1: type = tuple_type () [template]
- // CHECK:STDOUT: %A.type: type = fn_type @A [template]
- // CHECK:STDOUT: %A: %A.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .A = %A.decl
- // CHECK:STDOUT: .B = %import_ref.2
- // CHECK:STDOUT: .C = %import_ref.3
- // CHECK:STDOUT: .D = %import_ref.4
- // CHECK:STDOUT: .NS = %NS
- // CHECK:STDOUT: .Core = %Core
- // CHECK:STDOUT: .a = %a
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+21, unloaded
- // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+43, unloaded
- // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+46, unloaded
- // CHECK:STDOUT: %import_ref.5: <namespace> = import_ref ir1, inst+49, loaded
- // CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
- // CHECK:STDOUT: .E = %import_ref.6
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+50, unloaded
- // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
- // CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %a.var: ref %.1 = var a
- // CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var
- // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @A();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @__global_init() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.1 [template = constants.%A]
- // CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
- // CHECK:STDOUT: assign file.%a.var, %A.call
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_redecl_mismatch_after_use.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %.1: type = tuple_type () [template]
- // CHECK:STDOUT: %A.type: type = fn_type @A [template]
- // CHECK:STDOUT: %A: %A.type = struct_value () [template]
- // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
- // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
- // CHECK:STDOUT: %.type: type = fn_type @.1 [template]
- // CHECK:STDOUT: %.2: %.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .A = %import_ref.1
- // CHECK:STDOUT: .B = %import_ref.2
- // CHECK:STDOUT: .C = %import_ref.3
- // CHECK:STDOUT: .D = %import_ref.4
- // CHECK:STDOUT: .NS = %NS
- // CHECK:STDOUT: .Core = %Core
- // CHECK:STDOUT: .a = %a
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+21, unloaded
- // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+43, unloaded
- // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+46, unloaded
- // CHECK:STDOUT: %import_ref.5: <namespace> = import_ref ir1, inst+49, loaded
- // CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
- // CHECK:STDOUT: .E = %import_ref.6
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+50, unloaded
- // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
- // CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %a.var: ref %.1 = var a
- // CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var
- // CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
- // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {
- // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
- // CHECK:STDOUT: %.loc18_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
- // CHECK:STDOUT: %.loc18_11.2: type = converted %int.make_type_32, %.loc18_11.1 [template = i32]
- // CHECK:STDOUT: @.1.%return: ref i32 = var <return slot>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @A();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @.1() -> i32;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @__global_init() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.1 [template = constants.%A]
- // CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
- // CHECK:STDOUT: assign file.%a.var, %A.call
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- todo_fail_extern_after_use.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %.1: type = tuple_type () [template]
- // CHECK:STDOUT: %A.type: type = fn_type @A [template]
- // CHECK:STDOUT: %A: %A.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .A = %A.decl
- // CHECK:STDOUT: .B = %import_ref.2
- // CHECK:STDOUT: .C = %import_ref.3
- // CHECK:STDOUT: .D = %import_ref.4
- // CHECK:STDOUT: .NS = %NS
- // CHECK:STDOUT: .Core = %Core
- // CHECK:STDOUT: .a = %a
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+21, unloaded
- // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+43, unloaded
- // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+46, unloaded
- // CHECK:STDOUT: %import_ref.5: <namespace> = import_ref ir1, inst+49, loaded
- // CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
- // CHECK:STDOUT: .E = %import_ref.6
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+50, unloaded
- // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
- // CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal ()
- // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1]
- // CHECK:STDOUT: %a.var: ref %.1 = var a
- // CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var
- // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: extern fn @A();
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @__global_init() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.1 [template = constants.%A]
- // CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
- // CHECK:STDOUT: assign file.%a.var, %A.call
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- unloaded.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .A = %import_ref.1
- // CHECK:STDOUT: .B = %import_ref.2
- // CHECK:STDOUT: .C = %import_ref.3
- // CHECK:STDOUT: .D = %import_ref.4
- // CHECK:STDOUT: .NS = %NS
- // CHECK:STDOUT: .Core = %Core
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+2, unloaded
- // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+21, unloaded
- // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+43, unloaded
- // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+46, unloaded
- // CHECK:STDOUT: %import_ref.5: <namespace> = import_ref ir1, inst+49, loaded
- // CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
- // CHECK:STDOUT: .E = %import_ref.6
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+50, unloaded
- // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- unloaded_extern.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .A = %import_ref.1
- // CHECK:STDOUT: .B = %import_ref.2
- // CHECK:STDOUT: .C = %import_ref.3
- // CHECK:STDOUT: .D = %import_ref.4
- // CHECK:STDOUT: .NS = %NS
- // CHECK:STDOUT: .Core = %Core
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+2, unloaded
- // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+21, unloaded
- // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+43, unloaded
- // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+46, unloaded
- // CHECK:STDOUT: %import_ref.5: <namespace> = import_ref ir1, inst+49, loaded
- // CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
- // CHECK:STDOUT: .E = %import_ref.6
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+50, unloaded
- // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_todo_loaded_merge.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .A = %import_ref.1
- // CHECK:STDOUT: .B = %import_ref.2
- // CHECK:STDOUT: .C = %import_ref.3
- // CHECK:STDOUT: .D = %import_ref.4
- // CHECK:STDOUT: .NS = %NS
- // CHECK:STDOUT: .Core = %Core
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+2, unloaded
- // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+21, unloaded
- // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+43, unloaded
- // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+46, unloaded
- // CHECK:STDOUT: %import_ref.5: <namespace> = import_ref ir1, inst+49, loaded
- // CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
- // CHECK:STDOUT: .E = %import_ref.6
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+50, unloaded
- // CHECK:STDOUT: %import_ref.7 = import_ref ir2, inst+2, unloaded
- // CHECK:STDOUT: %import_ref.8 = import_ref ir2, inst+21, unloaded
- // CHECK:STDOUT: %import_ref.9 = import_ref ir2, inst+43, unloaded
- // CHECK:STDOUT: %import_ref.10 = import_ref ir2, inst+46, unloaded
- // CHECK:STDOUT: %import_ref.11 = import_ref ir2, inst+50, unloaded
- // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
|