[llvm-commits] [test-suite] r113362 - /test-suite/trunk/SingleSource/Regression/C++/EH/inlined_cleanup.cpp

Duncan Sands baldrick at free.fr
Wed Sep 8 08:59:52 PDT 2010


Author: baldrick
Date: Wed Sep  8 10:59:52 2010
New Revision: 113362

URL: http://llvm.org/viewvc/llvm-project?rev=113362&view=rev
Log:
Testcase for llvm-gcc commits 113357 and 113361.  With those commits
the output for llvm-gcc+opt+llc matches the native gcc output.

Added:
    test-suite/trunk/SingleSource/Regression/C++/EH/inlined_cleanup.cpp

Added: test-suite/trunk/SingleSource/Regression/C++/EH/inlined_cleanup.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C%2B%2B/EH/inlined_cleanup.cpp?rev=113362&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C++/EH/inlined_cleanup.cpp (added)
+++ test-suite/trunk/SingleSource/Regression/C++/EH/inlined_cleanup.cpp Wed Sep  8 10:59:52 2010
@@ -0,0 +1,22 @@
+#include <stdio.h>
+
+class Cleanup {
+public:
+  ~Cleanup() {
+    printf("In cleanup!\n");
+  }
+};
+
+static void foo() {
+  Cleanup C;
+  throw 3;
+}
+
+int main(void) {
+  try {
+    foo();
+  } catch (int i) {
+    printf("Caught %d!\n", i);
+  }
+  return 0;
+}





More information about the llvm-commits mailing list