2022-08-23 00:00:00 +00:00
|
|
|
include ../tools.mk
|
2014-07-25 09:41:09 -07:00
|
|
|
|
|
|
|
# Test to make sure that inner functions within a polymorphic outer function
|
2018-05-08 16:10:16 +03:00
|
|
|
# don't get re-codegened when the outer function is monomorphized. The test
|
2014-08-08 11:24:44 -07:00
|
|
|
# code monomorphizes the outer functions several times, but the magic constants
|
|
|
|
# used in the inner functions should each appear only once in the generated IR.
|
2014-07-25 09:41:09 -07:00
|
|
|
|
|
|
|
all:
|
2014-12-15 16:03:39 -08:00
|
|
|
$(RUSTC) foo.rs --emit=llvm-ir
|
2015-02-12 02:48:05 +02:00
|
|
|
[ "$$(grep -c 'ret i32 8675309' "$(TMPDIR)/foo.ll")" -eq "1" ]
|
|
|
|
[ "$$(grep -c 'ret i32 11235813' "$(TMPDIR)/foo.ll")" -eq "1" ]
|