From 7497b92c2f3de3f6ae78310d8d1fdc6fc78d42db Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 8 Apr 2008 19:31:52 +0000 Subject: [PATCH] Check that bodies and calls but not declarations are marked nounwind when compiling without -fexceptions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49393 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CFrontend/2008-04-08-NoExceptions.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/CFrontend/2008-04-08-NoExceptions.c diff --git a/test/CFrontend/2008-04-08-NoExceptions.c b/test/CFrontend/2008-04-08-NoExceptions.c new file mode 100644 index 00000000000..257fee23b06 --- /dev/null +++ b/test/CFrontend/2008-04-08-NoExceptions.c @@ -0,0 +1,7 @@ +// RUN: %llvmgcc -S -o - %s | grep nounwind | count 2 +// RUN: %llvmgcc -S -o - %s | not grep {declare.*nounwind} + +void f(void); +void g(void) { + f(); +}