dump_sem_ir_ranges_ignore.carbon 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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/none.carbon
  6. // EXTRA-ARGS: --dump-sem-ir-ranges=ignore
  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/basics/dump_sem_ir_ranges_ignore.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/dump_sem_ir_ranges_ignore.carbon
  13. // --- with-range.carbon
  14. library "[[@TEST_NAME]]";
  15. //@dump-sem-ir-begin
  16. fn F();
  17. //@dump-sem-ir-end
  18. // --- without-range.carbon
  19. library "[[@TEST_NAME]]";
  20. fn F();
  21. // --- explicit_dump_file.carbon
  22. library "[[@TEST_NAME]]";
  23. //@include-in-dumps
  24. // CHECK:STDOUT: --- with-range.carbon
  25. // CHECK:STDOUT:
  26. // CHECK:STDOUT: constants {
  27. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  28. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  29. // CHECK:STDOUT: }
  30. // CHECK:STDOUT:
  31. // CHECK:STDOUT: file {
  32. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  33. // CHECK:STDOUT: .F = %F.decl
  34. // CHECK:STDOUT: }
  35. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
  36. // CHECK:STDOUT: }
  37. // CHECK:STDOUT:
  38. // CHECK:STDOUT: fn @F();
  39. // CHECK:STDOUT:
  40. // CHECK:STDOUT: --- without-range.carbon
  41. // CHECK:STDOUT:
  42. // CHECK:STDOUT: constants {
  43. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  44. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  45. // CHECK:STDOUT: }
  46. // CHECK:STDOUT:
  47. // CHECK:STDOUT: file {
  48. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  49. // CHECK:STDOUT: .F = %F.decl
  50. // CHECK:STDOUT: }
  51. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
  52. // CHECK:STDOUT: }
  53. // CHECK:STDOUT:
  54. // CHECK:STDOUT: fn @F();
  55. // CHECK:STDOUT:
  56. // CHECK:STDOUT: --- explicit_dump_file.carbon
  57. // CHECK:STDOUT:
  58. // CHECK:STDOUT: file {
  59. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {}
  60. // CHECK:STDOUT: }
  61. // CHECK:STDOUT: