summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-12-22 01:19:25 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-12-22 01:19:25 +0000
commit3780f0b6800938baeb346ec5ed6e230e33ab8152 (patch)
tree56fd14ee7d154e7fe8b3c749bd7c934894e4a559 /clang/lib/CodeGen
parent18d8b7575e3d197439ad6c3ad4bd4ba69afe598c (diff)
downloadbcm5719-llvm-3780f0b6800938baeb346ec5ed6e230e33ab8152.tar.gz
bcm5719-llvm-3780f0b6800938baeb346ec5ed6e230e33ab8152.zip
x86_64: Structures with no fields but which have padding should be classified as
integer. - This is consistent, but may not be correct. I will revisit x86_64 ABI handling for C++ as a whole at some point. - PR5831. llvm-svn: 91874
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/TargetABIInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/TargetABIInfo.cpp b/clang/lib/CodeGen/TargetABIInfo.cpp
index 7be1eadfd9a..863a297cc6a 100644
--- a/clang/lib/CodeGen/TargetABIInfo.cpp
+++ b/clang/lib/CodeGen/TargetABIInfo.cpp
@@ -805,6 +805,10 @@ void X86_64ABIInfo::classify(QualType Ty,
if (Lo == Memory || Hi == Memory)
break;
}
+
+ // If this record has no fields but isn't empty, classify as INTEGER.
+ if (RD->field_empty() && Size)
+ Current = Integer;
}
// Classify the fields one at a time, merging the results.
OpenPOWER on IntegriCloud