--- /dev/null
+
+LEVEL = ../../../..
+include $(LEVEL)/test/Makefile.tests
+
+TESTS := $(wildcard *.llx)
+
+all:: $(addprefix Output/, $(TESTS:%.llx=%.llx.out))
+
+Output/%.llx.out: %.llx Output/.dir $(LOPT)
+ -$(TESTRUNR) $<
--- /dev/null
+; 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
+}
--- /dev/null
+; 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
+}