|
| 1 | +/** |
| 2 | +REQUIRED_ARGS: -ftime-trace -ftime-trace-file=- -ftime-trace-granularity=0 |
| 3 | +TRANSFORM_OUTPUT: sanitize_timetrace |
| 4 | +TEST_OUTPUT: |
| 5 | +--- |
| 6 | +Code generation, |
| 7 | +Codegen: function cube, object.cube |
| 8 | +Codegen: function square, object.square |
| 9 | +Codegen: function uses, object.uses |
| 10 | +Codegen: module object, object |
| 11 | +Import object.object, object.object |
| 12 | +Inline: cube, object.cube |
| 13 | +Inline: uses, object.uses |
| 14 | +Inlining, |
| 15 | +Parse: Module object, object |
| 16 | +Parsing, |
| 17 | +Sema1: Function cube, object.cube |
| 18 | +Sema1: Function square, object.square |
| 19 | +Sema1: Function uses, object.uses |
| 20 | +Sema1: Module object, object |
| 21 | +Sema2: cube, object.cube |
| 22 | +Sema2: square, object.square |
| 23 | +Sema2: uses, object.uses |
| 24 | +Sema3: cube, object.cube |
| 25 | +Sema3: square, object.square |
| 26 | +Sema3: uses, object.uses |
| 27 | +Semantic analysis, |
| 28 | +--- |
| 29 | +*/ |
| 30 | + |
| 31 | +module object; // Don't clutter time trace output with object.d |
| 32 | + |
| 33 | +pragma(inline, true) |
| 34 | +int square(int x) { return x * x; } |
| 35 | + |
| 36 | +pragma(inline, true) |
| 37 | +int cube(int x) { return x * square(x); } |
| 38 | + |
| 39 | +void uses() |
| 40 | +{ |
| 41 | + int a = cube(3); |
| 42 | + int b = square(4); |
| 43 | +} |
0 commit comments