Basic test of the inlinr

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2767 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-06-24 17:46:05 +00:00
parent 578cf90040
commit f49764070d
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,12 @@
LEVEL = ../../../..
include $(LEVEL)/test/Makefile.tests
TESTS := $(wildcard *.ll)
all:: $(addprefix Output/, $(TESTS:%.ll=%.ibc))
Output/%.ibc: %.ll Output/.dir $(LOPT)
($(LAS) < $< | $(LOPT) -inline -q -f -o $@) || \
( rm -f $@; $(FAILURE) $@ )

View File

@ -0,0 +1,11 @@
int %func(int %i) {
ret int %i
}
int %main(int %argc) {
%X = call int %func(int 7)
%Y = add int %X, %argc
ret int %Y
}