multifile_raw_ir.carbon 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. // ARGS: compile --phase=check --dump-raw-sem-ir %s
  6. //
  7. // Check that raw IR dumping works as expected.
  8. //
  9. // AUTOUPDATE
  10. // --- a.carbon
  11. fn A() {}
  12. // --- b.carbon
  13. fn B() {}
  14. // CHECK:STDOUT: ---
  15. // CHECK:STDOUT: filename: a.carbon
  16. // CHECK:STDOUT: sem_ir:
  17. // CHECK:STDOUT: cross_reference_irs_size: 1
  18. // CHECK:STDOUT: functions:
  19. // CHECK:STDOUT: function0: {name: name0, param_refs: block0, body: [block1]}
  20. // CHECK:STDOUT: classes: {}
  21. // CHECK:STDOUT: types:
  22. // CHECK:STDOUT: type0: {inst: instFunctionType, value_rep: {kind: copy, type: type0}}
  23. // CHECK:STDOUT: type_blocks: {}
  24. // CHECK:STDOUT: insts:
  25. // CHECK:STDOUT: inst+0: {kind: FunctionDecl, arg0: function0, type: type0}
  26. // CHECK:STDOUT: inst+1: {kind: Return}
  27. // CHECK:STDOUT: inst_blocks:
  28. // CHECK:STDOUT: block0: {}
  29. // CHECK:STDOUT: block1:
  30. // CHECK:STDOUT: 0: inst+1
  31. // CHECK:STDOUT: block2:
  32. // CHECK:STDOUT: 0: inst+0
  33. // CHECK:STDOUT: ...
  34. // CHECK:STDOUT: ---
  35. // CHECK:STDOUT: filename: b.carbon
  36. // CHECK:STDOUT: sem_ir:
  37. // CHECK:STDOUT: cross_reference_irs_size: 1
  38. // CHECK:STDOUT: functions:
  39. // CHECK:STDOUT: function0: {name: name0, param_refs: block0, body: [block1]}
  40. // CHECK:STDOUT: classes: {}
  41. // CHECK:STDOUT: types:
  42. // CHECK:STDOUT: type0: {inst: instFunctionType, value_rep: {kind: copy, type: type0}}
  43. // CHECK:STDOUT: type_blocks: {}
  44. // CHECK:STDOUT: insts:
  45. // CHECK:STDOUT: inst+0: {kind: FunctionDecl, arg0: function0, type: type0}
  46. // CHECK:STDOUT: inst+1: {kind: Return}
  47. // CHECK:STDOUT: inst_blocks:
  48. // CHECK:STDOUT: block0: {}
  49. // CHECK:STDOUT: block1:
  50. // CHECK:STDOUT: 0: inst+1
  51. // CHECK:STDOUT: block2:
  52. // CHECK:STDOUT: 0: inst+0
  53. // CHECK:STDOUT: ...