[cfe-commits] r68270 - in /cfe/trunk/test/CodeGen: trapu.c trapv.c

Mike Stump mrs at apple.com
Wed Apr 1 18:14:26 PDT 2009


Author: mrs
Date: Wed Apr  1 20:14:26 2009
New Revision: 68270

URL: http://llvm.org/viewvc/llvm-project?rev=68270&view=rev
Log:
Oops, almost forgot the testcases.

Added:
    cfe/trunk/test/CodeGen/trapu.c
    cfe/trunk/test/CodeGen/trapv.c

Added: cfe/trunk/test/CodeGen/trapu.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/trapu.c?rev=68270&view=auto

==============================================================================
--- cfe/trunk/test/CodeGen/trapu.c (added)
+++ cfe/trunk/test/CodeGen/trapu.c Wed Apr  1 20:14:26 2009
@@ -0,0 +1,10 @@
+// RUN: clang-cc -ftrapu %s -emit-llvm -o %t &&
+// RUN: grep "__overflow_handler" %t | count 3
+
+unsigned int ui, uj, uk;
+int i, j, k;
+
+void foo() {
+  ui = uj + uk;
+  i = j + k;
+}

Added: cfe/trunk/test/CodeGen/trapv.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/trapv.c?rev=68270&view=auto

==============================================================================
--- cfe/trunk/test/CodeGen/trapv.c (added)
+++ cfe/trunk/test/CodeGen/trapv.c Wed Apr  1 20:14:26 2009
@@ -0,0 +1,10 @@
+// RUN: clang-cc -ftrapv %s -emit-llvm -o %t &&
+// RUN: grep "__overflow_handler" %t | count 2
+
+unsigned int ui, uj, uk;
+int i, j, k;
+
+void foo() {
+  ui = uj + uk;
+  i = j + k;
+}





More information about the cfe-commits mailing list