diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-07-29 17:04:54 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-07-29 17:04:54 +0000 |
| commit | cd84084f0270d04e2c2e0d4d3e0b7b34e1a0ea77 (patch) | |
| tree | 30e4886f1d33ed7cfd5c71dd7cbd5679f3d15ccd /clang/lib/CodeGen | |
| parent | c15dfd8a87b15dd4fde2ff7bf5e2ecc73e9ff7cc (diff) | |
| download | bcm5719-llvm-cd84084f0270d04e2c2e0d4d3e0b7b34e1a0ea77.tar.gz bcm5719-llvm-cd84084f0270d04e2c2e0d4d3e0b7b34e1a0ea77.zip | |
fix PR7742 / rdar://8250764, a miscompilation of struct
return where the struct has a base but no fields. This
was because the x86-64 abi logic was checking the wrong
predicate in one place.
This was introduced in r91874, which was a fix for PR5831,
which lacked a CHECK line, so I verified and added it.
llvm-svn: 109759
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 8729da9e175..0d8d3a9dff3 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -1026,8 +1026,9 @@ void X86_64ABIInfo::classify(QualType Ty, uint64_t OffsetBase, break; } - // If this record has no fields but isn't empty, classify as INTEGER. - if (RD->field_empty() && Size) + // If this record has no fields, no bases, no vtable, but isn't empty, + // classify as INTEGER. + if (CXXRD->isEmpty() && Size) Current = Integer; } |

