operators.carbon 176 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/full.carbon
  6. // EXTRA-ARGS: --target=x86_64-linux-gnu
  7. //
  8. // AUTOUPDATE
  9. // TIP: To test this file alone, run:
  10. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interop/cpp/function/operators.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/function/operators.carbon
  13. // ============================================================================
  14. // Unary operators
  15. // ============================================================================
  16. // --- unary_operators.h
  17. class C {};
  18. // Increment and Decrement.
  19. // TODO: Change `operand` and return value to reference when it is supported.
  20. auto operator++(C operand) -> C;
  21. auto operator--(C operand) -> C;
  22. // Arithmetic.
  23. auto operator-(C operand) -> C;
  24. // --- import_unary_operators.carbon
  25. library "[[@TEST_NAME]]";
  26. import Cpp library "unary_operators.h";
  27. fn F() {
  28. //@dump-sem-ir-begin
  29. let c: Cpp.C = Cpp.C.C();
  30. // Increment and Decrement.
  31. ++c;
  32. --c;
  33. // Arithmetic.
  34. let minus: Cpp.C = -c;
  35. //@dump-sem-ir-end
  36. }
  37. // ============================================================================
  38. // Prefix increment and decrement vs postfix increment and decrement
  39. // ============================================================================
  40. // --- prefix_inc_and_dec.h
  41. class Prefix {};
  42. auto operator++(Prefix operand) -> Prefix;
  43. auto operator--(Prefix operand) -> Prefix;
  44. // --- fail_prefix_calling_postfix.carbon
  45. library "[[@TEST_NAME]]";
  46. import Cpp library "prefix_inc_and_dec.h";
  47. fn F() {
  48. let prefix: Cpp.Prefix = Cpp.Prefix.Prefix();
  49. // CHECK:STDERR: fail_prefix_calling_postfix.carbon:[[@LINE+8]]:9: error: expected `;` after expression statement [ExpectedExprSemi]
  50. // CHECK:STDERR: prefix++;
  51. // CHECK:STDERR: ^~
  52. // CHECK:STDERR:
  53. // CHECK:STDERR: fail_prefix_calling_postfix.carbon:[[@LINE+4]]:3: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo]
  54. // CHECK:STDERR: prefix++;
  55. // CHECK:STDERR: ^~~~~~~~~
  56. // CHECK:STDERR:
  57. prefix++;
  58. // CHECK:STDERR: fail_prefix_calling_postfix.carbon:[[@LINE+4]]:9: error: expected `;` after expression statement [ExpectedExprSemi]
  59. // CHECK:STDERR: prefix--;
  60. // CHECK:STDERR: ^~
  61. // CHECK:STDERR:
  62. prefix--;
  63. }
  64. // --- postfix_inc_and_dec.h
  65. class Postfix {};
  66. auto operator++(Postfix operand, int) -> Postfix;
  67. auto operator--(Postfix operand, int) -> Postfix;
  68. // --- fail_postfix_calling_prefix.carbon
  69. library "[[@TEST_NAME]]";
  70. import Cpp library "postfix_inc_and_dec.h";
  71. fn F() {
  72. let postfix: Cpp.Postfix = Cpp.Postfix.Postfix();
  73. // TODO: Make the error more descriptive to clarify we call prefix operators of a class with suffix operators.
  74. // CHECK:STDERR: fail_postfix_calling_prefix.carbon:[[@LINE+7]]:3: error: no matching function for call to `<C++ operator>` [CppOverloadingNoViableFunctionFound]
  75. // CHECK:STDERR: ++postfix;
  76. // CHECK:STDERR: ^~~~~~~~~
  77. // CHECK:STDERR: fail_postfix_calling_prefix.carbon:[[@LINE+4]]:3: note: in call to Cpp function here [InCallToCppFunction]
  78. // CHECK:STDERR: ++postfix;
  79. // CHECK:STDERR: ^~~~~~~~~
  80. // CHECK:STDERR:
  81. ++postfix;
  82. // CHECK:STDERR: fail_postfix_calling_prefix.carbon:[[@LINE+7]]:3: error: no matching function for call to `<C++ operator>` [CppOverloadingNoViableFunctionFound]
  83. // CHECK:STDERR: --postfix;
  84. // CHECK:STDERR: ^~~~~~~~~
  85. // CHECK:STDERR: fail_postfix_calling_prefix.carbon:[[@LINE+4]]:3: note: in call to Cpp function here [InCallToCppFunction]
  86. // CHECK:STDERR: --postfix;
  87. // CHECK:STDERR: ^~~~~~~~~
  88. // CHECK:STDERR:
  89. --postfix;
  90. }
  91. // ============================================================================
  92. // Binary operators
  93. // ============================================================================
  94. // --- binary_operators.h
  95. class C {};
  96. // Arithmetic.
  97. auto operator+(C lhs, C rhs) -> C;
  98. auto operator-(C lhs, C rhs) -> C;
  99. auto operator*(C lhs, C rhs) -> C;
  100. auto operator/(C lhs, C rhs) -> C;
  101. auto operator%(C lhs, C rhs) -> C;
  102. // Bitwise.
  103. auto operator&(C lhs, C rhs) -> C;
  104. auto operator|(C lhs, C rhs) -> C;
  105. auto operator^(C lhs, C rhs) -> C;
  106. auto operator<<(C lhs, int num_bits) -> C;
  107. auto operator>>(C lhs, int num_bits) -> C;
  108. // Compound Assignment Arithmetic.
  109. // TODO: Change `lhs` and return value to reference when it is supported.
  110. auto operator+=(C lhs, C rhs) -> C;
  111. auto operator-=(C lhs, C rhs) -> C;
  112. auto operator*=(C lhs, C rhs) -> C;
  113. auto operator/=(C lhs, C rhs) -> C;
  114. auto operator%=(C lhs, C rhs) -> C;
  115. // Compound Assignment Bitwuse.
  116. // TODO: Change `lhs` and return value to reference when it is supported.
  117. auto operator&=(C lhs, C rhs) -> C;
  118. auto operator|=(C lhs, C rhs) -> C;
  119. auto operator^=(C lhs, C rhs) -> C;
  120. // TODO: Add <<= and >>= when references are supported.
  121. // Relational.
  122. auto operator==(C lhs, C rhs) -> bool;
  123. auto operator!=(C lhs, C rhs) -> bool;
  124. auto operator<(C lhs, C rhs) -> bool;
  125. auto operator>(C lhs, C rhs) -> bool;
  126. auto operator<=(C lhs, C rhs) -> bool;
  127. auto operator>=(C lhs, C rhs) -> bool;
  128. // --- import_binary_operators.carbon
  129. library "[[@TEST_NAME]]";
  130. import Cpp library "binary_operators.h";
  131. fn F() {
  132. //@dump-sem-ir-begin
  133. var c1: Cpp.C = Cpp.C.C();
  134. var c2: Cpp.C = Cpp.C.C();
  135. // Arithmetic.
  136. let addition: Cpp.C = c1 + c2;
  137. let subtraction: Cpp.C = c1 - c2;
  138. let multiplication: Cpp.C = c1 * c2;
  139. let division: Cpp.C = c1 / c2;
  140. let modulo: Cpp.C = c1 % c2;
  141. // Bitwise.
  142. let bitwise_and: Cpp.C = c1 & c2;
  143. let bitwise_or: Cpp.C = c1 | c2;
  144. let bitwise_xor: Cpp.C = c1 ^ c2;
  145. let left_shift: Cpp.C = c1 << 3;
  146. let right_shift: Cpp.C = c1 >> 5;
  147. // Compound Assignment Arithmetic.
  148. c1 += c2;
  149. c1 -= c2;
  150. c1 *= c2;
  151. c1 /= c2;
  152. c1 %= c2;
  153. // Compound Assignment Bitwise.
  154. c1 &= c2;
  155. c1 |= c2;
  156. c1 ^= c2;
  157. // Relational.
  158. let equal: bool = c1 == c2;
  159. let not_equal: bool = c1 != c2;
  160. let greater_than: bool = c1 > c2;
  161. let less_than: bool = c1 < c2;
  162. let greater_than_or_equal: bool = c1 >= c2;
  163. let less_than_or_equal: bool = c1 <= c2;
  164. //@dump-sem-ir-end
  165. }
  166. // --- multiple_calls.carbon
  167. library "[[@TEST_NAME]]";
  168. import Cpp library "binary_operators.h";
  169. fn F() {
  170. //@dump-sem-ir-begin
  171. let c1: Cpp.C = Cpp.C.C();
  172. let c2: Cpp.C = Cpp.C.C();
  173. let c3: Cpp.C = c1 + c2;
  174. let c4: Cpp.C = c1 + c3;
  175. let c5: Cpp.C = c4 + c3;
  176. //@dump-sem-ir-end
  177. }
  178. // --- fail_call_with_wrong_type.carbon
  179. library "[[@TEST_NAME]]";
  180. import Cpp library "binary_operators.h";
  181. fn F() {
  182. let c1: Cpp.C = Cpp.C.C();
  183. // CHECK:STDERR: fail_call_with_wrong_type.carbon:[[@LINE+7]]:19: error: no matching function for call to `<C++ operator>` [CppOverloadingNoViableFunctionFound]
  184. // CHECK:STDERR: let c2: Cpp.C = c1 + 5;
  185. // CHECK:STDERR: ^~~~~~
  186. // CHECK:STDERR: fail_call_with_wrong_type.carbon:[[@LINE+4]]:19: note: in call to Cpp function here [InCallToCppFunction]
  187. // CHECK:STDERR: let c2: Cpp.C = c1 + 5;
  188. // CHECK:STDERR: ^~~~~~
  189. // CHECK:STDERR:
  190. let c2: Cpp.C = c1 + 5;
  191. // CHECK:STDERR: fail_call_with_wrong_type.carbon:[[@LINE+7]]:19: error: no matching function for call to `<C++ operator>` [CppOverloadingNoViableFunctionFound]
  192. // CHECK:STDERR: let c3: Cpp.C = 6 + c1;
  193. // CHECK:STDERR: ^~~~~~
  194. // CHECK:STDERR: fail_call_with_wrong_type.carbon:[[@LINE+4]]:19: note: in call to Cpp function here [InCallToCppFunction]
  195. // CHECK:STDERR: let c3: Cpp.C = 6 + c1;
  196. // CHECK:STDERR: ^~~~~~
  197. // CHECK:STDERR:
  198. let c3: Cpp.C = 6 + c1;
  199. }
  200. // ============================================================================
  201. // One of two operands conversion
  202. // ============================================================================
  203. // --- plus_with_int_conversion.h
  204. class C {
  205. public:
  206. C(int);
  207. };
  208. auto operator+(C lhs, C rhs) -> C;
  209. // --- fail_todo_plus_with_int_conversion.carbon
  210. library "[[@TEST_NAME]]";
  211. import Cpp library "plus_with_int_conversion.h";
  212. fn F() {
  213. let c1: Cpp.C = Cpp.C.C(4);
  214. // CHECK:STDERR: fail_todo_plus_with_int_conversion.carbon:[[@LINE+8]]:24: error: cannot implicitly convert expression of type `Core.IntLiteral` to `Cpp.C` [ConversionFailure]
  215. // CHECK:STDERR: let c2: Cpp.C = c1 + 5;
  216. // CHECK:STDERR: ^
  217. // CHECK:STDERR: fail_todo_plus_with_int_conversion.carbon:[[@LINE+5]]:24: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(Cpp.C)` [MissingImplInMemberAccessNote]
  218. // CHECK:STDERR: let c2: Cpp.C = c1 + 5;
  219. // CHECK:STDERR: ^
  220. // CHECK:STDERR: fail_todo_plus_with_int_conversion.carbon: note: initializing function parameter [InCallToFunctionParam]
  221. // CHECK:STDERR:
  222. let c2: Cpp.C = c1 + 5;
  223. // CHECK:STDERR: fail_todo_plus_with_int_conversion.carbon:[[@LINE+8]]:19: error: cannot implicitly convert expression of type `Core.IntLiteral` to `Cpp.C` [ConversionFailure]
  224. // CHECK:STDERR: let c3: Cpp.C = 6 + c1;
  225. // CHECK:STDERR: ^
  226. // CHECK:STDERR: fail_todo_plus_with_int_conversion.carbon:[[@LINE+5]]:19: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(Cpp.C)` [MissingImplInMemberAccessNote]
  227. // CHECK:STDERR: let c3: Cpp.C = 6 + c1;
  228. // CHECK:STDERR: ^
  229. // CHECK:STDERR: fail_todo_plus_with_int_conversion.carbon: note: initializing function parameter [InCallToFunctionParam]
  230. // CHECK:STDERR:
  231. let c3: Cpp.C = 6 + c1;
  232. }
  233. // ============================================================================
  234. // All operands conversion
  235. // ============================================================================
  236. // --- plus_with_string_view_conversion.h
  237. namespace std {
  238. using size_t = __SIZE_TYPE__;
  239. inline namespace __1 {
  240. template<typename T> struct char_traits {};
  241. template<typename CharT, typename Traits = char_traits<CharT>>
  242. class basic_string_view {
  243. public:
  244. basic_string_view() = default;
  245. size_t size() const { return size_; }
  246. private:
  247. const CharT* data_;
  248. size_t size_;
  249. };
  250. using string_view = basic_string_view<char>;
  251. }
  252. }
  253. class C {
  254. public:
  255. C(std::string_view s);
  256. };
  257. auto operator+(C lhs, C rhs) -> C;
  258. // --- fail_todo_import_plus_with_string_view_conversion.carbon
  259. library "[[@TEST_NAME]]";
  260. import Cpp library "plus_with_string_view_conversion.h";
  261. fn F() {
  262. let s1: str = "hello";
  263. let s2: str = "world";
  264. // CHECK:STDERR: fail_todo_import_plus_with_string_view_conversion.carbon:[[@LINE+4]]:18: error: cannot access member of interface `Core.AddWith(str)` in type `str` that does not implement that interface [MissingImplInMemberAccess]
  265. // CHECK:STDERR: let c: Cpp.C = s1 + s2;
  266. // CHECK:STDERR: ^~~~~~~
  267. // CHECK:STDERR:
  268. let c: Cpp.C = s1 + s2;
  269. }
  270. // ============================================================================
  271. // Unsupported unary operators
  272. // ============================================================================
  273. // --- unsupported_unary_operators.h
  274. class C {};
  275. // Arithmetic.
  276. auto operator+(C operand) -> C;
  277. // Increment and Decrement.
  278. auto operator++(C operand, int) -> C;
  279. auto operator--(C operand, int) -> C;
  280. // Bitwise.
  281. auto operator~(C operand) -> C;
  282. // Logical.
  283. auto operator!(C operand) -> C;
  284. // Pointer and Memory.
  285. class P {
  286. public:
  287. auto foo() -> P;
  288. auto operator->() const -> P* _Nonnull;
  289. };
  290. auto operator*(P operand) -> P;
  291. auto operator&(P operand) -> P;
  292. // --- fail_todo_import_unsupported_unary_operators.carbon
  293. library "[[@TEST_NAME]]";
  294. import Cpp library "unsupported_unary_operators.h";
  295. fn F() {
  296. let c: Cpp.C = Cpp.C.C();
  297. // Arithmetic.
  298. // CHECK:STDERR: fail_todo_import_unsupported_unary_operators.carbon:[[@LINE+12]]:21: error: expected expression [ExpectedExpr]
  299. // CHECK:STDERR: let plus: Cpp.C = +c;
  300. // CHECK:STDERR: ^
  301. // CHECK:STDERR:
  302. // CHECK:STDERR: fail_todo_import_unsupported_unary_operators.carbon:[[@LINE+8]]:21: error: whitespace missing after binary operator [BinaryOperatorRequiresWhitespace]
  303. // CHECK:STDERR: let plus: Cpp.C = +c;
  304. // CHECK:STDERR: ^
  305. // CHECK:STDERR:
  306. // CHECK:STDERR: fail_todo_import_unsupported_unary_operators.carbon:[[@LINE+4]]:21: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo]
  307. // CHECK:STDERR: let plus: Cpp.C = +c;
  308. // CHECK:STDERR: ^
  309. // CHECK:STDERR:
  310. let plus: Cpp.C = +c;
  311. // Increment and Decrement.
  312. // CHECK:STDERR: fail_todo_import_unsupported_unary_operators.carbon:[[@LINE+4]]:4: error: expected `;` after expression statement [ExpectedExprSemi]
  313. // CHECK:STDERR: c++;
  314. // CHECK:STDERR: ^~
  315. // CHECK:STDERR:
  316. c++;
  317. // CHECK:STDERR: fail_todo_import_unsupported_unary_operators.carbon:[[@LINE+4]]:4: error: expected `;` after expression statement [ExpectedExprSemi]
  318. // CHECK:STDERR: c--;
  319. // CHECK:STDERR: ^~
  320. // CHECK:STDERR:
  321. c--;
  322. // Bitwise.
  323. // CHECK:STDERR: fail_todo_import_unsupported_unary_operators.carbon:[[@LINE+8]]:26: error: expected expression [ExpectedExpr]
  324. // CHECK:STDERR: let not_value: Cpp.C = ~c;
  325. // CHECK:STDERR: ^
  326. // CHECK:STDERR:
  327. // CHECK:STDERR: fail_todo_import_unsupported_unary_operators.carbon:[[@LINE+4]]:26: error: `let` declarations must end with a `;` [ExpectedDeclSemi]
  328. // CHECK:STDERR: let not_value: Cpp.C = ~c;
  329. // CHECK:STDERR: ^
  330. // CHECK:STDERR:
  331. let not_value: Cpp.C = ~c;
  332. // Logical.
  333. // CHECK:STDERR: fail_todo_import_unsupported_unary_operators.carbon:[[@LINE+4]]:35: error: `let` declarations must end with a `;` [ExpectedDeclSemi]
  334. // CHECK:STDERR: let not_result: Cpp.C = operator!(c1);
  335. // CHECK:STDERR: ^
  336. // CHECK:STDERR:
  337. let not_result: Cpp.C = operator!(c1);
  338. // Pointer and Memory.
  339. var p: Cpp.P = Cpp.P.P();
  340. // Pointer and Memory.
  341. let dereference: Cpp.P = *p;
  342. let address: Cpp.P = operator&(p);
  343. let call_result: Cpp.P = p->foo();
  344. }
  345. // ============================================================================
  346. // Unsupported binary operators
  347. // ============================================================================
  348. // --- unsupported_binary_operators.h
  349. class C {};
  350. // Bitwise.
  351. // TODO: Change `lhs` and return value to reference when it is supported.
  352. auto operator<<=(C lhs, int num_bits) -> C;
  353. auto operator>>=(C lhs, int num_bits) -> C;
  354. // Logical.
  355. auto operator&&(C lhs, C rhs) -> C;
  356. auto operator||(C lhs, C rhs) -> C;
  357. // --- fail_todo_import_unsupported_binary_operators.carbon
  358. library "[[@TEST_NAME]]";
  359. import Cpp library "unsupported_binary_operators.h";
  360. fn F() {
  361. let c1: Cpp.C = Cpp.C.C();
  362. // Bitwise.
  363. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+11]]:3: error: semantics TODO: `Unsupported operator interface `LeftShiftAssignWith`` [SemanticsTodo]
  364. // CHECK:STDERR: c1 <<= 1;
  365. // CHECK:STDERR: ^~~~~~~~
  366. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+8]]:3: note: in `Cpp` operator `LeftShiftAssignWith` lookup [InCppOperatorLookup]
  367. // CHECK:STDERR: c1 <<= 1;
  368. // CHECK:STDERR: ^~~~~~~~
  369. // CHECK:STDERR:
  370. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Core.LeftShiftAssignWith(Core.IntLiteral)` in type `Cpp.C` that does not implement that interface [MissingImplInMemberAccess]
  371. // CHECK:STDERR: c1 <<= 1;
  372. // CHECK:STDERR: ^~~~~~~~
  373. // CHECK:STDERR:
  374. c1 <<= 1;
  375. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+11]]:3: error: semantics TODO: `Unsupported operator interface `RightShiftAssignWith`` [SemanticsTodo]
  376. // CHECK:STDERR: c1 >>= 2;
  377. // CHECK:STDERR: ^~~~~~~~
  378. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+8]]:3: note: in `Cpp` operator `RightShiftAssignWith` lookup [InCppOperatorLookup]
  379. // CHECK:STDERR: c1 >>= 2;
  380. // CHECK:STDERR: ^~~~~~~~
  381. // CHECK:STDERR:
  382. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Core.RightShiftAssignWith(Core.IntLiteral)` in type `Cpp.C` that does not implement that interface [MissingImplInMemberAccess]
  383. // CHECK:STDERR: c1 >>= 2;
  384. // CHECK:STDERR: ^~~~~~~~
  385. // CHECK:STDERR:
  386. c1 >>= 2;
  387. // Logical.
  388. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+16]]:27: error: name `operator` not found [NameNotFound]
  389. // CHECK:STDERR: let and_result: Cpp.C = operator&&(c1, c2);
  390. // CHECK:STDERR: ^~~~~~~~
  391. // CHECK:STDERR:
  392. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+12]]:35: error: whitespace missing around binary operator [BinaryOperatorRequiresWhitespace]
  393. // CHECK:STDERR: let and_result: Cpp.C = operator&&(c1, c2);
  394. // CHECK:STDERR: ^
  395. // CHECK:STDERR:
  396. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+8]]:42: error: name `c2` not found [NameNotFound]
  397. // CHECK:STDERR: let and_result: Cpp.C = operator&&(c1, c2);
  398. // CHECK:STDERR: ^~
  399. // CHECK:STDERR:
  400. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+4]]:36: error: cannot take the address of non-reference expression [AddrOfNonRef]
  401. // CHECK:STDERR: let and_result: Cpp.C = operator&&(c1, c2);
  402. // CHECK:STDERR: ^
  403. // CHECK:STDERR:
  404. let and_result: Cpp.C = operator&&(c1, c2);
  405. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+20]]:26: error: name `operator` not found [NameNotFound]
  406. // CHECK:STDERR: let or_result: Cpp.C = operator||(c1, c2);
  407. // CHECK:STDERR: ^~~~~~~~
  408. // CHECK:STDERR:
  409. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+16]]:34: error: whitespace missing around binary operator [BinaryOperatorRequiresWhitespace]
  410. // CHECK:STDERR: let or_result: Cpp.C = operator||(c1, c2);
  411. // CHECK:STDERR: ^
  412. // CHECK:STDERR:
  413. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+12]]:35: error: expected expression [ExpectedExpr]
  414. // CHECK:STDERR: let or_result: Cpp.C = operator||(c1, c2);
  415. // CHECK:STDERR: ^
  416. // CHECK:STDERR:
  417. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+8]]:35: error: whitespace missing around binary operator [BinaryOperatorRequiresWhitespace]
  418. // CHECK:STDERR: let or_result: Cpp.C = operator||(c1, c2);
  419. // CHECK:STDERR: ^
  420. // CHECK:STDERR:
  421. // CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+4]]:35: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo]
  422. // CHECK:STDERR: let or_result: Cpp.C = operator||(c1, c2);
  423. // CHECK:STDERR: ^
  424. // CHECK:STDERR:
  425. let or_result: Cpp.C = operator||(c1, c2);
  426. }
  427. // ============================================================================
  428. // Operator and operands in a single namespace
  429. // ============================================================================
  430. // --- single_namespace.h
  431. namespace N {
  432. class C {};
  433. auto operator+(C lhs, C rhs) -> C;
  434. } // namespace N
  435. // --- import_single_namespace.carbon
  436. library "[[@TEST_NAME]]";
  437. import Cpp library "single_namespace.h";
  438. fn F() {
  439. //@dump-sem-ir-begin
  440. let c1: Cpp.N.C = Cpp.N.C.C();
  441. let c2: Cpp.N.C = Cpp.N.C.C();
  442. let c3: Cpp.N.C = c1 + c2;
  443. //@dump-sem-ir-end
  444. }
  445. // ============================================================================
  446. // Operator and operands in a different namespaces
  447. // ============================================================================
  448. // --- multiple_namespaces.h
  449. namespace N1 {
  450. class C1 {};
  451. } // namespace N1
  452. namespace N2 {
  453. class C2 {};
  454. auto operator+(N1::C1 lhs, C2 rhs) -> C2;
  455. auto operator-(C2 lhs, N1::C1 rhs) -> C2;
  456. } // namespace N2
  457. // --- import_multiple_namespaces.carbon
  458. library "[[@TEST_NAME]]";
  459. import Cpp library "multiple_namespaces.h";
  460. fn F() {
  461. //@dump-sem-ir-begin
  462. let c1: Cpp.N1.C1 = Cpp.N1.C1.C1();
  463. let c2: Cpp.N2.C2 = Cpp.N2.C2.C2();
  464. let c3: Cpp.N2.C2 = c1 + c2;
  465. let c4: Cpp.N2.C2 = c2 - c1;
  466. //@dump-sem-ir-end
  467. }
  468. // ============================================================================
  469. // Operands in namespace, operator in global namespace
  470. // ============================================================================
  471. // --- operands_in_namespace_operator_in_global.h
  472. namespace N {
  473. class C {};
  474. } // namespace N
  475. auto operator+(N::C lhs, N::C rhs) -> N::C;
  476. void foo() {
  477. N::C() + N::C();
  478. }
  479. // --- fail_todo_import_operands_in_namespace_operator_in_global.carbon
  480. library "[[@TEST_NAME]]";
  481. import Cpp library "operands_in_namespace_operator_in_global.h";
  482. fn F() {
  483. //@dump-sem-ir-begin
  484. let c1: Cpp.N.C = Cpp.N.C.C();
  485. let c2: Cpp.N.C = Cpp.N.C.C();
  486. // CHECK:STDERR: fail_todo_import_operands_in_namespace_operator_in_global.carbon:[[@LINE+7]]:21: error: no matching function for call to `<C++ operator>` [CppOverloadingNoViableFunctionFound]
  487. // CHECK:STDERR: let c3: Cpp.N.C = c1 + c2;
  488. // CHECK:STDERR: ^~~~~~~
  489. // CHECK:STDERR: fail_todo_import_operands_in_namespace_operator_in_global.carbon:[[@LINE+4]]:21: note: in call to Cpp function here [InCallToCppFunction]
  490. // CHECK:STDERR: let c3: Cpp.N.C = c1 + c2;
  491. // CHECK:STDERR: ^~~~~~~
  492. // CHECK:STDERR:
  493. let c3: Cpp.N.C = c1 + c2;
  494. //@dump-sem-ir-end
  495. }
  496. // ============================================================================
  497. // Operand is an inner class
  498. // ============================================================================
  499. // --- inner_class.h
  500. class O {
  501. public:
  502. class C {};
  503. };
  504. auto operator+(O::C lhs, O::C rhs) -> O::C;
  505. // --- import_inner_class.carbon
  506. library "[[@TEST_NAME]]";
  507. import Cpp library "inner_class.h";
  508. fn F() {
  509. //@dump-sem-ir-begin
  510. let c1: Cpp.O.C = Cpp.O.C.C();
  511. let c2: Cpp.O.C = Cpp.O.C.C();
  512. let c3: Cpp.O.C = c1 + c2;
  513. //@dump-sem-ir-end
  514. }
  515. // ============================================================================
  516. // Operand is an inner class in a namespace
  517. // ============================================================================
  518. // --- inner_class_in_namespace.h
  519. namespace N {
  520. class O {
  521. public:
  522. class C {};
  523. };
  524. auto operator+(O::C lhs, O::C rhs) -> O::C;
  525. } // namespace N
  526. // --- import_inner_class_in_namespace.carbon
  527. library "[[@TEST_NAME]]";
  528. import Cpp library "inner_class_in_namespace.h";
  529. fn F() {
  530. //@dump-sem-ir-begin
  531. let c1: Cpp.N.O.C = Cpp.N.O.C.C();
  532. let c2: Cpp.N.O.C = Cpp.N.O.C.C();
  533. let c3: Cpp.N.O.C = c1 + c2;
  534. //@dump-sem-ir-end
  535. }
  536. // ============================================================================
  537. // Member operator
  538. // ============================================================================
  539. // --- member_add_with.h
  540. class C {
  541. public:
  542. auto operator+(C rhs) -> C;
  543. };
  544. // --- fail_todo_import_member_add_with.carbon
  545. library "[[@TEST_NAME]]";
  546. import Cpp library "member_add_with.h";
  547. fn F() {
  548. //@dump-sem-ir-begin
  549. let c1: Cpp.C = Cpp.C.C();
  550. let c2: Cpp.C = Cpp.C.C();
  551. // CHECK:STDERR: fail_todo_import_member_add_with.carbon:[[@LINE+7]]:19: error: no matching function for call to `<C++ operator>` [CppOverloadingNoViableFunctionFound]
  552. // CHECK:STDERR: let c3: Cpp.C = c1 + c2;
  553. // CHECK:STDERR: ^~~~~~~
  554. // CHECK:STDERR: fail_todo_import_member_add_with.carbon:[[@LINE+4]]:19: note: in call to Cpp function here [InCallToCppFunction]
  555. // CHECK:STDERR: let c3: Cpp.C = c1 + c2;
  556. // CHECK:STDERR: ^~~~~~~
  557. // CHECK:STDERR:
  558. let c3: Cpp.C = c1 + c2;
  559. //@dump-sem-ir-end
  560. }
  561. // ============================================================================
  562. // Satisfying constraints
  563. // ============================================================================
  564. // --- fail_todo_constraints.carbon
  565. library "[[@TEST_NAME]]";
  566. import Cpp inline '''
  567. class X {};
  568. X operator+(X, X);
  569. ''';
  570. // TODO: Use Core.Add() when it is available.
  571. // TODO: `Sum()` should be declared this way when generics implementation is ready for that:
  572. // fn Sum[T:! Core.AddWith(.Self) where .Result = .Self](a: T, b: T) -> T
  573. fn Sum[U:! type, T:! Core.AddWith(U) where .Result = U](a: T, b: U) -> U {
  574. return a + b;
  575. }
  576. fn Call(x: Cpp.X) -> Cpp.X {
  577. // CHECK:STDERR: fail_todo_constraints.carbon:[[@LINE+7]]:10: error: cannot convert type `Cpp.X` into type implementing `Core.AddWith(Cpp.X) where .(Core.AddWith(Cpp.X).Core.Result) = Cpp.X` [ConversionFailureTypeToFacet]
  578. // CHECK:STDERR: return Sum(x, x);
  579. // CHECK:STDERR: ^~~~~~~~~
  580. // CHECK:STDERR: fail_todo_constraints.carbon:[[@LINE-7]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
  581. // CHECK:STDERR: fn Sum[U:! type, T:! Core.AddWith(U) where .Result = U](a: T, b: U) -> U {
  582. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  583. // CHECK:STDERR:
  584. return Sum(x, x);
  585. }
  586. // ============================================================================
  587. // Operator not found
  588. // ============================================================================
  589. // --- not_found.h
  590. class C {};
  591. // --- fail_import_not_found.carbon
  592. library "[[@TEST_NAME]]";
  593. import Cpp library "not_found.h";
  594. fn F() {
  595. let c1: Cpp.C = Cpp.C.C();
  596. let c2: Cpp.C = Cpp.C.C();
  597. // CHECK:STDERR: fail_import_not_found.carbon:[[@LINE+7]]:19: error: no matching function for call to `<C++ operator>` [CppOverloadingNoViableFunctionFound]
  598. // CHECK:STDERR: let c3: Cpp.C = c1 + c2;
  599. // CHECK:STDERR: ^~~~~~~
  600. // CHECK:STDERR: fail_import_not_found.carbon:[[@LINE+4]]:19: note: in call to Cpp function here [InCallToCppFunction]
  601. // CHECK:STDERR: let c3: Cpp.C = c1 + c2;
  602. // CHECK:STDERR: ^~~~~~~
  603. // CHECK:STDERR:
  604. let c3: Cpp.C = c1 + c2;
  605. }
  606. // ============================================================================
  607. // Incomplete operand
  608. // ============================================================================
  609. // --- incomplete.h
  610. class Incomplete;
  611. class Complete {};
  612. auto operator+(Complete lhs, Incomplete rhs) -> Complete;
  613. auto foo(Complete complete) -> void;
  614. // --- fail_import_incomplete.carbon
  615. library "[[@TEST_NAME]]";
  616. import Cpp library "incomplete.h";
  617. fn F() {
  618. var c1: Cpp.Complete = Cpp.Complete.Complete();
  619. // CHECK:STDERR: fail_import_incomplete.carbon:[[@LINE+8]]:40: error: invalid use of incomplete type `Cpp.Incomplete` [IncompleteTypeInConversion]
  620. // CHECK:STDERR: let c3: Cpp.Complete = Cpp.foo(c1 + ({} as Cpp.Incomplete));
  621. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
  622. // CHECK:STDERR: fail_import_incomplete.carbon:[[@LINE-7]]:10: in file included here [InCppInclude]
  623. // CHECK:STDERR: ./incomplete.h:2:7: note: class was forward declared here [ClassForwardDeclaredHere]
  624. // CHECK:STDERR: class Incomplete;
  625. // CHECK:STDERR: ^
  626. // CHECK:STDERR:
  627. let c3: Cpp.Complete = Cpp.foo(c1 + ({} as Cpp.Incomplete));
  628. }
  629. // ============================================================================
  630. // Operator overloading
  631. // ============================================================================
  632. // --- overloading.h
  633. class C {};
  634. auto operator+(C lhs, C rhs) -> C;
  635. class D {};
  636. auto operator+(D lhs, D rhs) -> D;
  637. // --- import_overloading.carbon
  638. library "[[@TEST_NAME]]";
  639. import Cpp library "overloading.h";
  640. fn F() {
  641. let c1: Cpp.C = Cpp.C.C();
  642. let c2: Cpp.C = Cpp.C.C();
  643. let c3: Cpp.C = c1 + c2;
  644. }
  645. // CHECK:STDOUT: --- import_unary_operators.carbon
  646. // CHECK:STDOUT:
  647. // CHECK:STDOUT: constants {
  648. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  649. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  650. // CHECK:STDOUT: %pattern_type.217: type = pattern_type %C [concrete]
  651. // CHECK:STDOUT: %.d40: type = cpp_overload_set_type @operator++__carbon_thunk [concrete]
  652. // CHECK:STDOUT: %empty_struct.e73: %.d40 = struct_value () [concrete]
  653. // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete]
  654. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  655. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  656. // CHECK:STDOUT: %operator++__carbon_thunk.type: type = fn_type @operator++__carbon_thunk [concrete]
  657. // CHECK:STDOUT: %operator++__carbon_thunk: %operator++__carbon_thunk.type = struct_value () [concrete]
  658. // CHECK:STDOUT: %operator--__carbon_thunk.type: type = fn_type @operator--__carbon_thunk [concrete]
  659. // CHECK:STDOUT: %operator--__carbon_thunk: %operator--__carbon_thunk.type = struct_value () [concrete]
  660. // CHECK:STDOUT: %operator-__carbon_thunk.type: type = fn_type @operator-__carbon_thunk [concrete]
  661. // CHECK:STDOUT: %operator-__carbon_thunk: %operator-__carbon_thunk.type = struct_value () [concrete]
  662. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  663. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  664. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  665. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete]
  666. // CHECK:STDOUT: }
  667. // CHECK:STDOUT:
  668. // CHECK:STDOUT: imports {
  669. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  670. // CHECK:STDOUT: .C = %C.decl
  671. // CHECK:STDOUT: import Cpp//...
  672. // CHECK:STDOUT: }
  673. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  674. // CHECK:STDOUT: %.40b: %.d40 = cpp_overload_set_value @operator++__carbon_thunk [concrete = constants.%empty_struct.e73]
  675. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  676. // CHECK:STDOUT: <elided>
  677. // CHECK:STDOUT: } {
  678. // CHECK:STDOUT: <elided>
  679. // CHECK:STDOUT: }
  680. // CHECK:STDOUT: %operator++__carbon_thunk.decl: %operator++__carbon_thunk.type = fn_decl @operator++__carbon_thunk [concrete = constants.%operator++__carbon_thunk] {
  681. // CHECK:STDOUT: <elided>
  682. // CHECK:STDOUT: } {
  683. // CHECK:STDOUT: <elided>
  684. // CHECK:STDOUT: }
  685. // CHECK:STDOUT: %operator--__carbon_thunk.decl: %operator--__carbon_thunk.type = fn_decl @operator--__carbon_thunk [concrete = constants.%operator--__carbon_thunk] {
  686. // CHECK:STDOUT: <elided>
  687. // CHECK:STDOUT: } {
  688. // CHECK:STDOUT: <elided>
  689. // CHECK:STDOUT: }
  690. // CHECK:STDOUT: %operator-__carbon_thunk.decl: %operator-__carbon_thunk.type = fn_decl @operator-__carbon_thunk [concrete = constants.%operator-__carbon_thunk] {
  691. // CHECK:STDOUT: <elided>
  692. // CHECK:STDOUT: } {
  693. // CHECK:STDOUT: <elided>
  694. // CHECK:STDOUT: }
  695. // CHECK:STDOUT: }
  696. // CHECK:STDOUT:
  697. // CHECK:STDOUT: fn @F() {
  698. // CHECK:STDOUT: !entry:
  699. // CHECK:STDOUT: name_binding_decl {
  700. // CHECK:STDOUT: %c.patt: %pattern_type.217 = binding_pattern c [concrete]
  701. // CHECK:STDOUT: }
  702. // CHECK:STDOUT: %Cpp.ref.loc8_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  703. // CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  704. // CHECK:STDOUT: %C.ref.loc8_23: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct.e73]
  705. // CHECK:STDOUT: %.loc8_26.1: ref %C = temporary_storage
  706. // CHECK:STDOUT: %addr.loc8_26.1: %ptr.d9e = addr_of %.loc8_26.1
  707. // CHECK:STDOUT: %C__carbon_thunk.call: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc8_26.1)
  708. // CHECK:STDOUT: %.loc8_26.2: init %C = in_place_init %C__carbon_thunk.call, %.loc8_26.1
  709. // CHECK:STDOUT: %.loc8_13: type = splice_block %C.ref.loc8_13 [concrete = constants.%C] {
  710. // CHECK:STDOUT: %Cpp.ref.loc8_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  711. // CHECK:STDOUT: %C.ref.loc8_13: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  712. // CHECK:STDOUT: }
  713. // CHECK:STDOUT: %.loc8_26.3: ref %C = temporary %.loc8_26.1, %.loc8_26.2
  714. // CHECK:STDOUT: %.loc8_26.4: %C = bind_value %.loc8_26.3
  715. // CHECK:STDOUT: %c: %C = bind_name c, %.loc8_26.4
  716. // CHECK:STDOUT: %c.ref.loc11: %C = name_ref c, %c
  717. // CHECK:STDOUT: %.loc11_3.1: ref %C = temporary_storage
  718. // CHECK:STDOUT: %.loc11_5: ref %C = value_as_ref %c.ref.loc11
  719. // CHECK:STDOUT: %addr.loc11_3.1: %ptr.d9e = addr_of %.loc11_5
  720. // CHECK:STDOUT: %addr.loc11_3.2: %ptr.d9e = addr_of %.loc11_3.1
  721. // CHECK:STDOUT: %operator++__carbon_thunk.call: init %empty_tuple.type = call imports.%operator++__carbon_thunk.decl(%addr.loc11_3.1, %addr.loc11_3.2)
  722. // CHECK:STDOUT: %.loc11_3.2: init %C = in_place_init %operator++__carbon_thunk.call, %.loc11_3.1
  723. // CHECK:STDOUT: %.loc11_3.3: ref %C = temporary %.loc11_3.1, %.loc11_3.2
  724. // CHECK:STDOUT: %c.ref.loc12: %C = name_ref c, %c
  725. // CHECK:STDOUT: %.loc12_3.1: ref %C = temporary_storage
  726. // CHECK:STDOUT: %.loc12_5: ref %C = value_as_ref %c.ref.loc12
  727. // CHECK:STDOUT: %addr.loc12_3.1: %ptr.d9e = addr_of %.loc12_5
  728. // CHECK:STDOUT: %addr.loc12_3.2: %ptr.d9e = addr_of %.loc12_3.1
  729. // CHECK:STDOUT: %operator--__carbon_thunk.call: init %empty_tuple.type = call imports.%operator--__carbon_thunk.decl(%addr.loc12_3.1, %addr.loc12_3.2)
  730. // CHECK:STDOUT: %.loc12_3.2: init %C = in_place_init %operator--__carbon_thunk.call, %.loc12_3.1
  731. // CHECK:STDOUT: %.loc12_3.3: ref %C = temporary %.loc12_3.1, %.loc12_3.2
  732. // CHECK:STDOUT: name_binding_decl {
  733. // CHECK:STDOUT: %minus.patt: %pattern_type.217 = binding_pattern minus [concrete]
  734. // CHECK:STDOUT: }
  735. // CHECK:STDOUT: %c.ref.loc15: %C = name_ref c, %c
  736. // CHECK:STDOUT: %.loc15_22.1: ref %C = temporary_storage
  737. // CHECK:STDOUT: %.loc15_23: ref %C = value_as_ref %c.ref.loc15
  738. // CHECK:STDOUT: %addr.loc15_22.1: %ptr.d9e = addr_of %.loc15_23
  739. // CHECK:STDOUT: %addr.loc15_22.2: %ptr.d9e = addr_of %.loc15_22.1
  740. // CHECK:STDOUT: %operator-__carbon_thunk.call: init %empty_tuple.type = call imports.%operator-__carbon_thunk.decl(%addr.loc15_22.1, %addr.loc15_22.2)
  741. // CHECK:STDOUT: %.loc15_22.2: init %C = in_place_init %operator-__carbon_thunk.call, %.loc15_22.1
  742. // CHECK:STDOUT: %.loc15_17: type = splice_block %C.ref.loc15 [concrete = constants.%C] {
  743. // CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  744. // CHECK:STDOUT: %C.ref.loc15: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  745. // CHECK:STDOUT: }
  746. // CHECK:STDOUT: %.loc15_22.3: ref %C = temporary %.loc15_22.1, %.loc15_22.2
  747. // CHECK:STDOUT: %.loc15_22.4: %C = bind_value %.loc15_22.3
  748. // CHECK:STDOUT: %minus: %C = bind_name minus, %.loc15_22.4
  749. // CHECK:STDOUT: %facet_value.loc15: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  750. // CHECK:STDOUT: %.loc15_22.5: %type_where = converted constants.%C, %facet_value.loc15 [concrete = constants.%facet_value]
  751. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc15: <bound method> = bound_method %.loc15_22.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  752. // CHECK:STDOUT: <elided>
  753. // CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %.loc15_22.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1
  754. // CHECK:STDOUT: %addr.loc15_22.3: %ptr.d9e = addr_of %.loc15_22.3
  755. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc15: init %empty_tuple.type = call %bound_method.loc15(%addr.loc15_22.3)
  756. // CHECK:STDOUT: %facet_value.loc12: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  757. // CHECK:STDOUT: %.loc12_3.4: %type_where = converted constants.%C, %facet_value.loc12 [concrete = constants.%facet_value]
  758. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc12: <bound method> = bound_method %.loc12_3.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  759. // CHECK:STDOUT: <elided>
  760. // CHECK:STDOUT: %bound_method.loc12: <bound method> = bound_method %.loc12_3.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2
  761. // CHECK:STDOUT: %addr.loc12_3.3: %ptr.d9e = addr_of %.loc12_3.3
  762. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc12: init %empty_tuple.type = call %bound_method.loc12(%addr.loc12_3.3)
  763. // CHECK:STDOUT: %facet_value.loc11: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  764. // CHECK:STDOUT: %.loc11_3.4: %type_where = converted constants.%C, %facet_value.loc11 [concrete = constants.%facet_value]
  765. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc11: <bound method> = bound_method %.loc11_3.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  766. // CHECK:STDOUT: <elided>
  767. // CHECK:STDOUT: %bound_method.loc11: <bound method> = bound_method %.loc11_3.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3
  768. // CHECK:STDOUT: %addr.loc11_3.3: %ptr.d9e = addr_of %.loc11_3.3
  769. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc11: init %empty_tuple.type = call %bound_method.loc11(%addr.loc11_3.3)
  770. // CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  771. // CHECK:STDOUT: %.loc8_26.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value]
  772. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: <bound method> = bound_method %.loc8_26.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  773. // CHECK:STDOUT: <elided>
  774. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %.loc8_26.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.4
  775. // CHECK:STDOUT: %addr.loc8_26.2: %ptr.d9e = addr_of %.loc8_26.3
  776. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_26.2)
  777. // CHECK:STDOUT: <elided>
  778. // CHECK:STDOUT: }
  779. // CHECK:STDOUT:
  780. // CHECK:STDOUT: --- import_binary_operators.carbon
  781. // CHECK:STDOUT:
  782. // CHECK:STDOUT: constants {
  783. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  784. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  785. // CHECK:STDOUT: %pattern_type.217: type = pattern_type %C [concrete]
  786. // CHECK:STDOUT: %.d40: type = cpp_overload_set_type @Copy.Op [concrete]
  787. // CHECK:STDOUT: %empty_struct.e73: %.d40 = struct_value () [concrete]
  788. // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete]
  789. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  790. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  791. // CHECK:STDOUT: %operator+__carbon_thunk.type: type = fn_type @operator+__carbon_thunk [concrete]
  792. // CHECK:STDOUT: %operator+__carbon_thunk: %operator+__carbon_thunk.type = struct_value () [concrete]
  793. // CHECK:STDOUT: %operator-__carbon_thunk.type: type = fn_type @operator-__carbon_thunk [concrete]
  794. // CHECK:STDOUT: %operator-__carbon_thunk: %operator-__carbon_thunk.type = struct_value () [concrete]
  795. // CHECK:STDOUT: %operator*__carbon_thunk.type: type = fn_type @operator*__carbon_thunk [concrete]
  796. // CHECK:STDOUT: %operator*__carbon_thunk: %operator*__carbon_thunk.type = struct_value () [concrete]
  797. // CHECK:STDOUT: %operator/__carbon_thunk.type: type = fn_type @operator/__carbon_thunk [concrete]
  798. // CHECK:STDOUT: %operator/__carbon_thunk: %operator/__carbon_thunk.type = struct_value () [concrete]
  799. // CHECK:STDOUT: %operator%__carbon_thunk.type: type = fn_type @operator%__carbon_thunk [concrete]
  800. // CHECK:STDOUT: %operator%__carbon_thunk: %operator%__carbon_thunk.type = struct_value () [concrete]
  801. // CHECK:STDOUT: %operator&__carbon_thunk.type: type = fn_type @operator&__carbon_thunk [concrete]
  802. // CHECK:STDOUT: %operator&__carbon_thunk: %operator&__carbon_thunk.type = struct_value () [concrete]
  803. // CHECK:STDOUT: %operator|__carbon_thunk.type: type = fn_type @operator|__carbon_thunk [concrete]
  804. // CHECK:STDOUT: %operator|__carbon_thunk: %operator|__carbon_thunk.type = struct_value () [concrete]
  805. // CHECK:STDOUT: %operator^__carbon_thunk.type: type = fn_type @operator^__carbon_thunk [concrete]
  806. // CHECK:STDOUT: %operator^__carbon_thunk: %operator^__carbon_thunk.type = struct_value () [concrete]
  807. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
  808. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  809. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  810. // CHECK:STDOUT: %operator<<__carbon_thunk.type: type = fn_type @operator<<__carbon_thunk [concrete]
  811. // CHECK:STDOUT: %operator<<__carbon_thunk: %operator<<__carbon_thunk.type = struct_value () [concrete]
  812. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  813. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  814. // CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  815. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
  816. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340 = struct_value () [symbolic]
  817. // CHECK:STDOUT: %ImplicitAs.impl_witness.204: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.9e9, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  818. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  819. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584 = struct_value () [concrete]
  820. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.204) [concrete]
  821. // CHECK:STDOUT: %.1df: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  822. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.595: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  823. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  824. // CHECK:STDOUT: %bound_method.f36: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  825. // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete]
  826. // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete]
  827. // CHECK:STDOUT: %operator>>__carbon_thunk.type: type = fn_type @operator>>__carbon_thunk [concrete]
  828. // CHECK:STDOUT: %operator>>__carbon_thunk: %operator>>__carbon_thunk.type = struct_value () [concrete]
  829. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.23d: <bound method> = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  830. // CHECK:STDOUT: %bound_method.724: <bound method> = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  831. // CHECK:STDOUT: %int_5.0f6: %i32 = int_value 5 [concrete]
  832. // CHECK:STDOUT: %operator+=__carbon_thunk.type: type = fn_type @operator+=__carbon_thunk [concrete]
  833. // CHECK:STDOUT: %operator+=__carbon_thunk: %operator+=__carbon_thunk.type = struct_value () [concrete]
  834. // CHECK:STDOUT: %operator-=__carbon_thunk.type: type = fn_type @operator-=__carbon_thunk [concrete]
  835. // CHECK:STDOUT: %operator-=__carbon_thunk: %operator-=__carbon_thunk.type = struct_value () [concrete]
  836. // CHECK:STDOUT: %operator*=__carbon_thunk.type: type = fn_type @operator*=__carbon_thunk [concrete]
  837. // CHECK:STDOUT: %operator*=__carbon_thunk: %operator*=__carbon_thunk.type = struct_value () [concrete]
  838. // CHECK:STDOUT: %operator/=__carbon_thunk.type: type = fn_type @operator/=__carbon_thunk [concrete]
  839. // CHECK:STDOUT: %operator/=__carbon_thunk: %operator/=__carbon_thunk.type = struct_value () [concrete]
  840. // CHECK:STDOUT: %operator%=__carbon_thunk.type: type = fn_type @operator%=__carbon_thunk [concrete]
  841. // CHECK:STDOUT: %operator%=__carbon_thunk: %operator%=__carbon_thunk.type = struct_value () [concrete]
  842. // CHECK:STDOUT: %operator&=__carbon_thunk.type: type = fn_type @operator&=__carbon_thunk [concrete]
  843. // CHECK:STDOUT: %operator&=__carbon_thunk: %operator&=__carbon_thunk.type = struct_value () [concrete]
  844. // CHECK:STDOUT: %operator|=__carbon_thunk.type: type = fn_type @operator|=__carbon_thunk [concrete]
  845. // CHECK:STDOUT: %operator|=__carbon_thunk: %operator|=__carbon_thunk.type = struct_value () [concrete]
  846. // CHECK:STDOUT: %operator^=__carbon_thunk.type: type = fn_type @operator^=__carbon_thunk [concrete]
  847. // CHECK:STDOUT: %operator^=__carbon_thunk: %operator^=__carbon_thunk.type = struct_value () [concrete]
  848. // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
  849. // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete]
  850. // CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete]
  851. // CHECK:STDOUT: %ptr.bb2: type = ptr_type bool [concrete]
  852. // CHECK:STDOUT: %operator==__carbon_thunk.type: type = fn_type @operator==__carbon_thunk [concrete]
  853. // CHECK:STDOUT: %operator==__carbon_thunk: %operator==__carbon_thunk.type = struct_value () [concrete]
  854. // CHECK:STDOUT: %operator!=__carbon_thunk.type: type = fn_type @operator!=__carbon_thunk [concrete]
  855. // CHECK:STDOUT: %operator!=__carbon_thunk: %operator!=__carbon_thunk.type = struct_value () [concrete]
  856. // CHECK:STDOUT: %operator>__carbon_thunk.type: type = fn_type @operator>__carbon_thunk [concrete]
  857. // CHECK:STDOUT: %operator>__carbon_thunk: %operator>__carbon_thunk.type = struct_value () [concrete]
  858. // CHECK:STDOUT: %operator<__carbon_thunk.type: type = fn_type @operator<__carbon_thunk [concrete]
  859. // CHECK:STDOUT: %operator<__carbon_thunk: %operator<__carbon_thunk.type = struct_value () [concrete]
  860. // CHECK:STDOUT: %operator>=__carbon_thunk.type: type = fn_type @operator>=__carbon_thunk [concrete]
  861. // CHECK:STDOUT: %operator>=__carbon_thunk: %operator>=__carbon_thunk.type = struct_value () [concrete]
  862. // CHECK:STDOUT: %operator<=__carbon_thunk.type: type = fn_type @operator<=__carbon_thunk [concrete]
  863. // CHECK:STDOUT: %operator<=__carbon_thunk: %operator<=__carbon_thunk.type = struct_value () [concrete]
  864. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  865. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  866. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  867. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete]
  868. // CHECK:STDOUT: }
  869. // CHECK:STDOUT:
  870. // CHECK:STDOUT: imports {
  871. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  872. // CHECK:STDOUT: .C = %C.decl
  873. // CHECK:STDOUT: import Cpp//...
  874. // CHECK:STDOUT: }
  875. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  876. // CHECK:STDOUT: %.40b: %.d40 = cpp_overload_set_value @Copy.Op [concrete = constants.%empty_struct.e73]
  877. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  878. // CHECK:STDOUT: <elided>
  879. // CHECK:STDOUT: } {
  880. // CHECK:STDOUT: <elided>
  881. // CHECK:STDOUT: }
  882. // CHECK:STDOUT: %operator+__carbon_thunk.decl: %operator+__carbon_thunk.type = fn_decl @operator+__carbon_thunk [concrete = constants.%operator+__carbon_thunk] {
  883. // CHECK:STDOUT: <elided>
  884. // CHECK:STDOUT: } {
  885. // CHECK:STDOUT: <elided>
  886. // CHECK:STDOUT: }
  887. // CHECK:STDOUT: %operator-__carbon_thunk.decl: %operator-__carbon_thunk.type = fn_decl @operator-__carbon_thunk [concrete = constants.%operator-__carbon_thunk] {
  888. // CHECK:STDOUT: <elided>
  889. // CHECK:STDOUT: } {
  890. // CHECK:STDOUT: <elided>
  891. // CHECK:STDOUT: }
  892. // CHECK:STDOUT: %operator*__carbon_thunk.decl: %operator*__carbon_thunk.type = fn_decl @operator*__carbon_thunk [concrete = constants.%operator*__carbon_thunk] {
  893. // CHECK:STDOUT: <elided>
  894. // CHECK:STDOUT: } {
  895. // CHECK:STDOUT: <elided>
  896. // CHECK:STDOUT: }
  897. // CHECK:STDOUT: %operator/__carbon_thunk.decl: %operator/__carbon_thunk.type = fn_decl @operator/__carbon_thunk [concrete = constants.%operator/__carbon_thunk] {
  898. // CHECK:STDOUT: <elided>
  899. // CHECK:STDOUT: } {
  900. // CHECK:STDOUT: <elided>
  901. // CHECK:STDOUT: }
  902. // CHECK:STDOUT: %operator%__carbon_thunk.decl: %operator%__carbon_thunk.type = fn_decl @operator%__carbon_thunk [concrete = constants.%operator%__carbon_thunk] {
  903. // CHECK:STDOUT: <elided>
  904. // CHECK:STDOUT: } {
  905. // CHECK:STDOUT: <elided>
  906. // CHECK:STDOUT: }
  907. // CHECK:STDOUT: %operator&__carbon_thunk.decl: %operator&__carbon_thunk.type = fn_decl @operator&__carbon_thunk [concrete = constants.%operator&__carbon_thunk] {
  908. // CHECK:STDOUT: <elided>
  909. // CHECK:STDOUT: } {
  910. // CHECK:STDOUT: <elided>
  911. // CHECK:STDOUT: }
  912. // CHECK:STDOUT: %operator|__carbon_thunk.decl: %operator|__carbon_thunk.type = fn_decl @operator|__carbon_thunk [concrete = constants.%operator|__carbon_thunk] {
  913. // CHECK:STDOUT: <elided>
  914. // CHECK:STDOUT: } {
  915. // CHECK:STDOUT: <elided>
  916. // CHECK:STDOUT: }
  917. // CHECK:STDOUT: %operator^__carbon_thunk.decl: %operator^__carbon_thunk.type = fn_decl @operator^__carbon_thunk [concrete = constants.%operator^__carbon_thunk] {
  918. // CHECK:STDOUT: <elided>
  919. // CHECK:STDOUT: } {
  920. // CHECK:STDOUT: <elided>
  921. // CHECK:STDOUT: }
  922. // CHECK:STDOUT: %operator<<__carbon_thunk.decl: %operator<<__carbon_thunk.type = fn_decl @operator<<__carbon_thunk [concrete = constants.%operator<<__carbon_thunk] {
  923. // CHECK:STDOUT: <elided>
  924. // CHECK:STDOUT: } {
  925. // CHECK:STDOUT: <elided>
  926. // CHECK:STDOUT: }
  927. // CHECK:STDOUT: %Core.import_ref.ee7: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340) = import_ref Core//prelude/types/int, loc27_39, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0)]
  928. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.9e9 = impl_witness_table (%Core.import_ref.ee7), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  929. // CHECK:STDOUT: %operator>>__carbon_thunk.decl: %operator>>__carbon_thunk.type = fn_decl @operator>>__carbon_thunk [concrete = constants.%operator>>__carbon_thunk] {
  930. // CHECK:STDOUT: <elided>
  931. // CHECK:STDOUT: } {
  932. // CHECK:STDOUT: <elided>
  933. // CHECK:STDOUT: }
  934. // CHECK:STDOUT: %operator+=__carbon_thunk.decl: %operator+=__carbon_thunk.type = fn_decl @operator+=__carbon_thunk [concrete = constants.%operator+=__carbon_thunk] {
  935. // CHECK:STDOUT: <elided>
  936. // CHECK:STDOUT: } {
  937. // CHECK:STDOUT: <elided>
  938. // CHECK:STDOUT: }
  939. // CHECK:STDOUT: %operator-=__carbon_thunk.decl: %operator-=__carbon_thunk.type = fn_decl @operator-=__carbon_thunk [concrete = constants.%operator-=__carbon_thunk] {
  940. // CHECK:STDOUT: <elided>
  941. // CHECK:STDOUT: } {
  942. // CHECK:STDOUT: <elided>
  943. // CHECK:STDOUT: }
  944. // CHECK:STDOUT: %operator*=__carbon_thunk.decl: %operator*=__carbon_thunk.type = fn_decl @operator*=__carbon_thunk [concrete = constants.%operator*=__carbon_thunk] {
  945. // CHECK:STDOUT: <elided>
  946. // CHECK:STDOUT: } {
  947. // CHECK:STDOUT: <elided>
  948. // CHECK:STDOUT: }
  949. // CHECK:STDOUT: %operator/=__carbon_thunk.decl: %operator/=__carbon_thunk.type = fn_decl @operator/=__carbon_thunk [concrete = constants.%operator/=__carbon_thunk] {
  950. // CHECK:STDOUT: <elided>
  951. // CHECK:STDOUT: } {
  952. // CHECK:STDOUT: <elided>
  953. // CHECK:STDOUT: }
  954. // CHECK:STDOUT: %operator%=__carbon_thunk.decl: %operator%=__carbon_thunk.type = fn_decl @operator%=__carbon_thunk [concrete = constants.%operator%=__carbon_thunk] {
  955. // CHECK:STDOUT: <elided>
  956. // CHECK:STDOUT: } {
  957. // CHECK:STDOUT: <elided>
  958. // CHECK:STDOUT: }
  959. // CHECK:STDOUT: %operator&=__carbon_thunk.decl: %operator&=__carbon_thunk.type = fn_decl @operator&=__carbon_thunk [concrete = constants.%operator&=__carbon_thunk] {
  960. // CHECK:STDOUT: <elided>
  961. // CHECK:STDOUT: } {
  962. // CHECK:STDOUT: <elided>
  963. // CHECK:STDOUT: }
  964. // CHECK:STDOUT: %operator|=__carbon_thunk.decl: %operator|=__carbon_thunk.type = fn_decl @operator|=__carbon_thunk [concrete = constants.%operator|=__carbon_thunk] {
  965. // CHECK:STDOUT: <elided>
  966. // CHECK:STDOUT: } {
  967. // CHECK:STDOUT: <elided>
  968. // CHECK:STDOUT: }
  969. // CHECK:STDOUT: %operator^=__carbon_thunk.decl: %operator^=__carbon_thunk.type = fn_decl @operator^=__carbon_thunk [concrete = constants.%operator^=__carbon_thunk] {
  970. // CHECK:STDOUT: <elided>
  971. // CHECK:STDOUT: } {
  972. // CHECK:STDOUT: <elided>
  973. // CHECK:STDOUT: }
  974. // CHECK:STDOUT: %operator==__carbon_thunk.decl: %operator==__carbon_thunk.type = fn_decl @operator==__carbon_thunk [concrete = constants.%operator==__carbon_thunk] {
  975. // CHECK:STDOUT: <elided>
  976. // CHECK:STDOUT: } {
  977. // CHECK:STDOUT: <elided>
  978. // CHECK:STDOUT: }
  979. // CHECK:STDOUT: %operator!=__carbon_thunk.decl: %operator!=__carbon_thunk.type = fn_decl @operator!=__carbon_thunk [concrete = constants.%operator!=__carbon_thunk] {
  980. // CHECK:STDOUT: <elided>
  981. // CHECK:STDOUT: } {
  982. // CHECK:STDOUT: <elided>
  983. // CHECK:STDOUT: }
  984. // CHECK:STDOUT: %operator>__carbon_thunk.decl: %operator>__carbon_thunk.type = fn_decl @operator>__carbon_thunk [concrete = constants.%operator>__carbon_thunk] {
  985. // CHECK:STDOUT: <elided>
  986. // CHECK:STDOUT: } {
  987. // CHECK:STDOUT: <elided>
  988. // CHECK:STDOUT: }
  989. // CHECK:STDOUT: %operator<__carbon_thunk.decl: %operator<__carbon_thunk.type = fn_decl @operator<__carbon_thunk [concrete = constants.%operator<__carbon_thunk] {
  990. // CHECK:STDOUT: <elided>
  991. // CHECK:STDOUT: } {
  992. // CHECK:STDOUT: <elided>
  993. // CHECK:STDOUT: }
  994. // CHECK:STDOUT: %operator>=__carbon_thunk.decl: %operator>=__carbon_thunk.type = fn_decl @operator>=__carbon_thunk [concrete = constants.%operator>=__carbon_thunk] {
  995. // CHECK:STDOUT: <elided>
  996. // CHECK:STDOUT: } {
  997. // CHECK:STDOUT: <elided>
  998. // CHECK:STDOUT: }
  999. // CHECK:STDOUT: %operator<=__carbon_thunk.decl: %operator<=__carbon_thunk.type = fn_decl @operator<=__carbon_thunk [concrete = constants.%operator<=__carbon_thunk] {
  1000. // CHECK:STDOUT: <elided>
  1001. // CHECK:STDOUT: } {
  1002. // CHECK:STDOUT: <elided>
  1003. // CHECK:STDOUT: }
  1004. // CHECK:STDOUT: }
  1005. // CHECK:STDOUT:
  1006. // CHECK:STDOUT: fn @F() {
  1007. // CHECK:STDOUT: !entry:
  1008. // CHECK:STDOUT: name_binding_decl {
  1009. // CHECK:STDOUT: %c1.patt: %pattern_type.217 = binding_pattern c1 [concrete]
  1010. // CHECK:STDOUT: %c1.var_patt: %pattern_type.217 = var_pattern %c1.patt [concrete]
  1011. // CHECK:STDOUT: }
  1012. // CHECK:STDOUT: %c1.var: ref %C = var %c1.var_patt
  1013. // CHECK:STDOUT: %Cpp.ref.loc8_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1014. // CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1015. // CHECK:STDOUT: %C.ref.loc8_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct.e73]
  1016. // CHECK:STDOUT: %.loc8_3.1: ref %C = splice_block %c1.var {}
  1017. // CHECK:STDOUT: %addr.loc8_27: %ptr.d9e = addr_of %.loc8_3.1
  1018. // CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc8_27)
  1019. // CHECK:STDOUT: %.loc8_27: init %C = in_place_init %C__carbon_thunk.call.loc8, %.loc8_3.1
  1020. // CHECK:STDOUT: assign %c1.var, %.loc8_27
  1021. // CHECK:STDOUT: %.loc8_14: type = splice_block %C.ref.loc8_14 [concrete = constants.%C] {
  1022. // CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1023. // CHECK:STDOUT: %C.ref.loc8_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1024. // CHECK:STDOUT: }
  1025. // CHECK:STDOUT: %c1: ref %C = bind_name c1, %c1.var
  1026. // CHECK:STDOUT: name_binding_decl {
  1027. // CHECK:STDOUT: %c2.patt: %pattern_type.217 = binding_pattern c2 [concrete]
  1028. // CHECK:STDOUT: %c2.var_patt: %pattern_type.217 = var_pattern %c2.patt [concrete]
  1029. // CHECK:STDOUT: }
  1030. // CHECK:STDOUT: %c2.var: ref %C = var %c2.var_patt
  1031. // CHECK:STDOUT: %Cpp.ref.loc9_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1032. // CHECK:STDOUT: %C.ref.loc9_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1033. // CHECK:STDOUT: %C.ref.loc9_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct.e73]
  1034. // CHECK:STDOUT: %.loc9_3.1: ref %C = splice_block %c2.var {}
  1035. // CHECK:STDOUT: %addr.loc9_27: %ptr.d9e = addr_of %.loc9_3.1
  1036. // CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc9_27)
  1037. // CHECK:STDOUT: %.loc9_27: init %C = in_place_init %C__carbon_thunk.call.loc9, %.loc9_3.1
  1038. // CHECK:STDOUT: assign %c2.var, %.loc9_27
  1039. // CHECK:STDOUT: %.loc9_14: type = splice_block %C.ref.loc9_14 [concrete = constants.%C] {
  1040. // CHECK:STDOUT: %Cpp.ref.loc9_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1041. // CHECK:STDOUT: %C.ref.loc9_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1042. // CHECK:STDOUT: }
  1043. // CHECK:STDOUT: %c2: ref %C = bind_name c2, %c2.var
  1044. // CHECK:STDOUT: name_binding_decl {
  1045. // CHECK:STDOUT: %addition.patt: %pattern_type.217 = binding_pattern addition [concrete]
  1046. // CHECK:STDOUT: }
  1047. // CHECK:STDOUT: %c1.ref.loc12: ref %C = name_ref c1, %c1
  1048. // CHECK:STDOUT: %c2.ref.loc12: ref %C = name_ref c2, %c2
  1049. // CHECK:STDOUT: %.loc12_28.1: ref %C = temporary_storage
  1050. // CHECK:STDOUT: %.loc12_25.1: %C = bind_value %c1.ref.loc12
  1051. // CHECK:STDOUT: %.loc12_30.1: %C = bind_value %c2.ref.loc12
  1052. // CHECK:STDOUT: %.loc12_25.2: ref %C = value_as_ref %.loc12_25.1
  1053. // CHECK:STDOUT: %addr.loc12_28.1: %ptr.d9e = addr_of %.loc12_25.2
  1054. // CHECK:STDOUT: %.loc12_30.2: ref %C = value_as_ref %.loc12_30.1
  1055. // CHECK:STDOUT: %addr.loc12_28.2: %ptr.d9e = addr_of %.loc12_30.2
  1056. // CHECK:STDOUT: %addr.loc12_28.3: %ptr.d9e = addr_of %.loc12_28.1
  1057. // CHECK:STDOUT: %operator+__carbon_thunk.call: init %empty_tuple.type = call imports.%operator+__carbon_thunk.decl(%addr.loc12_28.1, %addr.loc12_28.2, %addr.loc12_28.3)
  1058. // CHECK:STDOUT: %.loc12_28.2: init %C = in_place_init %operator+__carbon_thunk.call, %.loc12_28.1
  1059. // CHECK:STDOUT: %.loc12_20: type = splice_block %C.ref.loc12 [concrete = constants.%C] {
  1060. // CHECK:STDOUT: %Cpp.ref.loc12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1061. // CHECK:STDOUT: %C.ref.loc12: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1062. // CHECK:STDOUT: }
  1063. // CHECK:STDOUT: %.loc12_28.3: ref %C = temporary %.loc12_28.1, %.loc12_28.2
  1064. // CHECK:STDOUT: %.loc12_28.4: %C = bind_value %.loc12_28.3
  1065. // CHECK:STDOUT: %addition: %C = bind_name addition, %.loc12_28.4
  1066. // CHECK:STDOUT: name_binding_decl {
  1067. // CHECK:STDOUT: %subtraction.patt: %pattern_type.217 = binding_pattern subtraction [concrete]
  1068. // CHECK:STDOUT: }
  1069. // CHECK:STDOUT: %c1.ref.loc13: ref %C = name_ref c1, %c1
  1070. // CHECK:STDOUT: %c2.ref.loc13: ref %C = name_ref c2, %c2
  1071. // CHECK:STDOUT: %.loc13_31.1: ref %C = temporary_storage
  1072. // CHECK:STDOUT: %.loc13_28.1: %C = bind_value %c1.ref.loc13
  1073. // CHECK:STDOUT: %.loc13_33.1: %C = bind_value %c2.ref.loc13
  1074. // CHECK:STDOUT: %.loc13_28.2: ref %C = value_as_ref %.loc13_28.1
  1075. // CHECK:STDOUT: %addr.loc13_31.1: %ptr.d9e = addr_of %.loc13_28.2
  1076. // CHECK:STDOUT: %.loc13_33.2: ref %C = value_as_ref %.loc13_33.1
  1077. // CHECK:STDOUT: %addr.loc13_31.2: %ptr.d9e = addr_of %.loc13_33.2
  1078. // CHECK:STDOUT: %addr.loc13_31.3: %ptr.d9e = addr_of %.loc13_31.1
  1079. // CHECK:STDOUT: %operator-__carbon_thunk.call: init %empty_tuple.type = call imports.%operator-__carbon_thunk.decl(%addr.loc13_31.1, %addr.loc13_31.2, %addr.loc13_31.3)
  1080. // CHECK:STDOUT: %.loc13_31.2: init %C = in_place_init %operator-__carbon_thunk.call, %.loc13_31.1
  1081. // CHECK:STDOUT: %.loc13_23: type = splice_block %C.ref.loc13 [concrete = constants.%C] {
  1082. // CHECK:STDOUT: %Cpp.ref.loc13: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1083. // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1084. // CHECK:STDOUT: }
  1085. // CHECK:STDOUT: %.loc13_31.3: ref %C = temporary %.loc13_31.1, %.loc13_31.2
  1086. // CHECK:STDOUT: %.loc13_31.4: %C = bind_value %.loc13_31.3
  1087. // CHECK:STDOUT: %subtraction: %C = bind_name subtraction, %.loc13_31.4
  1088. // CHECK:STDOUT: name_binding_decl {
  1089. // CHECK:STDOUT: %multiplication.patt: %pattern_type.217 = binding_pattern multiplication [concrete]
  1090. // CHECK:STDOUT: }
  1091. // CHECK:STDOUT: %c1.ref.loc14: ref %C = name_ref c1, %c1
  1092. // CHECK:STDOUT: %c2.ref.loc14: ref %C = name_ref c2, %c2
  1093. // CHECK:STDOUT: %.loc14_34.1: ref %C = temporary_storage
  1094. // CHECK:STDOUT: %.loc14_31.1: %C = bind_value %c1.ref.loc14
  1095. // CHECK:STDOUT: %.loc14_36.1: %C = bind_value %c2.ref.loc14
  1096. // CHECK:STDOUT: %.loc14_31.2: ref %C = value_as_ref %.loc14_31.1
  1097. // CHECK:STDOUT: %addr.loc14_34.1: %ptr.d9e = addr_of %.loc14_31.2
  1098. // CHECK:STDOUT: %.loc14_36.2: ref %C = value_as_ref %.loc14_36.1
  1099. // CHECK:STDOUT: %addr.loc14_34.2: %ptr.d9e = addr_of %.loc14_36.2
  1100. // CHECK:STDOUT: %addr.loc14_34.3: %ptr.d9e = addr_of %.loc14_34.1
  1101. // CHECK:STDOUT: %operator*__carbon_thunk.call: init %empty_tuple.type = call imports.%operator*__carbon_thunk.decl(%addr.loc14_34.1, %addr.loc14_34.2, %addr.loc14_34.3)
  1102. // CHECK:STDOUT: %.loc14_34.2: init %C = in_place_init %operator*__carbon_thunk.call, %.loc14_34.1
  1103. // CHECK:STDOUT: %.loc14_26: type = splice_block %C.ref.loc14 [concrete = constants.%C] {
  1104. // CHECK:STDOUT: %Cpp.ref.loc14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1105. // CHECK:STDOUT: %C.ref.loc14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1106. // CHECK:STDOUT: }
  1107. // CHECK:STDOUT: %.loc14_34.3: ref %C = temporary %.loc14_34.1, %.loc14_34.2
  1108. // CHECK:STDOUT: %.loc14_34.4: %C = bind_value %.loc14_34.3
  1109. // CHECK:STDOUT: %multiplication: %C = bind_name multiplication, %.loc14_34.4
  1110. // CHECK:STDOUT: name_binding_decl {
  1111. // CHECK:STDOUT: %division.patt: %pattern_type.217 = binding_pattern division [concrete]
  1112. // CHECK:STDOUT: }
  1113. // CHECK:STDOUT: %c1.ref.loc15: ref %C = name_ref c1, %c1
  1114. // CHECK:STDOUT: %c2.ref.loc15: ref %C = name_ref c2, %c2
  1115. // CHECK:STDOUT: %.loc15_28.1: ref %C = temporary_storage
  1116. // CHECK:STDOUT: %.loc15_25.1: %C = bind_value %c1.ref.loc15
  1117. // CHECK:STDOUT: %.loc15_30.1: %C = bind_value %c2.ref.loc15
  1118. // CHECK:STDOUT: %.loc15_25.2: ref %C = value_as_ref %.loc15_25.1
  1119. // CHECK:STDOUT: %addr.loc15_28.1: %ptr.d9e = addr_of %.loc15_25.2
  1120. // CHECK:STDOUT: %.loc15_30.2: ref %C = value_as_ref %.loc15_30.1
  1121. // CHECK:STDOUT: %addr.loc15_28.2: %ptr.d9e = addr_of %.loc15_30.2
  1122. // CHECK:STDOUT: %addr.loc15_28.3: %ptr.d9e = addr_of %.loc15_28.1
  1123. // CHECK:STDOUT: %operator/__carbon_thunk.call: init %empty_tuple.type = call imports.%operator/__carbon_thunk.decl(%addr.loc15_28.1, %addr.loc15_28.2, %addr.loc15_28.3)
  1124. // CHECK:STDOUT: %.loc15_28.2: init %C = in_place_init %operator/__carbon_thunk.call, %.loc15_28.1
  1125. // CHECK:STDOUT: %.loc15_20: type = splice_block %C.ref.loc15 [concrete = constants.%C] {
  1126. // CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1127. // CHECK:STDOUT: %C.ref.loc15: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1128. // CHECK:STDOUT: }
  1129. // CHECK:STDOUT: %.loc15_28.3: ref %C = temporary %.loc15_28.1, %.loc15_28.2
  1130. // CHECK:STDOUT: %.loc15_28.4: %C = bind_value %.loc15_28.3
  1131. // CHECK:STDOUT: %division: %C = bind_name division, %.loc15_28.4
  1132. // CHECK:STDOUT: name_binding_decl {
  1133. // CHECK:STDOUT: %modulo.patt: %pattern_type.217 = binding_pattern modulo [concrete]
  1134. // CHECK:STDOUT: }
  1135. // CHECK:STDOUT: %c1.ref.loc16: ref %C = name_ref c1, %c1
  1136. // CHECK:STDOUT: %c2.ref.loc16: ref %C = name_ref c2, %c2
  1137. // CHECK:STDOUT: %.loc16_26.1: ref %C = temporary_storage
  1138. // CHECK:STDOUT: %.loc16_23.1: %C = bind_value %c1.ref.loc16
  1139. // CHECK:STDOUT: %.loc16_28.1: %C = bind_value %c2.ref.loc16
  1140. // CHECK:STDOUT: %.loc16_23.2: ref %C = value_as_ref %.loc16_23.1
  1141. // CHECK:STDOUT: %addr.loc16_26.1: %ptr.d9e = addr_of %.loc16_23.2
  1142. // CHECK:STDOUT: %.loc16_28.2: ref %C = value_as_ref %.loc16_28.1
  1143. // CHECK:STDOUT: %addr.loc16_26.2: %ptr.d9e = addr_of %.loc16_28.2
  1144. // CHECK:STDOUT: %addr.loc16_26.3: %ptr.d9e = addr_of %.loc16_26.1
  1145. // CHECK:STDOUT: %operator%__carbon_thunk.call: init %empty_tuple.type = call imports.%operator%__carbon_thunk.decl(%addr.loc16_26.1, %addr.loc16_26.2, %addr.loc16_26.3)
  1146. // CHECK:STDOUT: %.loc16_26.2: init %C = in_place_init %operator%__carbon_thunk.call, %.loc16_26.1
  1147. // CHECK:STDOUT: %.loc16_18: type = splice_block %C.ref.loc16 [concrete = constants.%C] {
  1148. // CHECK:STDOUT: %Cpp.ref.loc16: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1149. // CHECK:STDOUT: %C.ref.loc16: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1150. // CHECK:STDOUT: }
  1151. // CHECK:STDOUT: %.loc16_26.3: ref %C = temporary %.loc16_26.1, %.loc16_26.2
  1152. // CHECK:STDOUT: %.loc16_26.4: %C = bind_value %.loc16_26.3
  1153. // CHECK:STDOUT: %modulo: %C = bind_name modulo, %.loc16_26.4
  1154. // CHECK:STDOUT: name_binding_decl {
  1155. // CHECK:STDOUT: %bitwise_and.patt: %pattern_type.217 = binding_pattern bitwise_and [concrete]
  1156. // CHECK:STDOUT: }
  1157. // CHECK:STDOUT: %c1.ref.loc19: ref %C = name_ref c1, %c1
  1158. // CHECK:STDOUT: %c2.ref.loc19: ref %C = name_ref c2, %c2
  1159. // CHECK:STDOUT: %.loc19_31.1: ref %C = temporary_storage
  1160. // CHECK:STDOUT: %.loc19_28.1: %C = bind_value %c1.ref.loc19
  1161. // CHECK:STDOUT: %.loc19_33.1: %C = bind_value %c2.ref.loc19
  1162. // CHECK:STDOUT: %.loc19_28.2: ref %C = value_as_ref %.loc19_28.1
  1163. // CHECK:STDOUT: %addr.loc19_31.1: %ptr.d9e = addr_of %.loc19_28.2
  1164. // CHECK:STDOUT: %.loc19_33.2: ref %C = value_as_ref %.loc19_33.1
  1165. // CHECK:STDOUT: %addr.loc19_31.2: %ptr.d9e = addr_of %.loc19_33.2
  1166. // CHECK:STDOUT: %addr.loc19_31.3: %ptr.d9e = addr_of %.loc19_31.1
  1167. // CHECK:STDOUT: %operator&__carbon_thunk.call: init %empty_tuple.type = call imports.%operator&__carbon_thunk.decl(%addr.loc19_31.1, %addr.loc19_31.2, %addr.loc19_31.3)
  1168. // CHECK:STDOUT: %.loc19_31.2: init %C = in_place_init %operator&__carbon_thunk.call, %.loc19_31.1
  1169. // CHECK:STDOUT: %.loc19_23: type = splice_block %C.ref.loc19 [concrete = constants.%C] {
  1170. // CHECK:STDOUT: %Cpp.ref.loc19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1171. // CHECK:STDOUT: %C.ref.loc19: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1172. // CHECK:STDOUT: }
  1173. // CHECK:STDOUT: %.loc19_31.3: ref %C = temporary %.loc19_31.1, %.loc19_31.2
  1174. // CHECK:STDOUT: %.loc19_31.4: %C = bind_value %.loc19_31.3
  1175. // CHECK:STDOUT: %bitwise_and: %C = bind_name bitwise_and, %.loc19_31.4
  1176. // CHECK:STDOUT: name_binding_decl {
  1177. // CHECK:STDOUT: %bitwise_or.patt: %pattern_type.217 = binding_pattern bitwise_or [concrete]
  1178. // CHECK:STDOUT: }
  1179. // CHECK:STDOUT: %c1.ref.loc20: ref %C = name_ref c1, %c1
  1180. // CHECK:STDOUT: %c2.ref.loc20: ref %C = name_ref c2, %c2
  1181. // CHECK:STDOUT: %.loc20_30.1: ref %C = temporary_storage
  1182. // CHECK:STDOUT: %.loc20_27.1: %C = bind_value %c1.ref.loc20
  1183. // CHECK:STDOUT: %.loc20_32.1: %C = bind_value %c2.ref.loc20
  1184. // CHECK:STDOUT: %.loc20_27.2: ref %C = value_as_ref %.loc20_27.1
  1185. // CHECK:STDOUT: %addr.loc20_30.1: %ptr.d9e = addr_of %.loc20_27.2
  1186. // CHECK:STDOUT: %.loc20_32.2: ref %C = value_as_ref %.loc20_32.1
  1187. // CHECK:STDOUT: %addr.loc20_30.2: %ptr.d9e = addr_of %.loc20_32.2
  1188. // CHECK:STDOUT: %addr.loc20_30.3: %ptr.d9e = addr_of %.loc20_30.1
  1189. // CHECK:STDOUT: %operator|__carbon_thunk.call: init %empty_tuple.type = call imports.%operator|__carbon_thunk.decl(%addr.loc20_30.1, %addr.loc20_30.2, %addr.loc20_30.3)
  1190. // CHECK:STDOUT: %.loc20_30.2: init %C = in_place_init %operator|__carbon_thunk.call, %.loc20_30.1
  1191. // CHECK:STDOUT: %.loc20_22: type = splice_block %C.ref.loc20 [concrete = constants.%C] {
  1192. // CHECK:STDOUT: %Cpp.ref.loc20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1193. // CHECK:STDOUT: %C.ref.loc20: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1194. // CHECK:STDOUT: }
  1195. // CHECK:STDOUT: %.loc20_30.3: ref %C = temporary %.loc20_30.1, %.loc20_30.2
  1196. // CHECK:STDOUT: %.loc20_30.4: %C = bind_value %.loc20_30.3
  1197. // CHECK:STDOUT: %bitwise_or: %C = bind_name bitwise_or, %.loc20_30.4
  1198. // CHECK:STDOUT: name_binding_decl {
  1199. // CHECK:STDOUT: %bitwise_xor.patt: %pattern_type.217 = binding_pattern bitwise_xor [concrete]
  1200. // CHECK:STDOUT: }
  1201. // CHECK:STDOUT: %c1.ref.loc21: ref %C = name_ref c1, %c1
  1202. // CHECK:STDOUT: %c2.ref.loc21: ref %C = name_ref c2, %c2
  1203. // CHECK:STDOUT: %.loc21_31.1: ref %C = temporary_storage
  1204. // CHECK:STDOUT: %.loc21_28.1: %C = bind_value %c1.ref.loc21
  1205. // CHECK:STDOUT: %.loc21_33.1: %C = bind_value %c2.ref.loc21
  1206. // CHECK:STDOUT: %.loc21_28.2: ref %C = value_as_ref %.loc21_28.1
  1207. // CHECK:STDOUT: %addr.loc21_31.1: %ptr.d9e = addr_of %.loc21_28.2
  1208. // CHECK:STDOUT: %.loc21_33.2: ref %C = value_as_ref %.loc21_33.1
  1209. // CHECK:STDOUT: %addr.loc21_31.2: %ptr.d9e = addr_of %.loc21_33.2
  1210. // CHECK:STDOUT: %addr.loc21_31.3: %ptr.d9e = addr_of %.loc21_31.1
  1211. // CHECK:STDOUT: %operator^__carbon_thunk.call: init %empty_tuple.type = call imports.%operator^__carbon_thunk.decl(%addr.loc21_31.1, %addr.loc21_31.2, %addr.loc21_31.3)
  1212. // CHECK:STDOUT: %.loc21_31.2: init %C = in_place_init %operator^__carbon_thunk.call, %.loc21_31.1
  1213. // CHECK:STDOUT: %.loc21_23: type = splice_block %C.ref.loc21 [concrete = constants.%C] {
  1214. // CHECK:STDOUT: %Cpp.ref.loc21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1215. // CHECK:STDOUT: %C.ref.loc21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1216. // CHECK:STDOUT: }
  1217. // CHECK:STDOUT: %.loc21_31.3: ref %C = temporary %.loc21_31.1, %.loc21_31.2
  1218. // CHECK:STDOUT: %.loc21_31.4: %C = bind_value %.loc21_31.3
  1219. // CHECK:STDOUT: %bitwise_xor: %C = bind_name bitwise_xor, %.loc21_31.4
  1220. // CHECK:STDOUT: name_binding_decl {
  1221. // CHECK:STDOUT: %left_shift.patt: %pattern_type.217 = binding_pattern left_shift [concrete]
  1222. // CHECK:STDOUT: }
  1223. // CHECK:STDOUT: %c1.ref.loc22: ref %C = name_ref c1, %c1
  1224. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  1225. // CHECK:STDOUT: %.loc22_30.1: ref %C = temporary_storage
  1226. // CHECK:STDOUT: %.loc22_27.1: %C = bind_value %c1.ref.loc22
  1227. // CHECK:STDOUT: %impl.elem0.loc22: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  1228. // CHECK:STDOUT: %bound_method.loc22_33.1: <bound method> = bound_method %int_3, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.595]
  1229. // CHECK:STDOUT: %specific_fn.loc22: <specific function> = specific_function %impl.elem0.loc22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  1230. // CHECK:STDOUT: %bound_method.loc22_33.2: <bound method> = bound_method %int_3, %specific_fn.loc22 [concrete = constants.%bound_method.f36]
  1231. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22: init %i32 = call %bound_method.loc22_33.2(%int_3) [concrete = constants.%int_3.822]
  1232. // CHECK:STDOUT: %.loc22_33.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22 [concrete = constants.%int_3.822]
  1233. // CHECK:STDOUT: %.loc22_33.2: %i32 = converted %int_3, %.loc22_33.1 [concrete = constants.%int_3.822]
  1234. // CHECK:STDOUT: %.loc22_27.2: ref %C = value_as_ref %.loc22_27.1
  1235. // CHECK:STDOUT: %addr.loc22_30.1: %ptr.d9e = addr_of %.loc22_27.2
  1236. // CHECK:STDOUT: %addr.loc22_30.2: %ptr.d9e = addr_of %.loc22_30.1
  1237. // CHECK:STDOUT: %operator<<__carbon_thunk.call: init %empty_tuple.type = call imports.%operator<<__carbon_thunk.decl(%addr.loc22_30.1, %.loc22_33.2, %addr.loc22_30.2)
  1238. // CHECK:STDOUT: %.loc22_30.2: init %C = in_place_init %operator<<__carbon_thunk.call, %.loc22_30.1
  1239. // CHECK:STDOUT: %.loc22_22: type = splice_block %C.ref.loc22 [concrete = constants.%C] {
  1240. // CHECK:STDOUT: %Cpp.ref.loc22: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1241. // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1242. // CHECK:STDOUT: }
  1243. // CHECK:STDOUT: %.loc22_30.3: ref %C = temporary %.loc22_30.1, %.loc22_30.2
  1244. // CHECK:STDOUT: %.loc22_30.4: %C = bind_value %.loc22_30.3
  1245. // CHECK:STDOUT: %left_shift: %C = bind_name left_shift, %.loc22_30.4
  1246. // CHECK:STDOUT: name_binding_decl {
  1247. // CHECK:STDOUT: %right_shift.patt: %pattern_type.217 = binding_pattern right_shift [concrete]
  1248. // CHECK:STDOUT: }
  1249. // CHECK:STDOUT: %c1.ref.loc23: ref %C = name_ref c1, %c1
  1250. // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b]
  1251. // CHECK:STDOUT: %.loc23_31.1: ref %C = temporary_storage
  1252. // CHECK:STDOUT: %.loc23_28.1: %C = bind_value %c1.ref.loc23
  1253. // CHECK:STDOUT: %impl.elem0.loc23: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  1254. // CHECK:STDOUT: %bound_method.loc23_34.1: <bound method> = bound_method %int_5, %impl.elem0.loc23 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.23d]
  1255. // CHECK:STDOUT: %specific_fn.loc23: <specific function> = specific_function %impl.elem0.loc23, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  1256. // CHECK:STDOUT: %bound_method.loc23_34.2: <bound method> = bound_method %int_5, %specific_fn.loc23 [concrete = constants.%bound_method.724]
  1257. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc23: init %i32 = call %bound_method.loc23_34.2(%int_5) [concrete = constants.%int_5.0f6]
  1258. // CHECK:STDOUT: %.loc23_34.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc23 [concrete = constants.%int_5.0f6]
  1259. // CHECK:STDOUT: %.loc23_34.2: %i32 = converted %int_5, %.loc23_34.1 [concrete = constants.%int_5.0f6]
  1260. // CHECK:STDOUT: %.loc23_28.2: ref %C = value_as_ref %.loc23_28.1
  1261. // CHECK:STDOUT: %addr.loc23_31.1: %ptr.d9e = addr_of %.loc23_28.2
  1262. // CHECK:STDOUT: %addr.loc23_31.2: %ptr.d9e = addr_of %.loc23_31.1
  1263. // CHECK:STDOUT: %operator>>__carbon_thunk.call: init %empty_tuple.type = call imports.%operator>>__carbon_thunk.decl(%addr.loc23_31.1, %.loc23_34.2, %addr.loc23_31.2)
  1264. // CHECK:STDOUT: %.loc23_31.2: init %C = in_place_init %operator>>__carbon_thunk.call, %.loc23_31.1
  1265. // CHECK:STDOUT: %.loc23_23: type = splice_block %C.ref.loc23 [concrete = constants.%C] {
  1266. // CHECK:STDOUT: %Cpp.ref.loc23: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1267. // CHECK:STDOUT: %C.ref.loc23: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1268. // CHECK:STDOUT: }
  1269. // CHECK:STDOUT: %.loc23_31.3: ref %C = temporary %.loc23_31.1, %.loc23_31.2
  1270. // CHECK:STDOUT: %.loc23_31.4: %C = bind_value %.loc23_31.3
  1271. // CHECK:STDOUT: %right_shift: %C = bind_name right_shift, %.loc23_31.4
  1272. // CHECK:STDOUT: %c1.ref.loc26: ref %C = name_ref c1, %c1
  1273. // CHECK:STDOUT: %c2.ref.loc26: ref %C = name_ref c2, %c2
  1274. // CHECK:STDOUT: %.loc26_6.1: ref %C = temporary_storage
  1275. // CHECK:STDOUT: %.loc26_3.1: %C = bind_value %c1.ref.loc26
  1276. // CHECK:STDOUT: %.loc26_9.1: %C = bind_value %c2.ref.loc26
  1277. // CHECK:STDOUT: %.loc26_3.2: ref %C = value_as_ref %.loc26_3.1
  1278. // CHECK:STDOUT: %addr.loc26_6.1: %ptr.d9e = addr_of %.loc26_3.2
  1279. // CHECK:STDOUT: %.loc26_9.2: ref %C = value_as_ref %.loc26_9.1
  1280. // CHECK:STDOUT: %addr.loc26_6.2: %ptr.d9e = addr_of %.loc26_9.2
  1281. // CHECK:STDOUT: %addr.loc26_6.3: %ptr.d9e = addr_of %.loc26_6.1
  1282. // CHECK:STDOUT: %operator+=__carbon_thunk.call: init %empty_tuple.type = call imports.%operator+=__carbon_thunk.decl(%addr.loc26_6.1, %addr.loc26_6.2, %addr.loc26_6.3)
  1283. // CHECK:STDOUT: %.loc26_6.2: init %C = in_place_init %operator+=__carbon_thunk.call, %.loc26_6.1
  1284. // CHECK:STDOUT: %.loc26_6.3: ref %C = temporary %.loc26_6.1, %.loc26_6.2
  1285. // CHECK:STDOUT: %c1.ref.loc27: ref %C = name_ref c1, %c1
  1286. // CHECK:STDOUT: %c2.ref.loc27: ref %C = name_ref c2, %c2
  1287. // CHECK:STDOUT: %.loc27_6.1: ref %C = temporary_storage
  1288. // CHECK:STDOUT: %.loc27_3.1: %C = bind_value %c1.ref.loc27
  1289. // CHECK:STDOUT: %.loc27_9.1: %C = bind_value %c2.ref.loc27
  1290. // CHECK:STDOUT: %.loc27_3.2: ref %C = value_as_ref %.loc27_3.1
  1291. // CHECK:STDOUT: %addr.loc27_6.1: %ptr.d9e = addr_of %.loc27_3.2
  1292. // CHECK:STDOUT: %.loc27_9.2: ref %C = value_as_ref %.loc27_9.1
  1293. // CHECK:STDOUT: %addr.loc27_6.2: %ptr.d9e = addr_of %.loc27_9.2
  1294. // CHECK:STDOUT: %addr.loc27_6.3: %ptr.d9e = addr_of %.loc27_6.1
  1295. // CHECK:STDOUT: %operator-=__carbon_thunk.call: init %empty_tuple.type = call imports.%operator-=__carbon_thunk.decl(%addr.loc27_6.1, %addr.loc27_6.2, %addr.loc27_6.3)
  1296. // CHECK:STDOUT: %.loc27_6.2: init %C = in_place_init %operator-=__carbon_thunk.call, %.loc27_6.1
  1297. // CHECK:STDOUT: %.loc27_6.3: ref %C = temporary %.loc27_6.1, %.loc27_6.2
  1298. // CHECK:STDOUT: %c1.ref.loc28: ref %C = name_ref c1, %c1
  1299. // CHECK:STDOUT: %c2.ref.loc28: ref %C = name_ref c2, %c2
  1300. // CHECK:STDOUT: %.loc28_6.1: ref %C = temporary_storage
  1301. // CHECK:STDOUT: %.loc28_3.1: %C = bind_value %c1.ref.loc28
  1302. // CHECK:STDOUT: %.loc28_9.1: %C = bind_value %c2.ref.loc28
  1303. // CHECK:STDOUT: %.loc28_3.2: ref %C = value_as_ref %.loc28_3.1
  1304. // CHECK:STDOUT: %addr.loc28_6.1: %ptr.d9e = addr_of %.loc28_3.2
  1305. // CHECK:STDOUT: %.loc28_9.2: ref %C = value_as_ref %.loc28_9.1
  1306. // CHECK:STDOUT: %addr.loc28_6.2: %ptr.d9e = addr_of %.loc28_9.2
  1307. // CHECK:STDOUT: %addr.loc28_6.3: %ptr.d9e = addr_of %.loc28_6.1
  1308. // CHECK:STDOUT: %operator*=__carbon_thunk.call: init %empty_tuple.type = call imports.%operator*=__carbon_thunk.decl(%addr.loc28_6.1, %addr.loc28_6.2, %addr.loc28_6.3)
  1309. // CHECK:STDOUT: %.loc28_6.2: init %C = in_place_init %operator*=__carbon_thunk.call, %.loc28_6.1
  1310. // CHECK:STDOUT: %.loc28_6.3: ref %C = temporary %.loc28_6.1, %.loc28_6.2
  1311. // CHECK:STDOUT: %c1.ref.loc29: ref %C = name_ref c1, %c1
  1312. // CHECK:STDOUT: %c2.ref.loc29: ref %C = name_ref c2, %c2
  1313. // CHECK:STDOUT: %.loc29_6.1: ref %C = temporary_storage
  1314. // CHECK:STDOUT: %.loc29_3.1: %C = bind_value %c1.ref.loc29
  1315. // CHECK:STDOUT: %.loc29_9.1: %C = bind_value %c2.ref.loc29
  1316. // CHECK:STDOUT: %.loc29_3.2: ref %C = value_as_ref %.loc29_3.1
  1317. // CHECK:STDOUT: %addr.loc29_6.1: %ptr.d9e = addr_of %.loc29_3.2
  1318. // CHECK:STDOUT: %.loc29_9.2: ref %C = value_as_ref %.loc29_9.1
  1319. // CHECK:STDOUT: %addr.loc29_6.2: %ptr.d9e = addr_of %.loc29_9.2
  1320. // CHECK:STDOUT: %addr.loc29_6.3: %ptr.d9e = addr_of %.loc29_6.1
  1321. // CHECK:STDOUT: %operator/=__carbon_thunk.call: init %empty_tuple.type = call imports.%operator/=__carbon_thunk.decl(%addr.loc29_6.1, %addr.loc29_6.2, %addr.loc29_6.3)
  1322. // CHECK:STDOUT: %.loc29_6.2: init %C = in_place_init %operator/=__carbon_thunk.call, %.loc29_6.1
  1323. // CHECK:STDOUT: %.loc29_6.3: ref %C = temporary %.loc29_6.1, %.loc29_6.2
  1324. // CHECK:STDOUT: %c1.ref.loc30: ref %C = name_ref c1, %c1
  1325. // CHECK:STDOUT: %c2.ref.loc30: ref %C = name_ref c2, %c2
  1326. // CHECK:STDOUT: %.loc30_6.1: ref %C = temporary_storage
  1327. // CHECK:STDOUT: %.loc30_3.1: %C = bind_value %c1.ref.loc30
  1328. // CHECK:STDOUT: %.loc30_9.1: %C = bind_value %c2.ref.loc30
  1329. // CHECK:STDOUT: %.loc30_3.2: ref %C = value_as_ref %.loc30_3.1
  1330. // CHECK:STDOUT: %addr.loc30_6.1: %ptr.d9e = addr_of %.loc30_3.2
  1331. // CHECK:STDOUT: %.loc30_9.2: ref %C = value_as_ref %.loc30_9.1
  1332. // CHECK:STDOUT: %addr.loc30_6.2: %ptr.d9e = addr_of %.loc30_9.2
  1333. // CHECK:STDOUT: %addr.loc30_6.3: %ptr.d9e = addr_of %.loc30_6.1
  1334. // CHECK:STDOUT: %operator%=__carbon_thunk.call: init %empty_tuple.type = call imports.%operator%=__carbon_thunk.decl(%addr.loc30_6.1, %addr.loc30_6.2, %addr.loc30_6.3)
  1335. // CHECK:STDOUT: %.loc30_6.2: init %C = in_place_init %operator%=__carbon_thunk.call, %.loc30_6.1
  1336. // CHECK:STDOUT: %.loc30_6.3: ref %C = temporary %.loc30_6.1, %.loc30_6.2
  1337. // CHECK:STDOUT: %c1.ref.loc33: ref %C = name_ref c1, %c1
  1338. // CHECK:STDOUT: %c2.ref.loc33: ref %C = name_ref c2, %c2
  1339. // CHECK:STDOUT: %.loc33_6.1: ref %C = temporary_storage
  1340. // CHECK:STDOUT: %.loc33_3.1: %C = bind_value %c1.ref.loc33
  1341. // CHECK:STDOUT: %.loc33_9.1: %C = bind_value %c2.ref.loc33
  1342. // CHECK:STDOUT: %.loc33_3.2: ref %C = value_as_ref %.loc33_3.1
  1343. // CHECK:STDOUT: %addr.loc33_6.1: %ptr.d9e = addr_of %.loc33_3.2
  1344. // CHECK:STDOUT: %.loc33_9.2: ref %C = value_as_ref %.loc33_9.1
  1345. // CHECK:STDOUT: %addr.loc33_6.2: %ptr.d9e = addr_of %.loc33_9.2
  1346. // CHECK:STDOUT: %addr.loc33_6.3: %ptr.d9e = addr_of %.loc33_6.1
  1347. // CHECK:STDOUT: %operator&=__carbon_thunk.call: init %empty_tuple.type = call imports.%operator&=__carbon_thunk.decl(%addr.loc33_6.1, %addr.loc33_6.2, %addr.loc33_6.3)
  1348. // CHECK:STDOUT: %.loc33_6.2: init %C = in_place_init %operator&=__carbon_thunk.call, %.loc33_6.1
  1349. // CHECK:STDOUT: %.loc33_6.3: ref %C = temporary %.loc33_6.1, %.loc33_6.2
  1350. // CHECK:STDOUT: %c1.ref.loc34: ref %C = name_ref c1, %c1
  1351. // CHECK:STDOUT: %c2.ref.loc34: ref %C = name_ref c2, %c2
  1352. // CHECK:STDOUT: %.loc34_6.1: ref %C = temporary_storage
  1353. // CHECK:STDOUT: %.loc34_3.1: %C = bind_value %c1.ref.loc34
  1354. // CHECK:STDOUT: %.loc34_9.1: %C = bind_value %c2.ref.loc34
  1355. // CHECK:STDOUT: %.loc34_3.2: ref %C = value_as_ref %.loc34_3.1
  1356. // CHECK:STDOUT: %addr.loc34_6.1: %ptr.d9e = addr_of %.loc34_3.2
  1357. // CHECK:STDOUT: %.loc34_9.2: ref %C = value_as_ref %.loc34_9.1
  1358. // CHECK:STDOUT: %addr.loc34_6.2: %ptr.d9e = addr_of %.loc34_9.2
  1359. // CHECK:STDOUT: %addr.loc34_6.3: %ptr.d9e = addr_of %.loc34_6.1
  1360. // CHECK:STDOUT: %operator|=__carbon_thunk.call: init %empty_tuple.type = call imports.%operator|=__carbon_thunk.decl(%addr.loc34_6.1, %addr.loc34_6.2, %addr.loc34_6.3)
  1361. // CHECK:STDOUT: %.loc34_6.2: init %C = in_place_init %operator|=__carbon_thunk.call, %.loc34_6.1
  1362. // CHECK:STDOUT: %.loc34_6.3: ref %C = temporary %.loc34_6.1, %.loc34_6.2
  1363. // CHECK:STDOUT: %c1.ref.loc35: ref %C = name_ref c1, %c1
  1364. // CHECK:STDOUT: %c2.ref.loc35: ref %C = name_ref c2, %c2
  1365. // CHECK:STDOUT: %.loc35_6.1: ref %C = temporary_storage
  1366. // CHECK:STDOUT: %.loc35_3.1: %C = bind_value %c1.ref.loc35
  1367. // CHECK:STDOUT: %.loc35_9.1: %C = bind_value %c2.ref.loc35
  1368. // CHECK:STDOUT: %.loc35_3.2: ref %C = value_as_ref %.loc35_3.1
  1369. // CHECK:STDOUT: %addr.loc35_6.1: %ptr.d9e = addr_of %.loc35_3.2
  1370. // CHECK:STDOUT: %.loc35_9.2: ref %C = value_as_ref %.loc35_9.1
  1371. // CHECK:STDOUT: %addr.loc35_6.2: %ptr.d9e = addr_of %.loc35_9.2
  1372. // CHECK:STDOUT: %addr.loc35_6.3: %ptr.d9e = addr_of %.loc35_6.1
  1373. // CHECK:STDOUT: %operator^=__carbon_thunk.call: init %empty_tuple.type = call imports.%operator^=__carbon_thunk.decl(%addr.loc35_6.1, %addr.loc35_6.2, %addr.loc35_6.3)
  1374. // CHECK:STDOUT: %.loc35_6.2: init %C = in_place_init %operator^=__carbon_thunk.call, %.loc35_6.1
  1375. // CHECK:STDOUT: %.loc35_6.3: ref %C = temporary %.loc35_6.1, %.loc35_6.2
  1376. // CHECK:STDOUT: name_binding_decl {
  1377. // CHECK:STDOUT: %equal.patt: %pattern_type.831 = binding_pattern equal [concrete]
  1378. // CHECK:STDOUT: }
  1379. // CHECK:STDOUT: %c1.ref.loc38: ref %C = name_ref c1, %c1
  1380. // CHECK:STDOUT: %c2.ref.loc38: ref %C = name_ref c2, %c2
  1381. // CHECK:STDOUT: %.loc38_21.1: %C = bind_value %c1.ref.loc38
  1382. // CHECK:STDOUT: %.loc38_27.1: %C = bind_value %c2.ref.loc38
  1383. // CHECK:STDOUT: %.loc38_21.2: ref %C = value_as_ref %.loc38_21.1
  1384. // CHECK:STDOUT: %addr.loc38_24.1: %ptr.d9e = addr_of %.loc38_21.2
  1385. // CHECK:STDOUT: %.loc38_27.2: ref %C = value_as_ref %.loc38_27.1
  1386. // CHECK:STDOUT: %addr.loc38_24.2: %ptr.d9e = addr_of %.loc38_27.2
  1387. // CHECK:STDOUT: %.loc38_24.1: ref bool = temporary_storage
  1388. // CHECK:STDOUT: %addr.loc38_24.3: %ptr.bb2 = addr_of %.loc38_24.1
  1389. // CHECK:STDOUT: %operator==__carbon_thunk.call: init %empty_tuple.type = call imports.%operator==__carbon_thunk.decl(%addr.loc38_24.1, %addr.loc38_24.2, %addr.loc38_24.3)
  1390. // CHECK:STDOUT: %.loc38_24.2: init bool = in_place_init %operator==__carbon_thunk.call, %.loc38_24.1
  1391. // CHECK:STDOUT: %.loc38_14.1: type = splice_block %.loc38_14.3 [concrete = bool] {
  1392. // CHECK:STDOUT: %Bool.call.loc38: init type = call constants.%Bool() [concrete = bool]
  1393. // CHECK:STDOUT: %.loc38_14.2: type = value_of_initializer %Bool.call.loc38 [concrete = bool]
  1394. // CHECK:STDOUT: %.loc38_14.3: type = converted %Bool.call.loc38, %.loc38_14.2 [concrete = bool]
  1395. // CHECK:STDOUT: }
  1396. // CHECK:STDOUT: %.loc38_24.3: bool = value_of_initializer %.loc38_24.2
  1397. // CHECK:STDOUT: %.loc38_24.4: bool = converted %.loc38_24.2, %.loc38_24.3
  1398. // CHECK:STDOUT: %equal: bool = bind_name equal, %.loc38_24.4
  1399. // CHECK:STDOUT: name_binding_decl {
  1400. // CHECK:STDOUT: %not_equal.patt: %pattern_type.831 = binding_pattern not_equal [concrete]
  1401. // CHECK:STDOUT: }
  1402. // CHECK:STDOUT: %c1.ref.loc39: ref %C = name_ref c1, %c1
  1403. // CHECK:STDOUT: %c2.ref.loc39: ref %C = name_ref c2, %c2
  1404. // CHECK:STDOUT: %.loc39_25.1: %C = bind_value %c1.ref.loc39
  1405. // CHECK:STDOUT: %.loc39_31.1: %C = bind_value %c2.ref.loc39
  1406. // CHECK:STDOUT: %.loc39_25.2: ref %C = value_as_ref %.loc39_25.1
  1407. // CHECK:STDOUT: %addr.loc39_28.1: %ptr.d9e = addr_of %.loc39_25.2
  1408. // CHECK:STDOUT: %.loc39_31.2: ref %C = value_as_ref %.loc39_31.1
  1409. // CHECK:STDOUT: %addr.loc39_28.2: %ptr.d9e = addr_of %.loc39_31.2
  1410. // CHECK:STDOUT: %.loc39_28.1: ref bool = temporary_storage
  1411. // CHECK:STDOUT: %addr.loc39_28.3: %ptr.bb2 = addr_of %.loc39_28.1
  1412. // CHECK:STDOUT: %operator!=__carbon_thunk.call: init %empty_tuple.type = call imports.%operator!=__carbon_thunk.decl(%addr.loc39_28.1, %addr.loc39_28.2, %addr.loc39_28.3)
  1413. // CHECK:STDOUT: %.loc39_28.2: init bool = in_place_init %operator!=__carbon_thunk.call, %.loc39_28.1
  1414. // CHECK:STDOUT: %.loc39_18.1: type = splice_block %.loc39_18.3 [concrete = bool] {
  1415. // CHECK:STDOUT: %Bool.call.loc39: init type = call constants.%Bool() [concrete = bool]
  1416. // CHECK:STDOUT: %.loc39_18.2: type = value_of_initializer %Bool.call.loc39 [concrete = bool]
  1417. // CHECK:STDOUT: %.loc39_18.3: type = converted %Bool.call.loc39, %.loc39_18.2 [concrete = bool]
  1418. // CHECK:STDOUT: }
  1419. // CHECK:STDOUT: %.loc39_28.3: bool = value_of_initializer %.loc39_28.2
  1420. // CHECK:STDOUT: %.loc39_28.4: bool = converted %.loc39_28.2, %.loc39_28.3
  1421. // CHECK:STDOUT: %not_equal: bool = bind_name not_equal, %.loc39_28.4
  1422. // CHECK:STDOUT: name_binding_decl {
  1423. // CHECK:STDOUT: %greater_than.patt: %pattern_type.831 = binding_pattern greater_than [concrete]
  1424. // CHECK:STDOUT: }
  1425. // CHECK:STDOUT: %c1.ref.loc40: ref %C = name_ref c1, %c1
  1426. // CHECK:STDOUT: %c2.ref.loc40: ref %C = name_ref c2, %c2
  1427. // CHECK:STDOUT: %.loc40_28.1: %C = bind_value %c1.ref.loc40
  1428. // CHECK:STDOUT: %.loc40_33.1: %C = bind_value %c2.ref.loc40
  1429. // CHECK:STDOUT: %.loc40_28.2: ref %C = value_as_ref %.loc40_28.1
  1430. // CHECK:STDOUT: %addr.loc40_31.1: %ptr.d9e = addr_of %.loc40_28.2
  1431. // CHECK:STDOUT: %.loc40_33.2: ref %C = value_as_ref %.loc40_33.1
  1432. // CHECK:STDOUT: %addr.loc40_31.2: %ptr.d9e = addr_of %.loc40_33.2
  1433. // CHECK:STDOUT: %.loc40_31.1: ref bool = temporary_storage
  1434. // CHECK:STDOUT: %addr.loc40_31.3: %ptr.bb2 = addr_of %.loc40_31.1
  1435. // CHECK:STDOUT: %operator>__carbon_thunk.call: init %empty_tuple.type = call imports.%operator>__carbon_thunk.decl(%addr.loc40_31.1, %addr.loc40_31.2, %addr.loc40_31.3)
  1436. // CHECK:STDOUT: %.loc40_31.2: init bool = in_place_init %operator>__carbon_thunk.call, %.loc40_31.1
  1437. // CHECK:STDOUT: %.loc40_21.1: type = splice_block %.loc40_21.3 [concrete = bool] {
  1438. // CHECK:STDOUT: %Bool.call.loc40: init type = call constants.%Bool() [concrete = bool]
  1439. // CHECK:STDOUT: %.loc40_21.2: type = value_of_initializer %Bool.call.loc40 [concrete = bool]
  1440. // CHECK:STDOUT: %.loc40_21.3: type = converted %Bool.call.loc40, %.loc40_21.2 [concrete = bool]
  1441. // CHECK:STDOUT: }
  1442. // CHECK:STDOUT: %.loc40_31.3: bool = value_of_initializer %.loc40_31.2
  1443. // CHECK:STDOUT: %.loc40_31.4: bool = converted %.loc40_31.2, %.loc40_31.3
  1444. // CHECK:STDOUT: %greater_than: bool = bind_name greater_than, %.loc40_31.4
  1445. // CHECK:STDOUT: name_binding_decl {
  1446. // CHECK:STDOUT: %less_than.patt: %pattern_type.831 = binding_pattern less_than [concrete]
  1447. // CHECK:STDOUT: }
  1448. // CHECK:STDOUT: %c1.ref.loc41: ref %C = name_ref c1, %c1
  1449. // CHECK:STDOUT: %c2.ref.loc41: ref %C = name_ref c2, %c2
  1450. // CHECK:STDOUT: %.loc41_25.1: %C = bind_value %c1.ref.loc41
  1451. // CHECK:STDOUT: %.loc41_30.1: %C = bind_value %c2.ref.loc41
  1452. // CHECK:STDOUT: %.loc41_25.2: ref %C = value_as_ref %.loc41_25.1
  1453. // CHECK:STDOUT: %addr.loc41_28.1: %ptr.d9e = addr_of %.loc41_25.2
  1454. // CHECK:STDOUT: %.loc41_30.2: ref %C = value_as_ref %.loc41_30.1
  1455. // CHECK:STDOUT: %addr.loc41_28.2: %ptr.d9e = addr_of %.loc41_30.2
  1456. // CHECK:STDOUT: %.loc41_28.1: ref bool = temporary_storage
  1457. // CHECK:STDOUT: %addr.loc41_28.3: %ptr.bb2 = addr_of %.loc41_28.1
  1458. // CHECK:STDOUT: %operator<__carbon_thunk.call: init %empty_tuple.type = call imports.%operator<__carbon_thunk.decl(%addr.loc41_28.1, %addr.loc41_28.2, %addr.loc41_28.3)
  1459. // CHECK:STDOUT: %.loc41_28.2: init bool = in_place_init %operator<__carbon_thunk.call, %.loc41_28.1
  1460. // CHECK:STDOUT: %.loc41_18.1: type = splice_block %.loc41_18.3 [concrete = bool] {
  1461. // CHECK:STDOUT: %Bool.call.loc41: init type = call constants.%Bool() [concrete = bool]
  1462. // CHECK:STDOUT: %.loc41_18.2: type = value_of_initializer %Bool.call.loc41 [concrete = bool]
  1463. // CHECK:STDOUT: %.loc41_18.3: type = converted %Bool.call.loc41, %.loc41_18.2 [concrete = bool]
  1464. // CHECK:STDOUT: }
  1465. // CHECK:STDOUT: %.loc41_28.3: bool = value_of_initializer %.loc41_28.2
  1466. // CHECK:STDOUT: %.loc41_28.4: bool = converted %.loc41_28.2, %.loc41_28.3
  1467. // CHECK:STDOUT: %less_than: bool = bind_name less_than, %.loc41_28.4
  1468. // CHECK:STDOUT: name_binding_decl {
  1469. // CHECK:STDOUT: %greater_than_or_equal.patt: %pattern_type.831 = binding_pattern greater_than_or_equal [concrete]
  1470. // CHECK:STDOUT: }
  1471. // CHECK:STDOUT: %c1.ref.loc42: ref %C = name_ref c1, %c1
  1472. // CHECK:STDOUT: %c2.ref.loc42: ref %C = name_ref c2, %c2
  1473. // CHECK:STDOUT: %.loc42_37.1: %C = bind_value %c1.ref.loc42
  1474. // CHECK:STDOUT: %.loc42_43.1: %C = bind_value %c2.ref.loc42
  1475. // CHECK:STDOUT: %.loc42_37.2: ref %C = value_as_ref %.loc42_37.1
  1476. // CHECK:STDOUT: %addr.loc42_40.1: %ptr.d9e = addr_of %.loc42_37.2
  1477. // CHECK:STDOUT: %.loc42_43.2: ref %C = value_as_ref %.loc42_43.1
  1478. // CHECK:STDOUT: %addr.loc42_40.2: %ptr.d9e = addr_of %.loc42_43.2
  1479. // CHECK:STDOUT: %.loc42_40.1: ref bool = temporary_storage
  1480. // CHECK:STDOUT: %addr.loc42_40.3: %ptr.bb2 = addr_of %.loc42_40.1
  1481. // CHECK:STDOUT: %operator>=__carbon_thunk.call: init %empty_tuple.type = call imports.%operator>=__carbon_thunk.decl(%addr.loc42_40.1, %addr.loc42_40.2, %addr.loc42_40.3)
  1482. // CHECK:STDOUT: %.loc42_40.2: init bool = in_place_init %operator>=__carbon_thunk.call, %.loc42_40.1
  1483. // CHECK:STDOUT: %.loc42_30.1: type = splice_block %.loc42_30.3 [concrete = bool] {
  1484. // CHECK:STDOUT: %Bool.call.loc42: init type = call constants.%Bool() [concrete = bool]
  1485. // CHECK:STDOUT: %.loc42_30.2: type = value_of_initializer %Bool.call.loc42 [concrete = bool]
  1486. // CHECK:STDOUT: %.loc42_30.3: type = converted %Bool.call.loc42, %.loc42_30.2 [concrete = bool]
  1487. // CHECK:STDOUT: }
  1488. // CHECK:STDOUT: %.loc42_40.3: bool = value_of_initializer %.loc42_40.2
  1489. // CHECK:STDOUT: %.loc42_40.4: bool = converted %.loc42_40.2, %.loc42_40.3
  1490. // CHECK:STDOUT: %greater_than_or_equal: bool = bind_name greater_than_or_equal, %.loc42_40.4
  1491. // CHECK:STDOUT: name_binding_decl {
  1492. // CHECK:STDOUT: %less_than_or_equal.patt: %pattern_type.831 = binding_pattern less_than_or_equal [concrete]
  1493. // CHECK:STDOUT: }
  1494. // CHECK:STDOUT: %c1.ref.loc43: ref %C = name_ref c1, %c1
  1495. // CHECK:STDOUT: %c2.ref.loc43: ref %C = name_ref c2, %c2
  1496. // CHECK:STDOUT: %.loc43_34.1: %C = bind_value %c1.ref.loc43
  1497. // CHECK:STDOUT: %.loc43_40.1: %C = bind_value %c2.ref.loc43
  1498. // CHECK:STDOUT: %.loc43_34.2: ref %C = value_as_ref %.loc43_34.1
  1499. // CHECK:STDOUT: %addr.loc43_37.1: %ptr.d9e = addr_of %.loc43_34.2
  1500. // CHECK:STDOUT: %.loc43_40.2: ref %C = value_as_ref %.loc43_40.1
  1501. // CHECK:STDOUT: %addr.loc43_37.2: %ptr.d9e = addr_of %.loc43_40.2
  1502. // CHECK:STDOUT: %.loc43_37.1: ref bool = temporary_storage
  1503. // CHECK:STDOUT: %addr.loc43_37.3: %ptr.bb2 = addr_of %.loc43_37.1
  1504. // CHECK:STDOUT: %operator<=__carbon_thunk.call: init %empty_tuple.type = call imports.%operator<=__carbon_thunk.decl(%addr.loc43_37.1, %addr.loc43_37.2, %addr.loc43_37.3)
  1505. // CHECK:STDOUT: %.loc43_37.2: init bool = in_place_init %operator<=__carbon_thunk.call, %.loc43_37.1
  1506. // CHECK:STDOUT: %.loc43_27.1: type = splice_block %.loc43_27.3 [concrete = bool] {
  1507. // CHECK:STDOUT: %Bool.call.loc43: init type = call constants.%Bool() [concrete = bool]
  1508. // CHECK:STDOUT: %.loc43_27.2: type = value_of_initializer %Bool.call.loc43 [concrete = bool]
  1509. // CHECK:STDOUT: %.loc43_27.3: type = converted %Bool.call.loc43, %.loc43_27.2 [concrete = bool]
  1510. // CHECK:STDOUT: }
  1511. // CHECK:STDOUT: %.loc43_37.3: bool = value_of_initializer %.loc43_37.2
  1512. // CHECK:STDOUT: %.loc43_37.4: bool = converted %.loc43_37.2, %.loc43_37.3
  1513. // CHECK:STDOUT: %less_than_or_equal: bool = bind_name less_than_or_equal, %.loc43_37.4
  1514. // CHECK:STDOUT: %facet_value.loc35: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1515. // CHECK:STDOUT: %.loc35_6.4: %type_where = converted constants.%C, %facet_value.loc35 [concrete = constants.%facet_value]
  1516. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc35: <bound method> = bound_method %.loc35_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1517. // CHECK:STDOUT: <elided>
  1518. // CHECK:STDOUT: %bound_method.loc35: <bound method> = bound_method %.loc35_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1
  1519. // CHECK:STDOUT: %addr.loc35_6.4: %ptr.d9e = addr_of %.loc35_6.3
  1520. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc35: init %empty_tuple.type = call %bound_method.loc35(%addr.loc35_6.4)
  1521. // CHECK:STDOUT: %facet_value.loc34: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1522. // CHECK:STDOUT: %.loc34_6.4: %type_where = converted constants.%C, %facet_value.loc34 [concrete = constants.%facet_value]
  1523. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc34: <bound method> = bound_method %.loc34_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1524. // CHECK:STDOUT: <elided>
  1525. // CHECK:STDOUT: %bound_method.loc34: <bound method> = bound_method %.loc34_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2
  1526. // CHECK:STDOUT: %addr.loc34_6.4: %ptr.d9e = addr_of %.loc34_6.3
  1527. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc34: init %empty_tuple.type = call %bound_method.loc34(%addr.loc34_6.4)
  1528. // CHECK:STDOUT: %facet_value.loc33: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1529. // CHECK:STDOUT: %.loc33_6.4: %type_where = converted constants.%C, %facet_value.loc33 [concrete = constants.%facet_value]
  1530. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc33: <bound method> = bound_method %.loc33_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1531. // CHECK:STDOUT: <elided>
  1532. // CHECK:STDOUT: %bound_method.loc33: <bound method> = bound_method %.loc33_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3
  1533. // CHECK:STDOUT: %addr.loc33_6.4: %ptr.d9e = addr_of %.loc33_6.3
  1534. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc33: init %empty_tuple.type = call %bound_method.loc33(%addr.loc33_6.4)
  1535. // CHECK:STDOUT: %facet_value.loc30: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1536. // CHECK:STDOUT: %.loc30_6.4: %type_where = converted constants.%C, %facet_value.loc30 [concrete = constants.%facet_value]
  1537. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc30: <bound method> = bound_method %.loc30_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1538. // CHECK:STDOUT: <elided>
  1539. // CHECK:STDOUT: %bound_method.loc30: <bound method> = bound_method %.loc30_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.4
  1540. // CHECK:STDOUT: %addr.loc30_6.4: %ptr.d9e = addr_of %.loc30_6.3
  1541. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc30: init %empty_tuple.type = call %bound_method.loc30(%addr.loc30_6.4)
  1542. // CHECK:STDOUT: %facet_value.loc29: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1543. // CHECK:STDOUT: %.loc29_6.4: %type_where = converted constants.%C, %facet_value.loc29 [concrete = constants.%facet_value]
  1544. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc29: <bound method> = bound_method %.loc29_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1545. // CHECK:STDOUT: <elided>
  1546. // CHECK:STDOUT: %bound_method.loc29: <bound method> = bound_method %.loc29_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.5
  1547. // CHECK:STDOUT: %addr.loc29_6.4: %ptr.d9e = addr_of %.loc29_6.3
  1548. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc29: init %empty_tuple.type = call %bound_method.loc29(%addr.loc29_6.4)
  1549. // CHECK:STDOUT: %facet_value.loc28: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1550. // CHECK:STDOUT: %.loc28_6.4: %type_where = converted constants.%C, %facet_value.loc28 [concrete = constants.%facet_value]
  1551. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc28: <bound method> = bound_method %.loc28_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1552. // CHECK:STDOUT: <elided>
  1553. // CHECK:STDOUT: %bound_method.loc28: <bound method> = bound_method %.loc28_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.6
  1554. // CHECK:STDOUT: %addr.loc28_6.4: %ptr.d9e = addr_of %.loc28_6.3
  1555. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc28: init %empty_tuple.type = call %bound_method.loc28(%addr.loc28_6.4)
  1556. // CHECK:STDOUT: %facet_value.loc27: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1557. // CHECK:STDOUT: %.loc27_6.4: %type_where = converted constants.%C, %facet_value.loc27 [concrete = constants.%facet_value]
  1558. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc27: <bound method> = bound_method %.loc27_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1559. // CHECK:STDOUT: <elided>
  1560. // CHECK:STDOUT: %bound_method.loc27: <bound method> = bound_method %.loc27_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.7
  1561. // CHECK:STDOUT: %addr.loc27_6.4: %ptr.d9e = addr_of %.loc27_6.3
  1562. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc27: init %empty_tuple.type = call %bound_method.loc27(%addr.loc27_6.4)
  1563. // CHECK:STDOUT: %facet_value.loc26: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1564. // CHECK:STDOUT: %.loc26_6.4: %type_where = converted constants.%C, %facet_value.loc26 [concrete = constants.%facet_value]
  1565. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc26: <bound method> = bound_method %.loc26_6.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1566. // CHECK:STDOUT: <elided>
  1567. // CHECK:STDOUT: %bound_method.loc26: <bound method> = bound_method %.loc26_6.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.8
  1568. // CHECK:STDOUT: %addr.loc26_6.4: %ptr.d9e = addr_of %.loc26_6.3
  1569. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc26: init %empty_tuple.type = call %bound_method.loc26(%addr.loc26_6.4)
  1570. // CHECK:STDOUT: %facet_value.loc23: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1571. // CHECK:STDOUT: %.loc23_31.5: %type_where = converted constants.%C, %facet_value.loc23 [concrete = constants.%facet_value]
  1572. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc23: <bound method> = bound_method %.loc23_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1573. // CHECK:STDOUT: <elided>
  1574. // CHECK:STDOUT: %bound_method.loc23_31: <bound method> = bound_method %.loc23_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.9
  1575. // CHECK:STDOUT: %addr.loc23_31.3: %ptr.d9e = addr_of %.loc23_31.3
  1576. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23_31(%addr.loc23_31.3)
  1577. // CHECK:STDOUT: %facet_value.loc22: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1578. // CHECK:STDOUT: %.loc22_30.5: %type_where = converted constants.%C, %facet_value.loc22 [concrete = constants.%facet_value]
  1579. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc22: <bound method> = bound_method %.loc22_30.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1580. // CHECK:STDOUT: <elided>
  1581. // CHECK:STDOUT: %bound_method.loc22_30: <bound method> = bound_method %.loc22_30.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.10
  1582. // CHECK:STDOUT: %addr.loc22_30.3: %ptr.d9e = addr_of %.loc22_30.3
  1583. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22_30(%addr.loc22_30.3)
  1584. // CHECK:STDOUT: %facet_value.loc21: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1585. // CHECK:STDOUT: %.loc21_31.5: %type_where = converted constants.%C, %facet_value.loc21 [concrete = constants.%facet_value]
  1586. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc21: <bound method> = bound_method %.loc21_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1587. // CHECK:STDOUT: <elided>
  1588. // CHECK:STDOUT: %bound_method.loc21: <bound method> = bound_method %.loc21_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.11
  1589. // CHECK:STDOUT: %addr.loc21_31.4: %ptr.d9e = addr_of %.loc21_31.3
  1590. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc21: init %empty_tuple.type = call %bound_method.loc21(%addr.loc21_31.4)
  1591. // CHECK:STDOUT: %facet_value.loc20: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1592. // CHECK:STDOUT: %.loc20_30.5: %type_where = converted constants.%C, %facet_value.loc20 [concrete = constants.%facet_value]
  1593. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc20: <bound method> = bound_method %.loc20_30.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1594. // CHECK:STDOUT: <elided>
  1595. // CHECK:STDOUT: %bound_method.loc20: <bound method> = bound_method %.loc20_30.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.12
  1596. // CHECK:STDOUT: %addr.loc20_30.4: %ptr.d9e = addr_of %.loc20_30.3
  1597. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc20: init %empty_tuple.type = call %bound_method.loc20(%addr.loc20_30.4)
  1598. // CHECK:STDOUT: %facet_value.loc19: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1599. // CHECK:STDOUT: %.loc19_31.5: %type_where = converted constants.%C, %facet_value.loc19 [concrete = constants.%facet_value]
  1600. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc19: <bound method> = bound_method %.loc19_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1601. // CHECK:STDOUT: <elided>
  1602. // CHECK:STDOUT: %bound_method.loc19: <bound method> = bound_method %.loc19_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.13
  1603. // CHECK:STDOUT: %addr.loc19_31.4: %ptr.d9e = addr_of %.loc19_31.3
  1604. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc19: init %empty_tuple.type = call %bound_method.loc19(%addr.loc19_31.4)
  1605. // CHECK:STDOUT: %facet_value.loc16: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1606. // CHECK:STDOUT: %.loc16_26.5: %type_where = converted constants.%C, %facet_value.loc16 [concrete = constants.%facet_value]
  1607. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc16: <bound method> = bound_method %.loc16_26.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1608. // CHECK:STDOUT: <elided>
  1609. // CHECK:STDOUT: %bound_method.loc16: <bound method> = bound_method %.loc16_26.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.14
  1610. // CHECK:STDOUT: %addr.loc16_26.4: %ptr.d9e = addr_of %.loc16_26.3
  1611. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc16: init %empty_tuple.type = call %bound_method.loc16(%addr.loc16_26.4)
  1612. // CHECK:STDOUT: %facet_value.loc15: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1613. // CHECK:STDOUT: %.loc15_28.5: %type_where = converted constants.%C, %facet_value.loc15 [concrete = constants.%facet_value]
  1614. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc15: <bound method> = bound_method %.loc15_28.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1615. // CHECK:STDOUT: <elided>
  1616. // CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %.loc15_28.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.15
  1617. // CHECK:STDOUT: %addr.loc15_28.4: %ptr.d9e = addr_of %.loc15_28.3
  1618. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc15: init %empty_tuple.type = call %bound_method.loc15(%addr.loc15_28.4)
  1619. // CHECK:STDOUT: %facet_value.loc14: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1620. // CHECK:STDOUT: %.loc14_34.5: %type_where = converted constants.%C, %facet_value.loc14 [concrete = constants.%facet_value]
  1621. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc14: <bound method> = bound_method %.loc14_34.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1622. // CHECK:STDOUT: <elided>
  1623. // CHECK:STDOUT: %bound_method.loc14: <bound method> = bound_method %.loc14_34.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.16
  1624. // CHECK:STDOUT: %addr.loc14_34.4: %ptr.d9e = addr_of %.loc14_34.3
  1625. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc14: init %empty_tuple.type = call %bound_method.loc14(%addr.loc14_34.4)
  1626. // CHECK:STDOUT: %facet_value.loc13: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1627. // CHECK:STDOUT: %.loc13_31.5: %type_where = converted constants.%C, %facet_value.loc13 [concrete = constants.%facet_value]
  1628. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc13: <bound method> = bound_method %.loc13_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1629. // CHECK:STDOUT: <elided>
  1630. // CHECK:STDOUT: %bound_method.loc13: <bound method> = bound_method %.loc13_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.17
  1631. // CHECK:STDOUT: %addr.loc13_31.4: %ptr.d9e = addr_of %.loc13_31.3
  1632. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc13: init %empty_tuple.type = call %bound_method.loc13(%addr.loc13_31.4)
  1633. // CHECK:STDOUT: %facet_value.loc12: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1634. // CHECK:STDOUT: %.loc12_28.5: %type_where = converted constants.%C, %facet_value.loc12 [concrete = constants.%facet_value]
  1635. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc12: <bound method> = bound_method %.loc12_28.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1636. // CHECK:STDOUT: <elided>
  1637. // CHECK:STDOUT: %bound_method.loc12: <bound method> = bound_method %.loc12_28.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.18
  1638. // CHECK:STDOUT: %addr.loc12_28.4: %ptr.d9e = addr_of %.loc12_28.3
  1639. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc12: init %empty_tuple.type = call %bound_method.loc12(%addr.loc12_28.4)
  1640. // CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1641. // CHECK:STDOUT: %.loc9_3.2: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value]
  1642. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: <bound method> = bound_method %c2.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1643. // CHECK:STDOUT: <elided>
  1644. // CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %c2.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.19
  1645. // CHECK:STDOUT: %addr.loc9_3: %ptr.d9e = addr_of %c2.var
  1646. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_3)
  1647. // CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1648. // CHECK:STDOUT: %.loc8_3.2: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value]
  1649. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: <bound method> = bound_method %c1.var, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1650. // CHECK:STDOUT: <elided>
  1651. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %c1.var, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.20
  1652. // CHECK:STDOUT: %addr.loc8_3: %ptr.d9e = addr_of %c1.var
  1653. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_3)
  1654. // CHECK:STDOUT: <elided>
  1655. // CHECK:STDOUT: }
  1656. // CHECK:STDOUT:
  1657. // CHECK:STDOUT: --- multiple_calls.carbon
  1658. // CHECK:STDOUT:
  1659. // CHECK:STDOUT: constants {
  1660. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1661. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  1662. // CHECK:STDOUT: %pattern_type.217: type = pattern_type %C [concrete]
  1663. // CHECK:STDOUT: %.d40: type = cpp_overload_set_type @operator+__carbon_thunk [concrete]
  1664. // CHECK:STDOUT: %empty_struct.e73: %.d40 = struct_value () [concrete]
  1665. // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete]
  1666. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  1667. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  1668. // CHECK:STDOUT: %operator+__carbon_thunk.type: type = fn_type @operator+__carbon_thunk [concrete]
  1669. // CHECK:STDOUT: %operator+__carbon_thunk: %operator+__carbon_thunk.type = struct_value () [concrete]
  1670. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  1671. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  1672. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  1673. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete]
  1674. // CHECK:STDOUT: }
  1675. // CHECK:STDOUT:
  1676. // CHECK:STDOUT: imports {
  1677. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  1678. // CHECK:STDOUT: .C = %C.decl
  1679. // CHECK:STDOUT: import Cpp//...
  1680. // CHECK:STDOUT: }
  1681. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  1682. // CHECK:STDOUT: %.40b: %.d40 = cpp_overload_set_value @operator+__carbon_thunk [concrete = constants.%empty_struct.e73]
  1683. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  1684. // CHECK:STDOUT: <elided>
  1685. // CHECK:STDOUT: } {
  1686. // CHECK:STDOUT: <elided>
  1687. // CHECK:STDOUT: }
  1688. // CHECK:STDOUT: %operator+__carbon_thunk.decl: %operator+__carbon_thunk.type = fn_decl @operator+__carbon_thunk [concrete = constants.%operator+__carbon_thunk] {
  1689. // CHECK:STDOUT: <elided>
  1690. // CHECK:STDOUT: } {
  1691. // CHECK:STDOUT: <elided>
  1692. // CHECK:STDOUT: }
  1693. // CHECK:STDOUT: }
  1694. // CHECK:STDOUT:
  1695. // CHECK:STDOUT: fn @F() {
  1696. // CHECK:STDOUT: !entry:
  1697. // CHECK:STDOUT: name_binding_decl {
  1698. // CHECK:STDOUT: %c1.patt: %pattern_type.217 = binding_pattern c1 [concrete]
  1699. // CHECK:STDOUT: }
  1700. // CHECK:STDOUT: %Cpp.ref.loc8_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1701. // CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1702. // CHECK:STDOUT: %C.ref.loc8_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct.e73]
  1703. // CHECK:STDOUT: %.loc8_27.1: ref %C = temporary_storage
  1704. // CHECK:STDOUT: %addr.loc8_27.1: %ptr.d9e = addr_of %.loc8_27.1
  1705. // CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc8_27.1)
  1706. // CHECK:STDOUT: %.loc8_27.2: init %C = in_place_init %C__carbon_thunk.call.loc8, %.loc8_27.1
  1707. // CHECK:STDOUT: %.loc8_14: type = splice_block %C.ref.loc8_14 [concrete = constants.%C] {
  1708. // CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1709. // CHECK:STDOUT: %C.ref.loc8_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1710. // CHECK:STDOUT: }
  1711. // CHECK:STDOUT: %.loc8_27.3: ref %C = temporary %.loc8_27.1, %.loc8_27.2
  1712. // CHECK:STDOUT: %.loc8_27.4: %C = bind_value %.loc8_27.3
  1713. // CHECK:STDOUT: %c1: %C = bind_name c1, %.loc8_27.4
  1714. // CHECK:STDOUT: name_binding_decl {
  1715. // CHECK:STDOUT: %c2.patt: %pattern_type.217 = binding_pattern c2 [concrete]
  1716. // CHECK:STDOUT: }
  1717. // CHECK:STDOUT: %Cpp.ref.loc9_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1718. // CHECK:STDOUT: %C.ref.loc9_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1719. // CHECK:STDOUT: %C.ref.loc9_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct.e73]
  1720. // CHECK:STDOUT: %.loc9_27.1: ref %C = temporary_storage
  1721. // CHECK:STDOUT: %addr.loc9_27.1: %ptr.d9e = addr_of %.loc9_27.1
  1722. // CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc9_27.1)
  1723. // CHECK:STDOUT: %.loc9_27.2: init %C = in_place_init %C__carbon_thunk.call.loc9, %.loc9_27.1
  1724. // CHECK:STDOUT: %.loc9_14: type = splice_block %C.ref.loc9_14 [concrete = constants.%C] {
  1725. // CHECK:STDOUT: %Cpp.ref.loc9_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1726. // CHECK:STDOUT: %C.ref.loc9_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1727. // CHECK:STDOUT: }
  1728. // CHECK:STDOUT: %.loc9_27.3: ref %C = temporary %.loc9_27.1, %.loc9_27.2
  1729. // CHECK:STDOUT: %.loc9_27.4: %C = bind_value %.loc9_27.3
  1730. // CHECK:STDOUT: %c2: %C = bind_name c2, %.loc9_27.4
  1731. // CHECK:STDOUT: name_binding_decl {
  1732. // CHECK:STDOUT: %c3.patt: %pattern_type.217 = binding_pattern c3 [concrete]
  1733. // CHECK:STDOUT: }
  1734. // CHECK:STDOUT: %c1.ref.loc10: %C = name_ref c1, %c1
  1735. // CHECK:STDOUT: %c2.ref: %C = name_ref c2, %c2
  1736. // CHECK:STDOUT: %.loc10_22.1: ref %C = temporary_storage
  1737. // CHECK:STDOUT: %.loc10_19: ref %C = value_as_ref %c1.ref.loc10
  1738. // CHECK:STDOUT: %addr.loc10_22.1: %ptr.d9e = addr_of %.loc10_19
  1739. // CHECK:STDOUT: %.loc10_24: ref %C = value_as_ref %c2.ref
  1740. // CHECK:STDOUT: %addr.loc10_22.2: %ptr.d9e = addr_of %.loc10_24
  1741. // CHECK:STDOUT: %addr.loc10_22.3: %ptr.d9e = addr_of %.loc10_22.1
  1742. // CHECK:STDOUT: %operator+__carbon_thunk.call.loc10: init %empty_tuple.type = call imports.%operator+__carbon_thunk.decl(%addr.loc10_22.1, %addr.loc10_22.2, %addr.loc10_22.3)
  1743. // CHECK:STDOUT: %.loc10_22.2: init %C = in_place_init %operator+__carbon_thunk.call.loc10, %.loc10_22.1
  1744. // CHECK:STDOUT: %.loc10_14: type = splice_block %C.ref.loc10 [concrete = constants.%C] {
  1745. // CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1746. // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1747. // CHECK:STDOUT: }
  1748. // CHECK:STDOUT: %.loc10_22.3: ref %C = temporary %.loc10_22.1, %.loc10_22.2
  1749. // CHECK:STDOUT: %.loc10_22.4: %C = bind_value %.loc10_22.3
  1750. // CHECK:STDOUT: %c3: %C = bind_name c3, %.loc10_22.4
  1751. // CHECK:STDOUT: name_binding_decl {
  1752. // CHECK:STDOUT: %c4.patt: %pattern_type.217 = binding_pattern c4 [concrete]
  1753. // CHECK:STDOUT: }
  1754. // CHECK:STDOUT: %c1.ref.loc11: %C = name_ref c1, %c1
  1755. // CHECK:STDOUT: %c3.ref.loc11: %C = name_ref c3, %c3
  1756. // CHECK:STDOUT: %.loc11_22.1: ref %C = temporary_storage
  1757. // CHECK:STDOUT: %.loc11_19: ref %C = value_as_ref %c1.ref.loc11
  1758. // CHECK:STDOUT: %addr.loc11_22.1: %ptr.d9e = addr_of %.loc11_19
  1759. // CHECK:STDOUT: %.loc11_24: ref %C = value_as_ref %c3.ref.loc11
  1760. // CHECK:STDOUT: %addr.loc11_22.2: %ptr.d9e = addr_of %.loc11_24
  1761. // CHECK:STDOUT: %addr.loc11_22.3: %ptr.d9e = addr_of %.loc11_22.1
  1762. // CHECK:STDOUT: %operator+__carbon_thunk.call.loc11: init %empty_tuple.type = call imports.%operator+__carbon_thunk.decl(%addr.loc11_22.1, %addr.loc11_22.2, %addr.loc11_22.3)
  1763. // CHECK:STDOUT: %.loc11_22.2: init %C = in_place_init %operator+__carbon_thunk.call.loc11, %.loc11_22.1
  1764. // CHECK:STDOUT: %.loc11_14: type = splice_block %C.ref.loc11 [concrete = constants.%C] {
  1765. // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1766. // CHECK:STDOUT: %C.ref.loc11: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1767. // CHECK:STDOUT: }
  1768. // CHECK:STDOUT: %.loc11_22.3: ref %C = temporary %.loc11_22.1, %.loc11_22.2
  1769. // CHECK:STDOUT: %.loc11_22.4: %C = bind_value %.loc11_22.3
  1770. // CHECK:STDOUT: %c4: %C = bind_name c4, %.loc11_22.4
  1771. // CHECK:STDOUT: name_binding_decl {
  1772. // CHECK:STDOUT: %c5.patt: %pattern_type.217 = binding_pattern c5 [concrete]
  1773. // CHECK:STDOUT: }
  1774. // CHECK:STDOUT: %c4.ref: %C = name_ref c4, %c4
  1775. // CHECK:STDOUT: %c3.ref.loc12: %C = name_ref c3, %c3
  1776. // CHECK:STDOUT: %.loc12_22.1: ref %C = temporary_storage
  1777. // CHECK:STDOUT: %.loc12_19: ref %C = value_as_ref %c4.ref
  1778. // CHECK:STDOUT: %addr.loc12_22.1: %ptr.d9e = addr_of %.loc12_19
  1779. // CHECK:STDOUT: %.loc12_24: ref %C = value_as_ref %c3.ref.loc12
  1780. // CHECK:STDOUT: %addr.loc12_22.2: %ptr.d9e = addr_of %.loc12_24
  1781. // CHECK:STDOUT: %addr.loc12_22.3: %ptr.d9e = addr_of %.loc12_22.1
  1782. // CHECK:STDOUT: %operator+__carbon_thunk.call.loc12: init %empty_tuple.type = call imports.%operator+__carbon_thunk.decl(%addr.loc12_22.1, %addr.loc12_22.2, %addr.loc12_22.3)
  1783. // CHECK:STDOUT: %.loc12_22.2: init %C = in_place_init %operator+__carbon_thunk.call.loc12, %.loc12_22.1
  1784. // CHECK:STDOUT: %.loc12_14: type = splice_block %C.ref.loc12 [concrete = constants.%C] {
  1785. // CHECK:STDOUT: %Cpp.ref.loc12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1786. // CHECK:STDOUT: %C.ref.loc12: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1787. // CHECK:STDOUT: }
  1788. // CHECK:STDOUT: %.loc12_22.3: ref %C = temporary %.loc12_22.1, %.loc12_22.2
  1789. // CHECK:STDOUT: %.loc12_22.4: %C = bind_value %.loc12_22.3
  1790. // CHECK:STDOUT: %c5: %C = bind_name c5, %.loc12_22.4
  1791. // CHECK:STDOUT: %facet_value.loc12: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1792. // CHECK:STDOUT: %.loc12_22.5: %type_where = converted constants.%C, %facet_value.loc12 [concrete = constants.%facet_value]
  1793. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc12: <bound method> = bound_method %.loc12_22.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1794. // CHECK:STDOUT: <elided>
  1795. // CHECK:STDOUT: %bound_method.loc12: <bound method> = bound_method %.loc12_22.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1
  1796. // CHECK:STDOUT: %addr.loc12_22.4: %ptr.d9e = addr_of %.loc12_22.3
  1797. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc12: init %empty_tuple.type = call %bound_method.loc12(%addr.loc12_22.4)
  1798. // CHECK:STDOUT: %facet_value.loc11: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1799. // CHECK:STDOUT: %.loc11_22.5: %type_where = converted constants.%C, %facet_value.loc11 [concrete = constants.%facet_value]
  1800. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc11: <bound method> = bound_method %.loc11_22.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1801. // CHECK:STDOUT: <elided>
  1802. // CHECK:STDOUT: %bound_method.loc11: <bound method> = bound_method %.loc11_22.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2
  1803. // CHECK:STDOUT: %addr.loc11_22.4: %ptr.d9e = addr_of %.loc11_22.3
  1804. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc11: init %empty_tuple.type = call %bound_method.loc11(%addr.loc11_22.4)
  1805. // CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1806. // CHECK:STDOUT: %.loc10_22.5: %type_where = converted constants.%C, %facet_value.loc10 [concrete = constants.%facet_value]
  1807. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: <bound method> = bound_method %.loc10_22.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1808. // CHECK:STDOUT: <elided>
  1809. // CHECK:STDOUT: %bound_method.loc10: <bound method> = bound_method %.loc10_22.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3
  1810. // CHECK:STDOUT: %addr.loc10_22.4: %ptr.d9e = addr_of %.loc10_22.3
  1811. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_22.4)
  1812. // CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1813. // CHECK:STDOUT: %.loc9_27.5: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value]
  1814. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: <bound method> = bound_method %.loc9_27.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1815. // CHECK:STDOUT: <elided>
  1816. // CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_27.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.4
  1817. // CHECK:STDOUT: %addr.loc9_27.2: %ptr.d9e = addr_of %.loc9_27.3
  1818. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_27.2)
  1819. // CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1820. // CHECK:STDOUT: %.loc8_27.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value]
  1821. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: <bound method> = bound_method %.loc8_27.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  1822. // CHECK:STDOUT: <elided>
  1823. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %.loc8_27.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.5
  1824. // CHECK:STDOUT: %addr.loc8_27.2: %ptr.d9e = addr_of %.loc8_27.3
  1825. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_27.2)
  1826. // CHECK:STDOUT: <elided>
  1827. // CHECK:STDOUT: }
  1828. // CHECK:STDOUT:
  1829. // CHECK:STDOUT: --- import_single_namespace.carbon
  1830. // CHECK:STDOUT:
  1831. // CHECK:STDOUT: constants {
  1832. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1833. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  1834. // CHECK:STDOUT: %pattern_type.69f: type = pattern_type %C [concrete]
  1835. // CHECK:STDOUT: %.169: type = cpp_overload_set_type @C__carbon_thunk [concrete]
  1836. // CHECK:STDOUT: %empty_struct.41c: %.169 = struct_value () [concrete]
  1837. // CHECK:STDOUT: %ptr.838: type = ptr_type %C [concrete]
  1838. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  1839. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  1840. // CHECK:STDOUT: %operator+__carbon_thunk.type: type = fn_type @operator+__carbon_thunk [concrete]
  1841. // CHECK:STDOUT: %operator+__carbon_thunk: %operator+__carbon_thunk.type = struct_value () [concrete]
  1842. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  1843. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  1844. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.523: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  1845. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.1f8: %AggregateT.as_type.as.Destroy.impl.Op.type.523 = struct_value () [concrete]
  1846. // CHECK:STDOUT: }
  1847. // CHECK:STDOUT:
  1848. // CHECK:STDOUT: imports {
  1849. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  1850. // CHECK:STDOUT: .N = %N
  1851. // CHECK:STDOUT: import Cpp//...
  1852. // CHECK:STDOUT: }
  1853. // CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
  1854. // CHECK:STDOUT: .C = %C.decl
  1855. // CHECK:STDOUT: import Cpp//...
  1856. // CHECK:STDOUT: }
  1857. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  1858. // CHECK:STDOUT: %.c52: %.169 = cpp_overload_set_value @C__carbon_thunk [concrete = constants.%empty_struct.41c]
  1859. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  1860. // CHECK:STDOUT: <elided>
  1861. // CHECK:STDOUT: } {
  1862. // CHECK:STDOUT: <elided>
  1863. // CHECK:STDOUT: }
  1864. // CHECK:STDOUT: %operator+__carbon_thunk.decl: %operator+__carbon_thunk.type = fn_decl @operator+__carbon_thunk [concrete = constants.%operator+__carbon_thunk] {
  1865. // CHECK:STDOUT: <elided>
  1866. // CHECK:STDOUT: } {
  1867. // CHECK:STDOUT: <elided>
  1868. // CHECK:STDOUT: }
  1869. // CHECK:STDOUT: }
  1870. // CHECK:STDOUT:
  1871. // CHECK:STDOUT: fn @F() {
  1872. // CHECK:STDOUT: !entry:
  1873. // CHECK:STDOUT: name_binding_decl {
  1874. // CHECK:STDOUT: %c1.patt: %pattern_type.69f = binding_pattern c1 [concrete]
  1875. // CHECK:STDOUT: }
  1876. // CHECK:STDOUT: %Cpp.ref.loc8_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1877. // CHECK:STDOUT: %N.ref.loc8_24: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  1878. // CHECK:STDOUT: %C.ref.loc8_26: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1879. // CHECK:STDOUT: %C.ref.loc8_28: %.169 = name_ref C, imports.%.c52 [concrete = constants.%empty_struct.41c]
  1880. // CHECK:STDOUT: %.loc8_31.1: ref %C = temporary_storage
  1881. // CHECK:STDOUT: %addr.loc8_31.1: %ptr.838 = addr_of %.loc8_31.1
  1882. // CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc8_31.1)
  1883. // CHECK:STDOUT: %.loc8_31.2: init %C = in_place_init %C__carbon_thunk.call.loc8, %.loc8_31.1
  1884. // CHECK:STDOUT: %.loc8_16: type = splice_block %C.ref.loc8_16 [concrete = constants.%C] {
  1885. // CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1886. // CHECK:STDOUT: %N.ref.loc8_14: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  1887. // CHECK:STDOUT: %C.ref.loc8_16: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1888. // CHECK:STDOUT: }
  1889. // CHECK:STDOUT: %.loc8_31.3: ref %C = temporary %.loc8_31.1, %.loc8_31.2
  1890. // CHECK:STDOUT: %.loc8_31.4: %C = bind_value %.loc8_31.3
  1891. // CHECK:STDOUT: %c1: %C = bind_name c1, %.loc8_31.4
  1892. // CHECK:STDOUT: name_binding_decl {
  1893. // CHECK:STDOUT: %c2.patt: %pattern_type.69f = binding_pattern c2 [concrete]
  1894. // CHECK:STDOUT: }
  1895. // CHECK:STDOUT: %Cpp.ref.loc9_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1896. // CHECK:STDOUT: %N.ref.loc9_24: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  1897. // CHECK:STDOUT: %C.ref.loc9_26: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1898. // CHECK:STDOUT: %C.ref.loc9_28: %.169 = name_ref C, imports.%.c52 [concrete = constants.%empty_struct.41c]
  1899. // CHECK:STDOUT: %.loc9_31.1: ref %C = temporary_storage
  1900. // CHECK:STDOUT: %addr.loc9_31.1: %ptr.838 = addr_of %.loc9_31.1
  1901. // CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc9_31.1)
  1902. // CHECK:STDOUT: %.loc9_31.2: init %C = in_place_init %C__carbon_thunk.call.loc9, %.loc9_31.1
  1903. // CHECK:STDOUT: %.loc9_16: type = splice_block %C.ref.loc9_16 [concrete = constants.%C] {
  1904. // CHECK:STDOUT: %Cpp.ref.loc9_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1905. // CHECK:STDOUT: %N.ref.loc9_14: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  1906. // CHECK:STDOUT: %C.ref.loc9_16: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1907. // CHECK:STDOUT: }
  1908. // CHECK:STDOUT: %.loc9_31.3: ref %C = temporary %.loc9_31.1, %.loc9_31.2
  1909. // CHECK:STDOUT: %.loc9_31.4: %C = bind_value %.loc9_31.3
  1910. // CHECK:STDOUT: %c2: %C = bind_name c2, %.loc9_31.4
  1911. // CHECK:STDOUT: name_binding_decl {
  1912. // CHECK:STDOUT: %c3.patt: %pattern_type.69f = binding_pattern c3 [concrete]
  1913. // CHECK:STDOUT: }
  1914. // CHECK:STDOUT: %c1.ref: %C = name_ref c1, %c1
  1915. // CHECK:STDOUT: %c2.ref: %C = name_ref c2, %c2
  1916. // CHECK:STDOUT: %.loc10_24.1: ref %C = temporary_storage
  1917. // CHECK:STDOUT: %.loc10_21: ref %C = value_as_ref %c1.ref
  1918. // CHECK:STDOUT: %addr.loc10_24.1: %ptr.838 = addr_of %.loc10_21
  1919. // CHECK:STDOUT: %.loc10_26: ref %C = value_as_ref %c2.ref
  1920. // CHECK:STDOUT: %addr.loc10_24.2: %ptr.838 = addr_of %.loc10_26
  1921. // CHECK:STDOUT: %addr.loc10_24.3: %ptr.838 = addr_of %.loc10_24.1
  1922. // CHECK:STDOUT: %operator+__carbon_thunk.call: init %empty_tuple.type = call imports.%operator+__carbon_thunk.decl(%addr.loc10_24.1, %addr.loc10_24.2, %addr.loc10_24.3)
  1923. // CHECK:STDOUT: %.loc10_24.2: init %C = in_place_init %operator+__carbon_thunk.call, %.loc10_24.1
  1924. // CHECK:STDOUT: %.loc10_16: type = splice_block %C.ref.loc10 [concrete = constants.%C] {
  1925. // CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1926. // CHECK:STDOUT: %N.ref.loc10: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  1927. // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  1928. // CHECK:STDOUT: }
  1929. // CHECK:STDOUT: %.loc10_24.3: ref %C = temporary %.loc10_24.1, %.loc10_24.2
  1930. // CHECK:STDOUT: %.loc10_24.4: %C = bind_value %.loc10_24.3
  1931. // CHECK:STDOUT: %c3: %C = bind_name c3, %.loc10_24.4
  1932. // CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1933. // CHECK:STDOUT: %.loc10_24.5: %type_where = converted constants.%C, %facet_value.loc10 [concrete = constants.%facet_value]
  1934. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: <bound method> = bound_method %.loc10_24.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.1f8
  1935. // CHECK:STDOUT: <elided>
  1936. // CHECK:STDOUT: %bound_method.loc10: <bound method> = bound_method %.loc10_24.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1
  1937. // CHECK:STDOUT: %addr.loc10_24.4: %ptr.838 = addr_of %.loc10_24.3
  1938. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_24.4)
  1939. // CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1940. // CHECK:STDOUT: %.loc9_31.5: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value]
  1941. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: <bound method> = bound_method %.loc9_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.1f8
  1942. // CHECK:STDOUT: <elided>
  1943. // CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2
  1944. // CHECK:STDOUT: %addr.loc9_31.2: %ptr.838 = addr_of %.loc9_31.3
  1945. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_31.2)
  1946. // CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  1947. // CHECK:STDOUT: %.loc8_31.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value]
  1948. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: <bound method> = bound_method %.loc8_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.1f8
  1949. // CHECK:STDOUT: <elided>
  1950. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %.loc8_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3
  1951. // CHECK:STDOUT: %addr.loc8_31.2: %ptr.838 = addr_of %.loc8_31.3
  1952. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_31.2)
  1953. // CHECK:STDOUT: <elided>
  1954. // CHECK:STDOUT: }
  1955. // CHECK:STDOUT:
  1956. // CHECK:STDOUT: --- import_multiple_namespaces.carbon
  1957. // CHECK:STDOUT:
  1958. // CHECK:STDOUT: constants {
  1959. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1960. // CHECK:STDOUT: %C1: type = class_type @C1 [concrete]
  1961. // CHECK:STDOUT: %pattern_type.20f: type = pattern_type %C1 [concrete]
  1962. // CHECK:STDOUT: %.eb7: type = cpp_overload_set_type @C2__carbon_thunk [concrete]
  1963. // CHECK:STDOUT: %empty_struct.56f: %.eb7 = struct_value () [concrete]
  1964. // CHECK:STDOUT: %ptr.087: type = ptr_type %C1 [concrete]
  1965. // CHECK:STDOUT: %C1__carbon_thunk.type: type = fn_type @C1__carbon_thunk [concrete]
  1966. // CHECK:STDOUT: %C1__carbon_thunk: %C1__carbon_thunk.type = struct_value () [concrete]
  1967. // CHECK:STDOUT: %C2: type = class_type @C2 [concrete]
  1968. // CHECK:STDOUT: %pattern_type.846: type = pattern_type %C2 [concrete]
  1969. // CHECK:STDOUT: %.74f: type = cpp_overload_set_type @cpp_operator.1 [concrete]
  1970. // CHECK:STDOUT: %empty_struct.c81: %.74f = struct_value () [concrete]
  1971. // CHECK:STDOUT: %ptr.51f: type = ptr_type %C2 [concrete]
  1972. // CHECK:STDOUT: %C2__carbon_thunk.type: type = fn_type @C2__carbon_thunk [concrete]
  1973. // CHECK:STDOUT: %C2__carbon_thunk: %C2__carbon_thunk.type = struct_value () [concrete]
  1974. // CHECK:STDOUT: %operator+__carbon_thunk.type: type = fn_type @operator+__carbon_thunk [concrete]
  1975. // CHECK:STDOUT: %operator+__carbon_thunk: %operator+__carbon_thunk.type = struct_value () [concrete]
  1976. // CHECK:STDOUT: %operator-__carbon_thunk.type: type = fn_type @operator-__carbon_thunk [concrete]
  1977. // CHECK:STDOUT: %operator-__carbon_thunk: %operator-__carbon_thunk.type = struct_value () [concrete]
  1978. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  1979. // CHECK:STDOUT: %facet_value.d7a: %type_where = facet_value %C2, () [concrete]
  1980. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.cd3: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.d7a) [concrete]
  1981. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.5ee: %AggregateT.as_type.as.Destroy.impl.Op.type.cd3 = struct_value () [concrete]
  1982. // CHECK:STDOUT: %facet_value.e5d: %type_where = facet_value %C1, () [concrete]
  1983. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.26c: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value.e5d) [concrete]
  1984. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.176: %AggregateT.as_type.as.Destroy.impl.Op.type.26c = struct_value () [concrete]
  1985. // CHECK:STDOUT: }
  1986. // CHECK:STDOUT:
  1987. // CHECK:STDOUT: imports {
  1988. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  1989. // CHECK:STDOUT: .N1 = %N1
  1990. // CHECK:STDOUT: .N2 = %N2
  1991. // CHECK:STDOUT: import Cpp//...
  1992. // CHECK:STDOUT: }
  1993. // CHECK:STDOUT: %N1: <namespace> = namespace [concrete] {
  1994. // CHECK:STDOUT: .C1 = %C1.decl
  1995. // CHECK:STDOUT: import Cpp//...
  1996. // CHECK:STDOUT: }
  1997. // CHECK:STDOUT: %C1.decl: type = class_decl @C1 [concrete = constants.%C1] {} {}
  1998. // CHECK:STDOUT: %.91f: %.eb7 = cpp_overload_set_value @C2__carbon_thunk [concrete = constants.%empty_struct.56f]
  1999. // CHECK:STDOUT: %C1__carbon_thunk.decl: %C1__carbon_thunk.type = fn_decl @C1__carbon_thunk [concrete = constants.%C1__carbon_thunk] {
  2000. // CHECK:STDOUT: <elided>
  2001. // CHECK:STDOUT: } {
  2002. // CHECK:STDOUT: <elided>
  2003. // CHECK:STDOUT: }
  2004. // CHECK:STDOUT: %N2: <namespace> = namespace [concrete] {
  2005. // CHECK:STDOUT: .C2 = %C2.decl
  2006. // CHECK:STDOUT: import Cpp//...
  2007. // CHECK:STDOUT: }
  2008. // CHECK:STDOUT: %C2.decl: type = class_decl @C2 [concrete = constants.%C2] {} {}
  2009. // CHECK:STDOUT: %.ed5: %.74f = cpp_overload_set_value @cpp_operator.1 [concrete = constants.%empty_struct.c81]
  2010. // CHECK:STDOUT: %C2__carbon_thunk.decl: %C2__carbon_thunk.type = fn_decl @C2__carbon_thunk [concrete = constants.%C2__carbon_thunk] {
  2011. // CHECK:STDOUT: <elided>
  2012. // CHECK:STDOUT: } {
  2013. // CHECK:STDOUT: <elided>
  2014. // CHECK:STDOUT: }
  2015. // CHECK:STDOUT: %operator+__carbon_thunk.decl: %operator+__carbon_thunk.type = fn_decl @operator+__carbon_thunk [concrete = constants.%operator+__carbon_thunk] {
  2016. // CHECK:STDOUT: <elided>
  2017. // CHECK:STDOUT: } {
  2018. // CHECK:STDOUT: <elided>
  2019. // CHECK:STDOUT: }
  2020. // CHECK:STDOUT: %operator-__carbon_thunk.decl: %operator-__carbon_thunk.type = fn_decl @operator-__carbon_thunk [concrete = constants.%operator-__carbon_thunk] {
  2021. // CHECK:STDOUT: <elided>
  2022. // CHECK:STDOUT: } {
  2023. // CHECK:STDOUT: <elided>
  2024. // CHECK:STDOUT: }
  2025. // CHECK:STDOUT: }
  2026. // CHECK:STDOUT:
  2027. // CHECK:STDOUT: fn @F() {
  2028. // CHECK:STDOUT: !entry:
  2029. // CHECK:STDOUT: name_binding_decl {
  2030. // CHECK:STDOUT: %c1.patt: %pattern_type.20f = binding_pattern c1 [concrete]
  2031. // CHECK:STDOUT: }
  2032. // CHECK:STDOUT: %Cpp.ref.loc8_23: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2033. // CHECK:STDOUT: %N1.ref.loc8_26: <namespace> = name_ref N1, imports.%N1 [concrete = imports.%N1]
  2034. // CHECK:STDOUT: %C1.ref.loc8_29: type = name_ref C1, imports.%C1.decl [concrete = constants.%C1]
  2035. // CHECK:STDOUT: %C1.ref.loc8_32: %.eb7 = name_ref C1, imports.%.91f [concrete = constants.%empty_struct.56f]
  2036. // CHECK:STDOUT: %.loc8_36.1: ref %C1 = temporary_storage
  2037. // CHECK:STDOUT: %addr.loc8_36.1: %ptr.087 = addr_of %.loc8_36.1
  2038. // CHECK:STDOUT: %C1__carbon_thunk.call: init %empty_tuple.type = call imports.%C1__carbon_thunk.decl(%addr.loc8_36.1)
  2039. // CHECK:STDOUT: %.loc8_36.2: init %C1 = in_place_init %C1__carbon_thunk.call, %.loc8_36.1
  2040. // CHECK:STDOUT: %.loc8_17: type = splice_block %C1.ref.loc8_17 [concrete = constants.%C1] {
  2041. // CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2042. // CHECK:STDOUT: %N1.ref.loc8_14: <namespace> = name_ref N1, imports.%N1 [concrete = imports.%N1]
  2043. // CHECK:STDOUT: %C1.ref.loc8_17: type = name_ref C1, imports.%C1.decl [concrete = constants.%C1]
  2044. // CHECK:STDOUT: }
  2045. // CHECK:STDOUT: %.loc8_36.3: ref %C1 = temporary %.loc8_36.1, %.loc8_36.2
  2046. // CHECK:STDOUT: %.loc8_36.4: %C1 = bind_value %.loc8_36.3
  2047. // CHECK:STDOUT: %c1: %C1 = bind_name c1, %.loc8_36.4
  2048. // CHECK:STDOUT: name_binding_decl {
  2049. // CHECK:STDOUT: %c2.patt: %pattern_type.846 = binding_pattern c2 [concrete]
  2050. // CHECK:STDOUT: }
  2051. // CHECK:STDOUT: %Cpp.ref.loc9_23: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2052. // CHECK:STDOUT: %N2.ref.loc9_26: <namespace> = name_ref N2, imports.%N2 [concrete = imports.%N2]
  2053. // CHECK:STDOUT: %C2.ref.loc9_29: type = name_ref C2, imports.%C2.decl [concrete = constants.%C2]
  2054. // CHECK:STDOUT: %C2.ref.loc9_32: %.74f = name_ref C2, imports.%.ed5 [concrete = constants.%empty_struct.c81]
  2055. // CHECK:STDOUT: %.loc9_36.1: ref %C2 = temporary_storage
  2056. // CHECK:STDOUT: %addr.loc9_36.1: %ptr.51f = addr_of %.loc9_36.1
  2057. // CHECK:STDOUT: %C2__carbon_thunk.call: init %empty_tuple.type = call imports.%C2__carbon_thunk.decl(%addr.loc9_36.1)
  2058. // CHECK:STDOUT: %.loc9_36.2: init %C2 = in_place_init %C2__carbon_thunk.call, %.loc9_36.1
  2059. // CHECK:STDOUT: %.loc9_17: type = splice_block %C2.ref.loc9_17 [concrete = constants.%C2] {
  2060. // CHECK:STDOUT: %Cpp.ref.loc9_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2061. // CHECK:STDOUT: %N2.ref.loc9_14: <namespace> = name_ref N2, imports.%N2 [concrete = imports.%N2]
  2062. // CHECK:STDOUT: %C2.ref.loc9_17: type = name_ref C2, imports.%C2.decl [concrete = constants.%C2]
  2063. // CHECK:STDOUT: }
  2064. // CHECK:STDOUT: %.loc9_36.3: ref %C2 = temporary %.loc9_36.1, %.loc9_36.2
  2065. // CHECK:STDOUT: %.loc9_36.4: %C2 = bind_value %.loc9_36.3
  2066. // CHECK:STDOUT: %c2: %C2 = bind_name c2, %.loc9_36.4
  2067. // CHECK:STDOUT: name_binding_decl {
  2068. // CHECK:STDOUT: %c3.patt: %pattern_type.846 = binding_pattern c3 [concrete]
  2069. // CHECK:STDOUT: }
  2070. // CHECK:STDOUT: %c1.ref.loc10: %C1 = name_ref c1, %c1
  2071. // CHECK:STDOUT: %c2.ref.loc10: %C2 = name_ref c2, %c2
  2072. // CHECK:STDOUT: %.loc10_26.1: ref %C2 = temporary_storage
  2073. // CHECK:STDOUT: %.loc10_23: ref %C1 = value_as_ref %c1.ref.loc10
  2074. // CHECK:STDOUT: %addr.loc10_26.1: %ptr.087 = addr_of %.loc10_23
  2075. // CHECK:STDOUT: %.loc10_28: ref %C2 = value_as_ref %c2.ref.loc10
  2076. // CHECK:STDOUT: %addr.loc10_26.2: %ptr.51f = addr_of %.loc10_28
  2077. // CHECK:STDOUT: %addr.loc10_26.3: %ptr.51f = addr_of %.loc10_26.1
  2078. // CHECK:STDOUT: %operator+__carbon_thunk.call: init %empty_tuple.type = call imports.%operator+__carbon_thunk.decl(%addr.loc10_26.1, %addr.loc10_26.2, %addr.loc10_26.3)
  2079. // CHECK:STDOUT: %.loc10_26.2: init %C2 = in_place_init %operator+__carbon_thunk.call, %.loc10_26.1
  2080. // CHECK:STDOUT: %.loc10_17: type = splice_block %C2.ref.loc10 [concrete = constants.%C2] {
  2081. // CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2082. // CHECK:STDOUT: %N2.ref.loc10: <namespace> = name_ref N2, imports.%N2 [concrete = imports.%N2]
  2083. // CHECK:STDOUT: %C2.ref.loc10: type = name_ref C2, imports.%C2.decl [concrete = constants.%C2]
  2084. // CHECK:STDOUT: }
  2085. // CHECK:STDOUT: %.loc10_26.3: ref %C2 = temporary %.loc10_26.1, %.loc10_26.2
  2086. // CHECK:STDOUT: %.loc10_26.4: %C2 = bind_value %.loc10_26.3
  2087. // CHECK:STDOUT: %c3: %C2 = bind_name c3, %.loc10_26.4
  2088. // CHECK:STDOUT: name_binding_decl {
  2089. // CHECK:STDOUT: %c4.patt: %pattern_type.846 = binding_pattern c4 [concrete]
  2090. // CHECK:STDOUT: }
  2091. // CHECK:STDOUT: %c2.ref.loc11: %C2 = name_ref c2, %c2
  2092. // CHECK:STDOUT: %c1.ref.loc11: %C1 = name_ref c1, %c1
  2093. // CHECK:STDOUT: %.loc11_26.1: ref %C2 = temporary_storage
  2094. // CHECK:STDOUT: %.loc11_23: ref %C2 = value_as_ref %c2.ref.loc11
  2095. // CHECK:STDOUT: %addr.loc11_26.1: %ptr.51f = addr_of %.loc11_23
  2096. // CHECK:STDOUT: %.loc11_28: ref %C1 = value_as_ref %c1.ref.loc11
  2097. // CHECK:STDOUT: %addr.loc11_26.2: %ptr.087 = addr_of %.loc11_28
  2098. // CHECK:STDOUT: %addr.loc11_26.3: %ptr.51f = addr_of %.loc11_26.1
  2099. // CHECK:STDOUT: %operator-__carbon_thunk.call: init %empty_tuple.type = call imports.%operator-__carbon_thunk.decl(%addr.loc11_26.1, %addr.loc11_26.2, %addr.loc11_26.3)
  2100. // CHECK:STDOUT: %.loc11_26.2: init %C2 = in_place_init %operator-__carbon_thunk.call, %.loc11_26.1
  2101. // CHECK:STDOUT: %.loc11_17: type = splice_block %C2.ref.loc11 [concrete = constants.%C2] {
  2102. // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2103. // CHECK:STDOUT: %N2.ref.loc11: <namespace> = name_ref N2, imports.%N2 [concrete = imports.%N2]
  2104. // CHECK:STDOUT: %C2.ref.loc11: type = name_ref C2, imports.%C2.decl [concrete = constants.%C2]
  2105. // CHECK:STDOUT: }
  2106. // CHECK:STDOUT: %.loc11_26.3: ref %C2 = temporary %.loc11_26.1, %.loc11_26.2
  2107. // CHECK:STDOUT: %.loc11_26.4: %C2 = bind_value %.loc11_26.3
  2108. // CHECK:STDOUT: %c4: %C2 = bind_name c4, %.loc11_26.4
  2109. // CHECK:STDOUT: %facet_value.loc11: %type_where = facet_value constants.%C2, () [concrete = constants.%facet_value.d7a]
  2110. // CHECK:STDOUT: %.loc11_26.5: %type_where = converted constants.%C2, %facet_value.loc11 [concrete = constants.%facet_value.d7a]
  2111. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc11: <bound method> = bound_method %.loc11_26.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.5ee
  2112. // CHECK:STDOUT: <elided>
  2113. // CHECK:STDOUT: %bound_method.loc11: <bound method> = bound_method %.loc11_26.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1
  2114. // CHECK:STDOUT: %addr.loc11_26.4: %ptr.51f = addr_of %.loc11_26.3
  2115. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc11: init %empty_tuple.type = call %bound_method.loc11(%addr.loc11_26.4)
  2116. // CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%C2, () [concrete = constants.%facet_value.d7a]
  2117. // CHECK:STDOUT: %.loc10_26.5: %type_where = converted constants.%C2, %facet_value.loc10 [concrete = constants.%facet_value.d7a]
  2118. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: <bound method> = bound_method %.loc10_26.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.5ee
  2119. // CHECK:STDOUT: <elided>
  2120. // CHECK:STDOUT: %bound_method.loc10: <bound method> = bound_method %.loc10_26.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2
  2121. // CHECK:STDOUT: %addr.loc10_26.4: %ptr.51f = addr_of %.loc10_26.3
  2122. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_26.4)
  2123. // CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C2, () [concrete = constants.%facet_value.d7a]
  2124. // CHECK:STDOUT: %.loc9_36.5: %type_where = converted constants.%C2, %facet_value.loc9 [concrete = constants.%facet_value.d7a]
  2125. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: <bound method> = bound_method %.loc9_36.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.5ee
  2126. // CHECK:STDOUT: <elided>
  2127. // CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_36.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3
  2128. // CHECK:STDOUT: %addr.loc9_36.2: %ptr.51f = addr_of %.loc9_36.3
  2129. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_36.2)
  2130. // CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C1, () [concrete = constants.%facet_value.e5d]
  2131. // CHECK:STDOUT: %.loc8_36.5: %type_where = converted constants.%C1, %facet_value.loc8 [concrete = constants.%facet_value.e5d]
  2132. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: <bound method> = bound_method %.loc8_36.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.176
  2133. // CHECK:STDOUT: <elided>
  2134. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %.loc8_36.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.4
  2135. // CHECK:STDOUT: %addr.loc8_36.2: %ptr.087 = addr_of %.loc8_36.3
  2136. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_36.2)
  2137. // CHECK:STDOUT: <elided>
  2138. // CHECK:STDOUT: }
  2139. // CHECK:STDOUT:
  2140. // CHECK:STDOUT: --- fail_todo_import_operands_in_namespace_operator_in_global.carbon
  2141. // CHECK:STDOUT:
  2142. // CHECK:STDOUT: constants {
  2143. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  2144. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  2145. // CHECK:STDOUT: %pattern_type.69f: type = pattern_type %C [concrete]
  2146. // CHECK:STDOUT: %.169: type = cpp_overload_set_type @C__carbon_thunk [concrete]
  2147. // CHECK:STDOUT: %empty_struct.41c: %.169 = struct_value () [concrete]
  2148. // CHECK:STDOUT: %ptr.838: type = ptr_type %C [concrete]
  2149. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  2150. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  2151. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  2152. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  2153. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.523: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  2154. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.1f8: %AggregateT.as_type.as.Destroy.impl.Op.type.523 = struct_value () [concrete]
  2155. // CHECK:STDOUT: }
  2156. // CHECK:STDOUT:
  2157. // CHECK:STDOUT: imports {
  2158. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  2159. // CHECK:STDOUT: .N = %N
  2160. // CHECK:STDOUT: import Cpp//...
  2161. // CHECK:STDOUT: }
  2162. // CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
  2163. // CHECK:STDOUT: .C = %C.decl
  2164. // CHECK:STDOUT: import Cpp//...
  2165. // CHECK:STDOUT: }
  2166. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  2167. // CHECK:STDOUT: %.c52: %.169 = cpp_overload_set_value @C__carbon_thunk [concrete = constants.%empty_struct.41c]
  2168. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  2169. // CHECK:STDOUT: <elided>
  2170. // CHECK:STDOUT: } {
  2171. // CHECK:STDOUT: <elided>
  2172. // CHECK:STDOUT: }
  2173. // CHECK:STDOUT: }
  2174. // CHECK:STDOUT:
  2175. // CHECK:STDOUT: fn @F() {
  2176. // CHECK:STDOUT: !entry:
  2177. // CHECK:STDOUT: name_binding_decl {
  2178. // CHECK:STDOUT: %c1.patt: %pattern_type.69f = binding_pattern c1 [concrete]
  2179. // CHECK:STDOUT: }
  2180. // CHECK:STDOUT: %Cpp.ref.loc8_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2181. // CHECK:STDOUT: %N.ref.loc8_24: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  2182. // CHECK:STDOUT: %C.ref.loc8_26: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2183. // CHECK:STDOUT: %C.ref.loc8_28: %.169 = name_ref C, imports.%.c52 [concrete = constants.%empty_struct.41c]
  2184. // CHECK:STDOUT: %.loc8_31.1: ref %C = temporary_storage
  2185. // CHECK:STDOUT: %addr.loc8_31.1: %ptr.838 = addr_of %.loc8_31.1
  2186. // CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc8_31.1)
  2187. // CHECK:STDOUT: %.loc8_31.2: init %C = in_place_init %C__carbon_thunk.call.loc8, %.loc8_31.1
  2188. // CHECK:STDOUT: %.loc8_16: type = splice_block %C.ref.loc8_16 [concrete = constants.%C] {
  2189. // CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2190. // CHECK:STDOUT: %N.ref.loc8_14: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  2191. // CHECK:STDOUT: %C.ref.loc8_16: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2192. // CHECK:STDOUT: }
  2193. // CHECK:STDOUT: %.loc8_31.3: ref %C = temporary %.loc8_31.1, %.loc8_31.2
  2194. // CHECK:STDOUT: %.loc8_31.4: %C = bind_value %.loc8_31.3
  2195. // CHECK:STDOUT: %c1: %C = bind_name c1, %.loc8_31.4
  2196. // CHECK:STDOUT: name_binding_decl {
  2197. // CHECK:STDOUT: %c2.patt: %pattern_type.69f = binding_pattern c2 [concrete]
  2198. // CHECK:STDOUT: }
  2199. // CHECK:STDOUT: %Cpp.ref.loc9_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2200. // CHECK:STDOUT: %N.ref.loc9_24: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  2201. // CHECK:STDOUT: %C.ref.loc9_26: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2202. // CHECK:STDOUT: %C.ref.loc9_28: %.169 = name_ref C, imports.%.c52 [concrete = constants.%empty_struct.41c]
  2203. // CHECK:STDOUT: %.loc9_31.1: ref %C = temporary_storage
  2204. // CHECK:STDOUT: %addr.loc9_31.1: %ptr.838 = addr_of %.loc9_31.1
  2205. // CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc9_31.1)
  2206. // CHECK:STDOUT: %.loc9_31.2: init %C = in_place_init %C__carbon_thunk.call.loc9, %.loc9_31.1
  2207. // CHECK:STDOUT: %.loc9_16: type = splice_block %C.ref.loc9_16 [concrete = constants.%C] {
  2208. // CHECK:STDOUT: %Cpp.ref.loc9_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2209. // CHECK:STDOUT: %N.ref.loc9_14: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  2210. // CHECK:STDOUT: %C.ref.loc9_16: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2211. // CHECK:STDOUT: }
  2212. // CHECK:STDOUT: %.loc9_31.3: ref %C = temporary %.loc9_31.1, %.loc9_31.2
  2213. // CHECK:STDOUT: %.loc9_31.4: %C = bind_value %.loc9_31.3
  2214. // CHECK:STDOUT: %c2: %C = bind_name c2, %.loc9_31.4
  2215. // CHECK:STDOUT: name_binding_decl {
  2216. // CHECK:STDOUT: %c3.patt: %pattern_type.69f = binding_pattern c3 [concrete]
  2217. // CHECK:STDOUT: }
  2218. // CHECK:STDOUT: %c1.ref: %C = name_ref c1, %c1
  2219. // CHECK:STDOUT: %c2.ref: %C = name_ref c2, %c2
  2220. // CHECK:STDOUT: %.loc17: type = splice_block %C.ref.loc17 [concrete = constants.%C] {
  2221. // CHECK:STDOUT: %Cpp.ref.loc17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2222. // CHECK:STDOUT: %N.ref.loc17: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  2223. // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2224. // CHECK:STDOUT: }
  2225. // CHECK:STDOUT: %c3: %C = bind_name c3, <error> [concrete = <error>]
  2226. // CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  2227. // CHECK:STDOUT: %.loc9_31.5: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value]
  2228. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: <bound method> = bound_method %.loc9_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.1f8
  2229. // CHECK:STDOUT: <elided>
  2230. // CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1
  2231. // CHECK:STDOUT: %addr.loc9_31.2: %ptr.838 = addr_of %.loc9_31.3
  2232. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_31.2)
  2233. // CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  2234. // CHECK:STDOUT: %.loc8_31.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value]
  2235. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: <bound method> = bound_method %.loc8_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.1f8
  2236. // CHECK:STDOUT: <elided>
  2237. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %.loc8_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2
  2238. // CHECK:STDOUT: %addr.loc8_31.2: %ptr.838 = addr_of %.loc8_31.3
  2239. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_31.2)
  2240. // CHECK:STDOUT: <elided>
  2241. // CHECK:STDOUT: }
  2242. // CHECK:STDOUT:
  2243. // CHECK:STDOUT: --- import_inner_class.carbon
  2244. // CHECK:STDOUT:
  2245. // CHECK:STDOUT: constants {
  2246. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  2247. // CHECK:STDOUT: %O: type = class_type @O [concrete]
  2248. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  2249. // CHECK:STDOUT: %pattern_type.b28: type = pattern_type %C [concrete]
  2250. // CHECK:STDOUT: %.d80: type = cpp_overload_set_type @C__carbon_thunk [concrete]
  2251. // CHECK:STDOUT: %empty_struct.06f: %.d80 = struct_value () [concrete]
  2252. // CHECK:STDOUT: %ptr.de2: type = ptr_type %C [concrete]
  2253. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  2254. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  2255. // CHECK:STDOUT: %operator+__carbon_thunk.type: type = fn_type @operator+__carbon_thunk [concrete]
  2256. // CHECK:STDOUT: %operator+__carbon_thunk: %operator+__carbon_thunk.type = struct_value () [concrete]
  2257. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  2258. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  2259. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fac: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  2260. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.0e1: %AggregateT.as_type.as.Destroy.impl.Op.type.fac = struct_value () [concrete]
  2261. // CHECK:STDOUT: }
  2262. // CHECK:STDOUT:
  2263. // CHECK:STDOUT: imports {
  2264. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  2265. // CHECK:STDOUT: .O = %O.decl
  2266. // CHECK:STDOUT: import Cpp//...
  2267. // CHECK:STDOUT: }
  2268. // CHECK:STDOUT: %O.decl: type = class_decl @O [concrete = constants.%O] {} {}
  2269. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  2270. // CHECK:STDOUT: %.7a9: %.d80 = cpp_overload_set_value @C__carbon_thunk [concrete = constants.%empty_struct.06f]
  2271. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  2272. // CHECK:STDOUT: <elided>
  2273. // CHECK:STDOUT: } {
  2274. // CHECK:STDOUT: <elided>
  2275. // CHECK:STDOUT: }
  2276. // CHECK:STDOUT: %operator+__carbon_thunk.decl: %operator+__carbon_thunk.type = fn_decl @operator+__carbon_thunk [concrete = constants.%operator+__carbon_thunk] {
  2277. // CHECK:STDOUT: <elided>
  2278. // CHECK:STDOUT: } {
  2279. // CHECK:STDOUT: <elided>
  2280. // CHECK:STDOUT: }
  2281. // CHECK:STDOUT: }
  2282. // CHECK:STDOUT:
  2283. // CHECK:STDOUT: fn @F() {
  2284. // CHECK:STDOUT: !entry:
  2285. // CHECK:STDOUT: name_binding_decl {
  2286. // CHECK:STDOUT: %c1.patt: %pattern_type.b28 = binding_pattern c1 [concrete]
  2287. // CHECK:STDOUT: }
  2288. // CHECK:STDOUT: %Cpp.ref.loc8_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2289. // CHECK:STDOUT: %O.ref.loc8_24: type = name_ref O, imports.%O.decl [concrete = constants.%O]
  2290. // CHECK:STDOUT: %C.ref.loc8_26: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2291. // CHECK:STDOUT: %C.ref.loc8_28: %.d80 = name_ref C, imports.%.7a9 [concrete = constants.%empty_struct.06f]
  2292. // CHECK:STDOUT: %.loc8_31.1: ref %C = temporary_storage
  2293. // CHECK:STDOUT: %addr.loc8_31.1: %ptr.de2 = addr_of %.loc8_31.1
  2294. // CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc8_31.1)
  2295. // CHECK:STDOUT: %.loc8_31.2: init %C = in_place_init %C__carbon_thunk.call.loc8, %.loc8_31.1
  2296. // CHECK:STDOUT: %.loc8_16: type = splice_block %C.ref.loc8_16 [concrete = constants.%C] {
  2297. // CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2298. // CHECK:STDOUT: %O.ref.loc8_14: type = name_ref O, imports.%O.decl [concrete = constants.%O]
  2299. // CHECK:STDOUT: %C.ref.loc8_16: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2300. // CHECK:STDOUT: }
  2301. // CHECK:STDOUT: %.loc8_31.3: ref %C = temporary %.loc8_31.1, %.loc8_31.2
  2302. // CHECK:STDOUT: %.loc8_31.4: %C = bind_value %.loc8_31.3
  2303. // CHECK:STDOUT: %c1: %C = bind_name c1, %.loc8_31.4
  2304. // CHECK:STDOUT: name_binding_decl {
  2305. // CHECK:STDOUT: %c2.patt: %pattern_type.b28 = binding_pattern c2 [concrete]
  2306. // CHECK:STDOUT: }
  2307. // CHECK:STDOUT: %Cpp.ref.loc9_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2308. // CHECK:STDOUT: %O.ref.loc9_24: type = name_ref O, imports.%O.decl [concrete = constants.%O]
  2309. // CHECK:STDOUT: %C.ref.loc9_26: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2310. // CHECK:STDOUT: %C.ref.loc9_28: %.d80 = name_ref C, imports.%.7a9 [concrete = constants.%empty_struct.06f]
  2311. // CHECK:STDOUT: %.loc9_31.1: ref %C = temporary_storage
  2312. // CHECK:STDOUT: %addr.loc9_31.1: %ptr.de2 = addr_of %.loc9_31.1
  2313. // CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc9_31.1)
  2314. // CHECK:STDOUT: %.loc9_31.2: init %C = in_place_init %C__carbon_thunk.call.loc9, %.loc9_31.1
  2315. // CHECK:STDOUT: %.loc9_16: type = splice_block %C.ref.loc9_16 [concrete = constants.%C] {
  2316. // CHECK:STDOUT: %Cpp.ref.loc9_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2317. // CHECK:STDOUT: %O.ref.loc9_14: type = name_ref O, imports.%O.decl [concrete = constants.%O]
  2318. // CHECK:STDOUT: %C.ref.loc9_16: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2319. // CHECK:STDOUT: }
  2320. // CHECK:STDOUT: %.loc9_31.3: ref %C = temporary %.loc9_31.1, %.loc9_31.2
  2321. // CHECK:STDOUT: %.loc9_31.4: %C = bind_value %.loc9_31.3
  2322. // CHECK:STDOUT: %c2: %C = bind_name c2, %.loc9_31.4
  2323. // CHECK:STDOUT: name_binding_decl {
  2324. // CHECK:STDOUT: %c3.patt: %pattern_type.b28 = binding_pattern c3 [concrete]
  2325. // CHECK:STDOUT: }
  2326. // CHECK:STDOUT: %c1.ref: %C = name_ref c1, %c1
  2327. // CHECK:STDOUT: %c2.ref: %C = name_ref c2, %c2
  2328. // CHECK:STDOUT: %.loc10_24.1: ref %C = temporary_storage
  2329. // CHECK:STDOUT: %.loc10_21: ref %C = value_as_ref %c1.ref
  2330. // CHECK:STDOUT: %addr.loc10_24.1: %ptr.de2 = addr_of %.loc10_21
  2331. // CHECK:STDOUT: %.loc10_26: ref %C = value_as_ref %c2.ref
  2332. // CHECK:STDOUT: %addr.loc10_24.2: %ptr.de2 = addr_of %.loc10_26
  2333. // CHECK:STDOUT: %addr.loc10_24.3: %ptr.de2 = addr_of %.loc10_24.1
  2334. // CHECK:STDOUT: %operator+__carbon_thunk.call: init %empty_tuple.type = call imports.%operator+__carbon_thunk.decl(%addr.loc10_24.1, %addr.loc10_24.2, %addr.loc10_24.3)
  2335. // CHECK:STDOUT: %.loc10_24.2: init %C = in_place_init %operator+__carbon_thunk.call, %.loc10_24.1
  2336. // CHECK:STDOUT: %.loc10_16: type = splice_block %C.ref.loc10 [concrete = constants.%C] {
  2337. // CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2338. // CHECK:STDOUT: %O.ref.loc10: type = name_ref O, imports.%O.decl [concrete = constants.%O]
  2339. // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2340. // CHECK:STDOUT: }
  2341. // CHECK:STDOUT: %.loc10_24.3: ref %C = temporary %.loc10_24.1, %.loc10_24.2
  2342. // CHECK:STDOUT: %.loc10_24.4: %C = bind_value %.loc10_24.3
  2343. // CHECK:STDOUT: %c3: %C = bind_name c3, %.loc10_24.4
  2344. // CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  2345. // CHECK:STDOUT: %.loc10_24.5: %type_where = converted constants.%C, %facet_value.loc10 [concrete = constants.%facet_value]
  2346. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: <bound method> = bound_method %.loc10_24.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.0e1
  2347. // CHECK:STDOUT: <elided>
  2348. // CHECK:STDOUT: %bound_method.loc10: <bound method> = bound_method %.loc10_24.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1
  2349. // CHECK:STDOUT: %addr.loc10_24.4: %ptr.de2 = addr_of %.loc10_24.3
  2350. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_24.4)
  2351. // CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  2352. // CHECK:STDOUT: %.loc9_31.5: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value]
  2353. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: <bound method> = bound_method %.loc9_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.0e1
  2354. // CHECK:STDOUT: <elided>
  2355. // CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2
  2356. // CHECK:STDOUT: %addr.loc9_31.2: %ptr.de2 = addr_of %.loc9_31.3
  2357. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_31.2)
  2358. // CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  2359. // CHECK:STDOUT: %.loc8_31.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value]
  2360. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: <bound method> = bound_method %.loc8_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.0e1
  2361. // CHECK:STDOUT: <elided>
  2362. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %.loc8_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3
  2363. // CHECK:STDOUT: %addr.loc8_31.2: %ptr.de2 = addr_of %.loc8_31.3
  2364. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_31.2)
  2365. // CHECK:STDOUT: <elided>
  2366. // CHECK:STDOUT: }
  2367. // CHECK:STDOUT:
  2368. // CHECK:STDOUT: --- import_inner_class_in_namespace.carbon
  2369. // CHECK:STDOUT:
  2370. // CHECK:STDOUT: constants {
  2371. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  2372. // CHECK:STDOUT: %O: type = class_type @O [concrete]
  2373. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  2374. // CHECK:STDOUT: %pattern_type.84b: type = pattern_type %C [concrete]
  2375. // CHECK:STDOUT: %.62f: type = cpp_overload_set_type @C__carbon_thunk [concrete]
  2376. // CHECK:STDOUT: %empty_struct.e94: %.62f = struct_value () [concrete]
  2377. // CHECK:STDOUT: %ptr.4b2: type = ptr_type %C [concrete]
  2378. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  2379. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  2380. // CHECK:STDOUT: %operator+__carbon_thunk.type: type = fn_type @operator+__carbon_thunk [concrete]
  2381. // CHECK:STDOUT: %operator+__carbon_thunk: %operator+__carbon_thunk.type = struct_value () [concrete]
  2382. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  2383. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  2384. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fda: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  2385. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.aaa: %AggregateT.as_type.as.Destroy.impl.Op.type.fda = struct_value () [concrete]
  2386. // CHECK:STDOUT: }
  2387. // CHECK:STDOUT:
  2388. // CHECK:STDOUT: imports {
  2389. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  2390. // CHECK:STDOUT: .N = %N
  2391. // CHECK:STDOUT: import Cpp//...
  2392. // CHECK:STDOUT: }
  2393. // CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
  2394. // CHECK:STDOUT: .O = %O.decl
  2395. // CHECK:STDOUT: import Cpp//...
  2396. // CHECK:STDOUT: }
  2397. // CHECK:STDOUT: %O.decl: type = class_decl @O [concrete = constants.%O] {} {}
  2398. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  2399. // CHECK:STDOUT: %.f56: %.62f = cpp_overload_set_value @C__carbon_thunk [concrete = constants.%empty_struct.e94]
  2400. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  2401. // CHECK:STDOUT: <elided>
  2402. // CHECK:STDOUT: } {
  2403. // CHECK:STDOUT: <elided>
  2404. // CHECK:STDOUT: }
  2405. // CHECK:STDOUT: %operator+__carbon_thunk.decl: %operator+__carbon_thunk.type = fn_decl @operator+__carbon_thunk [concrete = constants.%operator+__carbon_thunk] {
  2406. // CHECK:STDOUT: <elided>
  2407. // CHECK:STDOUT: } {
  2408. // CHECK:STDOUT: <elided>
  2409. // CHECK:STDOUT: }
  2410. // CHECK:STDOUT: }
  2411. // CHECK:STDOUT:
  2412. // CHECK:STDOUT: fn @F() {
  2413. // CHECK:STDOUT: !entry:
  2414. // CHECK:STDOUT: name_binding_decl {
  2415. // CHECK:STDOUT: %c1.patt: %pattern_type.84b = binding_pattern c1 [concrete]
  2416. // CHECK:STDOUT: }
  2417. // CHECK:STDOUT: %Cpp.ref.loc8_23: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2418. // CHECK:STDOUT: %N.ref.loc8_26: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  2419. // CHECK:STDOUT: %O.ref.loc8_28: type = name_ref O, imports.%O.decl [concrete = constants.%O]
  2420. // CHECK:STDOUT: %C.ref.loc8_30: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2421. // CHECK:STDOUT: %C.ref.loc8_32: %.62f = name_ref C, imports.%.f56 [concrete = constants.%empty_struct.e94]
  2422. // CHECK:STDOUT: %.loc8_35.1: ref %C = temporary_storage
  2423. // CHECK:STDOUT: %addr.loc8_35.1: %ptr.4b2 = addr_of %.loc8_35.1
  2424. // CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc8_35.1)
  2425. // CHECK:STDOUT: %.loc8_35.2: init %C = in_place_init %C__carbon_thunk.call.loc8, %.loc8_35.1
  2426. // CHECK:STDOUT: %.loc8_18: type = splice_block %C.ref.loc8_18 [concrete = constants.%C] {
  2427. // CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2428. // CHECK:STDOUT: %N.ref.loc8_14: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  2429. // CHECK:STDOUT: %O.ref.loc8_16: type = name_ref O, imports.%O.decl [concrete = constants.%O]
  2430. // CHECK:STDOUT: %C.ref.loc8_18: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2431. // CHECK:STDOUT: }
  2432. // CHECK:STDOUT: %.loc8_35.3: ref %C = temporary %.loc8_35.1, %.loc8_35.2
  2433. // CHECK:STDOUT: %.loc8_35.4: %C = bind_value %.loc8_35.3
  2434. // CHECK:STDOUT: %c1: %C = bind_name c1, %.loc8_35.4
  2435. // CHECK:STDOUT: name_binding_decl {
  2436. // CHECK:STDOUT: %c2.patt: %pattern_type.84b = binding_pattern c2 [concrete]
  2437. // CHECK:STDOUT: }
  2438. // CHECK:STDOUT: %Cpp.ref.loc9_23: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2439. // CHECK:STDOUT: %N.ref.loc9_26: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  2440. // CHECK:STDOUT: %O.ref.loc9_28: type = name_ref O, imports.%O.decl [concrete = constants.%O]
  2441. // CHECK:STDOUT: %C.ref.loc9_30: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2442. // CHECK:STDOUT: %C.ref.loc9_32: %.62f = name_ref C, imports.%.f56 [concrete = constants.%empty_struct.e94]
  2443. // CHECK:STDOUT: %.loc9_35.1: ref %C = temporary_storage
  2444. // CHECK:STDOUT: %addr.loc9_35.1: %ptr.4b2 = addr_of %.loc9_35.1
  2445. // CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc9_35.1)
  2446. // CHECK:STDOUT: %.loc9_35.2: init %C = in_place_init %C__carbon_thunk.call.loc9, %.loc9_35.1
  2447. // CHECK:STDOUT: %.loc9_18: type = splice_block %C.ref.loc9_18 [concrete = constants.%C] {
  2448. // CHECK:STDOUT: %Cpp.ref.loc9_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2449. // CHECK:STDOUT: %N.ref.loc9_14: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  2450. // CHECK:STDOUT: %O.ref.loc9_16: type = name_ref O, imports.%O.decl [concrete = constants.%O]
  2451. // CHECK:STDOUT: %C.ref.loc9_18: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2452. // CHECK:STDOUT: }
  2453. // CHECK:STDOUT: %.loc9_35.3: ref %C = temporary %.loc9_35.1, %.loc9_35.2
  2454. // CHECK:STDOUT: %.loc9_35.4: %C = bind_value %.loc9_35.3
  2455. // CHECK:STDOUT: %c2: %C = bind_name c2, %.loc9_35.4
  2456. // CHECK:STDOUT: name_binding_decl {
  2457. // CHECK:STDOUT: %c3.patt: %pattern_type.84b = binding_pattern c3 [concrete]
  2458. // CHECK:STDOUT: }
  2459. // CHECK:STDOUT: %c1.ref: %C = name_ref c1, %c1
  2460. // CHECK:STDOUT: %c2.ref: %C = name_ref c2, %c2
  2461. // CHECK:STDOUT: %.loc10_26.1: ref %C = temporary_storage
  2462. // CHECK:STDOUT: %.loc10_23: ref %C = value_as_ref %c1.ref
  2463. // CHECK:STDOUT: %addr.loc10_26.1: %ptr.4b2 = addr_of %.loc10_23
  2464. // CHECK:STDOUT: %.loc10_28: ref %C = value_as_ref %c2.ref
  2465. // CHECK:STDOUT: %addr.loc10_26.2: %ptr.4b2 = addr_of %.loc10_28
  2466. // CHECK:STDOUT: %addr.loc10_26.3: %ptr.4b2 = addr_of %.loc10_26.1
  2467. // CHECK:STDOUT: %operator+__carbon_thunk.call: init %empty_tuple.type = call imports.%operator+__carbon_thunk.decl(%addr.loc10_26.1, %addr.loc10_26.2, %addr.loc10_26.3)
  2468. // CHECK:STDOUT: %.loc10_26.2: init %C = in_place_init %operator+__carbon_thunk.call, %.loc10_26.1
  2469. // CHECK:STDOUT: %.loc10_18: type = splice_block %C.ref.loc10 [concrete = constants.%C] {
  2470. // CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2471. // CHECK:STDOUT: %N.ref.loc10: <namespace> = name_ref N, imports.%N [concrete = imports.%N]
  2472. // CHECK:STDOUT: %O.ref.loc10: type = name_ref O, imports.%O.decl [concrete = constants.%O]
  2473. // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2474. // CHECK:STDOUT: }
  2475. // CHECK:STDOUT: %.loc10_26.3: ref %C = temporary %.loc10_26.1, %.loc10_26.2
  2476. // CHECK:STDOUT: %.loc10_26.4: %C = bind_value %.loc10_26.3
  2477. // CHECK:STDOUT: %c3: %C = bind_name c3, %.loc10_26.4
  2478. // CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  2479. // CHECK:STDOUT: %.loc10_26.5: %type_where = converted constants.%C, %facet_value.loc10 [concrete = constants.%facet_value]
  2480. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: <bound method> = bound_method %.loc10_26.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.aaa
  2481. // CHECK:STDOUT: <elided>
  2482. // CHECK:STDOUT: %bound_method.loc10: <bound method> = bound_method %.loc10_26.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1
  2483. // CHECK:STDOUT: %addr.loc10_26.4: %ptr.4b2 = addr_of %.loc10_26.3
  2484. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_26.4)
  2485. // CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  2486. // CHECK:STDOUT: %.loc9_35.5: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value]
  2487. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: <bound method> = bound_method %.loc9_35.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.aaa
  2488. // CHECK:STDOUT: <elided>
  2489. // CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_35.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2
  2490. // CHECK:STDOUT: %addr.loc9_35.2: %ptr.4b2 = addr_of %.loc9_35.3
  2491. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_35.2)
  2492. // CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  2493. // CHECK:STDOUT: %.loc8_35.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value]
  2494. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: <bound method> = bound_method %.loc8_35.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.aaa
  2495. // CHECK:STDOUT: <elided>
  2496. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %.loc8_35.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.3
  2497. // CHECK:STDOUT: %addr.loc8_35.2: %ptr.4b2 = addr_of %.loc8_35.3
  2498. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_35.2)
  2499. // CHECK:STDOUT: <elided>
  2500. // CHECK:STDOUT: }
  2501. // CHECK:STDOUT:
  2502. // CHECK:STDOUT: --- fail_todo_import_member_add_with.carbon
  2503. // CHECK:STDOUT:
  2504. // CHECK:STDOUT: constants {
  2505. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  2506. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  2507. // CHECK:STDOUT: %pattern_type.217: type = pattern_type %C [concrete]
  2508. // CHECK:STDOUT: %.d40: type = cpp_overload_set_type @C__carbon_thunk [concrete]
  2509. // CHECK:STDOUT: %empty_struct.e73: %.d40 = struct_value () [concrete]
  2510. // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete]
  2511. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  2512. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  2513. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  2514. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  2515. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  2516. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete]
  2517. // CHECK:STDOUT: }
  2518. // CHECK:STDOUT:
  2519. // CHECK:STDOUT: imports {
  2520. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  2521. // CHECK:STDOUT: .C = %C.decl
  2522. // CHECK:STDOUT: import Cpp//...
  2523. // CHECK:STDOUT: }
  2524. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  2525. // CHECK:STDOUT: %.40b: %.d40 = cpp_overload_set_value @C__carbon_thunk [concrete = constants.%empty_struct.e73]
  2526. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  2527. // CHECK:STDOUT: <elided>
  2528. // CHECK:STDOUT: } {
  2529. // CHECK:STDOUT: <elided>
  2530. // CHECK:STDOUT: }
  2531. // CHECK:STDOUT: }
  2532. // CHECK:STDOUT:
  2533. // CHECK:STDOUT: fn @F() {
  2534. // CHECK:STDOUT: !entry:
  2535. // CHECK:STDOUT: name_binding_decl {
  2536. // CHECK:STDOUT: %c1.patt: %pattern_type.217 = binding_pattern c1 [concrete]
  2537. // CHECK:STDOUT: }
  2538. // CHECK:STDOUT: %Cpp.ref.loc8_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2539. // CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2540. // CHECK:STDOUT: %C.ref.loc8_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct.e73]
  2541. // CHECK:STDOUT: %.loc8_27.1: ref %C = temporary_storage
  2542. // CHECK:STDOUT: %addr.loc8_27.1: %ptr.d9e = addr_of %.loc8_27.1
  2543. // CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc8_27.1)
  2544. // CHECK:STDOUT: %.loc8_27.2: init %C = in_place_init %C__carbon_thunk.call.loc8, %.loc8_27.1
  2545. // CHECK:STDOUT: %.loc8_14: type = splice_block %C.ref.loc8_14 [concrete = constants.%C] {
  2546. // CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2547. // CHECK:STDOUT: %C.ref.loc8_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2548. // CHECK:STDOUT: }
  2549. // CHECK:STDOUT: %.loc8_27.3: ref %C = temporary %.loc8_27.1, %.loc8_27.2
  2550. // CHECK:STDOUT: %.loc8_27.4: %C = bind_value %.loc8_27.3
  2551. // CHECK:STDOUT: %c1: %C = bind_name c1, %.loc8_27.4
  2552. // CHECK:STDOUT: name_binding_decl {
  2553. // CHECK:STDOUT: %c2.patt: %pattern_type.217 = binding_pattern c2 [concrete]
  2554. // CHECK:STDOUT: }
  2555. // CHECK:STDOUT: %Cpp.ref.loc9_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2556. // CHECK:STDOUT: %C.ref.loc9_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2557. // CHECK:STDOUT: %C.ref.loc9_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct.e73]
  2558. // CHECK:STDOUT: %.loc9_27.1: ref %C = temporary_storage
  2559. // CHECK:STDOUT: %addr.loc9_27.1: %ptr.d9e = addr_of %.loc9_27.1
  2560. // CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc9_27.1)
  2561. // CHECK:STDOUT: %.loc9_27.2: init %C = in_place_init %C__carbon_thunk.call.loc9, %.loc9_27.1
  2562. // CHECK:STDOUT: %.loc9_14: type = splice_block %C.ref.loc9_14 [concrete = constants.%C] {
  2563. // CHECK:STDOUT: %Cpp.ref.loc9_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2564. // CHECK:STDOUT: %C.ref.loc9_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2565. // CHECK:STDOUT: }
  2566. // CHECK:STDOUT: %.loc9_27.3: ref %C = temporary %.loc9_27.1, %.loc9_27.2
  2567. // CHECK:STDOUT: %.loc9_27.4: %C = bind_value %.loc9_27.3
  2568. // CHECK:STDOUT: %c2: %C = bind_name c2, %.loc9_27.4
  2569. // CHECK:STDOUT: name_binding_decl {
  2570. // CHECK:STDOUT: %c3.patt: %pattern_type.217 = binding_pattern c3 [concrete]
  2571. // CHECK:STDOUT: }
  2572. // CHECK:STDOUT: %c1.ref: %C = name_ref c1, %c1
  2573. // CHECK:STDOUT: %c2.ref: %C = name_ref c2, %c2
  2574. // CHECK:STDOUT: %.loc17: type = splice_block %C.ref.loc17 [concrete = constants.%C] {
  2575. // CHECK:STDOUT: %Cpp.ref.loc17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2576. // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  2577. // CHECK:STDOUT: }
  2578. // CHECK:STDOUT: %c3: %C = bind_name c3, <error> [concrete = <error>]
  2579. // CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  2580. // CHECK:STDOUT: %.loc9_27.5: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value]
  2581. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: <bound method> = bound_method %.loc9_27.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  2582. // CHECK:STDOUT: <elided>
  2583. // CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_27.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1
  2584. // CHECK:STDOUT: %addr.loc9_27.2: %ptr.d9e = addr_of %.loc9_27.3
  2585. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9(%addr.loc9_27.2)
  2586. // CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  2587. // CHECK:STDOUT: %.loc8_27.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value]
  2588. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: <bound method> = bound_method %.loc8_27.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  2589. // CHECK:STDOUT: <elided>
  2590. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %.loc8_27.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2
  2591. // CHECK:STDOUT: %addr.loc8_27.2: %ptr.d9e = addr_of %.loc8_27.3
  2592. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_27.2)
  2593. // CHECK:STDOUT: <elided>
  2594. // CHECK:STDOUT: }
  2595. // CHECK:STDOUT: