[llvm-commits] [llvm] r70875 - /llvm/trunk/test/FrontendC++/2009-05-04-PureConstNounwind.cpp

Duncan Sands baldrick at free.fr
Mon May 4 09:47:11 PDT 2009


Author: baldrick
Date: Mon May  4 11:47:11 2009
New Revision: 70875

URL: http://llvm.org/viewvc/llvm-project?rev=70875&view=rev
Log:
Check that pure/const functions are marked nounwind.

Added:
    llvm/trunk/test/FrontendC++/2009-05-04-PureConstNounwind.cpp

Added: llvm/trunk/test/FrontendC++/2009-05-04-PureConstNounwind.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC%2B%2B/2009-05-04-PureConstNounwind.cpp?rev=70875&view=auto

==============================================================================
--- llvm/trunk/test/FrontendC++/2009-05-04-PureConstNounwind.cpp (added)
+++ llvm/trunk/test/FrontendC++/2009-05-04-PureConstNounwind.cpp Mon May  4 11:47:11 2009
@@ -0,0 +1,8 @@
+// RUN: %llvmgxx -S -emit-llvm %s -o - | grep nounwind | count 4
+int c(void) __attribute__((const));
+int p(void) __attribute__((pure));
+int t(void);
+
+int f(void) {
+	return c() + p() + t();
+}





More information about the llvm-commits mailing list