summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-31 19:01:39 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-31 19:01:39 +0000
commit35579146aae9d8976cf5bcafc454052f09bc7355 (patch)
tree19654bea242c216b6a188b921f1225ca5037136d /clang/lib/CodeGen
parent7b4df3c3e6a0fc20d5784324aae026f9ad215c49 (diff)
downloadbcm5719-llvm-35579146aae9d8976cf5bcafc454052f09bc7355.tar.gz
bcm5719-llvm-35579146aae9d8976cf5bcafc454052f09bc7355.zip
x86_32 Darwin ABI: Treat empty unions like empty structures.
- Current return-arguments-32 status: 15/1000 failures llvm-svn: 68132
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 8217b046a39..291e476f0bd 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -140,11 +140,11 @@ void ABIArgInfo::dump() const {
/***/
-/// isEmptyStruct - Return true iff a structure has no non-empty
+/// isEmptyRecord - Return true iff a structure has no non-empty
/// members. Note that a structure with a flexible array member is not
/// considered empty.
-static bool isEmptyStruct(QualType T) {
- const RecordType *RT = T->getAsStructureType();
+static bool isEmptyRecord(QualType T) {
+ const RecordType *RT = T->getAsRecordType();
if (!RT)
return 0;
const RecordDecl *RD = RT->getDecl();
@@ -153,7 +153,7 @@ static bool isEmptyStruct(QualType T) {
for (RecordDecl::field_iterator i = RD->field_begin(),
e = RD->field_end(); i != e; ++i) {
const FieldDecl *FD = *i;
- if (!isEmptyStruct(FD->getType()))
+ if (!isEmptyRecord(FD->getType()))
return false;
}
return true;
@@ -182,7 +182,7 @@ static const FieldDecl *isSingleElementStruct(QualType T) {
const FieldDecl *FD = *i;
QualType FT = FD->getType();
- if (isEmptyStruct(FT)) {
+ if (isEmptyRecord(FT)) {
// Ignore
} else if (Found) {
return 0;
OpenPOWER on IntegriCloud