[cfe-commits] r116799 - /cfe/trunk/test/CodeGen/struct-passing.c

Michael J. Spencer bigcheesegs at gmail.com
Mon Oct 18 23:39:49 PDT 2010


Author: mspencer
Date: Tue Oct 19 01:39:49 2010
New Revision: 116799

URL: http://llvm.org/viewvc/llvm-project?rev=116799&view=rev
Log:
test: FileCheck'ize and document test.

Modified:
    cfe/trunk/test/CodeGen/struct-passing.c

Modified: cfe/trunk/test/CodeGen/struct-passing.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/struct-passing.c?rev=116799&r1=116798&r2=116799&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/struct-passing.c (original)
+++ cfe/trunk/test/CodeGen/struct-passing.c Tue Oct 19 01:39:49 2010
@@ -1,11 +1,8 @@
-// RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -o %t %s
-// RUN: grep 'declare i32 @f0() readnone' %t
-// RUN: grep 'declare i32 @f1() readonly' %t
-// RUN: grep 'declare void @f2(.* sret)' %t
-// RUN: grep 'declare void @f3(.* sret)' %t
-// RUN: grep 'declare void @f4(.* byval)' %t
-// RUN: grep 'declare void @f5(.* byval)' %t
-// PR3835
+// This verifies that structs returned from functions by value are passed
+// correctly according to their attributes and the ABI.
+// SEE: PR3835
+
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s
 
 typedef int T0;
 typedef struct { int a[16]; } T1;
@@ -18,3 +15,10 @@
 void __attribute__((pure)) f5(T1 a);
 
 void *ps[] = { f0, f1, f2, f3, f4, f5 };
+
+// CHECK: declare i32 @f0() readnone
+// CHECK: declare i32 @f1() readonly
+// CHECK: declare void @f2({{.*}} sret)
+// CHECK: declare void @f3({{.*}} sret)
+// CHECK: declare void @f4({{.*}} byval)
+// CHECK: declare void @f5({{.*}} byval)





More information about the cfe-commits mailing list