diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-31 02:38:46 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-31 02:38:46 +0000 |
commit | 0c21021799af524a83b7c21ee1ec08ee430ab331 (patch) | |
tree | d34cda6c823e07b87c1f4d6409c413eff0160e50 /test/Transforms/PruneEH | |
parent | 2b771055d7010e94d16d46b4f0d14d3693aa2c69 (diff) |
new tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/PruneEH')
-rw-r--r-- | test/Transforms/PruneEH/Makefile | 10 | ||||
-rw-r--r-- | test/Transforms/PruneEH/recursivetest.llx | 19 | ||||
-rw-r--r-- | test/Transforms/PruneEH/simpletest.llx | 15 |
3 files changed, 44 insertions, 0 deletions
diff --git a/test/Transforms/PruneEH/Makefile b/test/Transforms/PruneEH/Makefile new file mode 100644 index 00000000000..e92df45e64d --- /dev/null +++ b/test/Transforms/PruneEH/Makefile @@ -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) $< diff --git a/test/Transforms/PruneEH/recursivetest.llx b/test/Transforms/PruneEH/recursivetest.llx new file mode 100644 index 00000000000..8a966bb21ee --- /dev/null +++ b/test/Transforms/PruneEH/recursivetest.llx @@ -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 +} diff --git a/test/Transforms/PruneEH/simpletest.llx b/test/Transforms/PruneEH/simpletest.llx new file mode 100644 index 00000000000..619ca486e02 --- /dev/null +++ b/test/Transforms/PruneEH/simpletest.llx @@ -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 +} |