mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
new tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8249 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2b771055d7
commit
0c21021799
10
test/Transforms/PruneEH/Makefile
Normal file
10
test/Transforms/PruneEH/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
LEVEL = ../../../..
|
||||
include $(LEVEL)/test/Makefile.tests
|
||||
|
||||
TESTS := $(wildcard *.llx)
|
||||
|
||||
all:: $(addprefix Output/, $(TESTS:%.llx=%.llx.out))
|
||||
|
||||
Output/%.llx.out: %.llx Output/.dir $(LOPT)
|
||||
-$(TESTRUNR) $<
|
19
test/Transforms/PruneEH/recursivetest.llx
Normal file
19
test/Transforms/PruneEH/recursivetest.llx
Normal file
@ -0,0 +1,19 @@
|
||||
; RUN: as < %s | opt -prune-eh | dis | not grep invoke
|
||||
|
||||
implementation
|
||||
|
||||
internal int %foo() {
|
||||
invoke int %foo() to label %Normal except label %Except
|
||||
Normal:
|
||||
ret int 12
|
||||
Except:
|
||||
ret int 123
|
||||
}
|
||||
|
||||
int %caller() {
|
||||
invoke int %foo() to label %Normal except label %Except
|
||||
Normal:
|
||||
ret int 0
|
||||
Except:
|
||||
ret int 1
|
||||
}
|
15
test/Transforms/PruneEH/simpletest.llx
Normal file
15
test/Transforms/PruneEH/simpletest.llx
Normal file
@ -0,0 +1,15 @@
|
||||
; RUN: as < %s | opt -prune-eh | dis | not grep invoke
|
||||
|
||||
implementation
|
||||
|
||||
internal void %foo() {
|
||||
ret void ; does not throw
|
||||
}
|
||||
|
||||
int %caller() {
|
||||
invoke void %foo() to label %Normal except label %Except
|
||||
Normal:
|
||||
ret int 0
|
||||
Except:
|
||||
ret int 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user