[llvm-branch-commits] [cfe-branch] r71319 - in /cfe/branches/Apple/Dib: lib/CodeGen/CGCall.cpp test/CodeGen/x86_32-arguments.c
Mike Stump
mrs at apple.com
Fri May 8 20:35:50 PDT 2009
Author: mrs
Date: Fri May 8 22:35:45 2009
New Revision: 71319
URL: http://llvm.org/viewvc/llvm-project?rev=71319&view=rev
Log:
Merge in 71261:
Darwin x86_32: Improve bit-field handling for returning records.
- This turns out to be a no-op now that most of the handling for
everything else is in place.
Modified:
cfe/branches/Apple/Dib/lib/CodeGen/CGCall.cpp
cfe/branches/Apple/Dib/test/CodeGen/x86_32-arguments.c
Modified: cfe/branches/Apple/Dib/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/lib/CodeGen/CGCall.cpp?rev=71319&r1=71318&r2=71319&view=diff
==============================================================================
--- cfe/branches/Apple/Dib/lib/CodeGen/CGCall.cpp (original)
+++ cfe/branches/Apple/Dib/lib/CodeGen/CGCall.cpp Fri May 8 22:35:45 2009
@@ -345,10 +345,6 @@
e = RT->getDecl()->field_end(Context); i != e; ++i) {
const FieldDecl *FD = *i;
- // FIXME: Reject bit-fields wholesale for now; this is incorrect.
- if (FD->isBitField())
- return false;
-
// Empty structures are ignored.
if (isEmptyRecord(Context, FD->getType()))
continue;
Modified: cfe/branches/Apple/Dib/test/CodeGen/x86_32-arguments.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/test/CodeGen/x86_32-arguments.c?rev=71319&r1=71318&r2=71319&view=diff
==============================================================================
--- cfe/branches/Apple/Dib/test/CodeGen/x86_32-arguments.c (original)
+++ cfe/branches/Apple/Dib/test/CodeGen/x86_32-arguments.c Fri May 8 22:35:45 2009
@@ -47,12 +47,10 @@
// This should be passed just as s8.
-// FIXME: This is wrong, but we want the coverage of the other
-// tests. This should be the same as @f8_1.
-// RUN: grep 'define void @f9_1(%.truct.s9\* noalias sret %agg.result)' %t &&
+// RUN: grep 'define i64 @f9_1()' %t &&
-// FIXME: This is wrong, but we want the coverage of the other
-// tests. This should be the same as @f8_2.
+// FIXME: llvm-gcc expands this, this may have some value for the
+// backend in terms of optimization but doesn't change the ABI.
// RUN: grep 'define void @f9_2(%.truct.s9\* byval %a0)' %t &&
struct s9 {
int a : 17;
@@ -96,11 +94,11 @@
// 128-bits).
// RUN: grep 'i32 @f17()' %t &&
-// RUN: grep -F 'void @f18(%3* noalias sret %agg.result)' %t &&
-// RUN: grep -F 'void @f19(%4* noalias sret %agg.result)' %t &&
-// RUN: grep -F 'void @f20(%5* noalias sret %agg.result)' %t &&
-// RUN: grep -F 'void @f21(%6* noalias sret %agg.result)' %t &&
-// RUN: grep -F 'void @f22(%7* noalias sret %agg.result)' %t &&
+// RUN: grep -F 'void @f18(%2* noalias sret %agg.result)' %t &&
+// RUN: grep -F 'void @f19(%3* noalias sret %agg.result)' %t &&
+// RUN: grep -F 'void @f20(%4* noalias sret %agg.result)' %t &&
+// RUN: grep -F 'void @f21(%5* noalias sret %agg.result)' %t &&
+// RUN: grep -F 'void @f22(%6* noalias sret %agg.result)' %t &&
struct { T11 a; } f17(void) {}
struct { T12 a; } f18(void) {}
struct { T13 a; } f19(void) {}
@@ -129,6 +127,9 @@
// RUN: grep 'define i16 @f29()' %t &&
struct s29 { struct { } a[1]; char b; char c; } f29(void) {}
+// RUN: grep 'define i16 @f30()' %t &&
+struct s30 { char a; char b : 4; } f30(void) {}
+
// RUN: grep 'define float @f31()' %t &&
struct s31 { char : 0; float b; char : 0} f31(void) {}
More information about the llvm-branch-commits
mailing list