diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-02-14 02:45:45 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-02-14 02:45:45 +0000 |
| commit | 3d88672f64a2616f57879836db83a4907daa486b (patch) | |
| tree | 7785fcee9ccefe4de6905cc717521f91163404d2 | |
| parent | 671f2c085f129e016317fbc5f6b3ea3623a6b720 (diff) | |
| download | bcm5719-llvm-3d88672f64a2616f57879836db83a4907daa486b.tar.gz bcm5719-llvm-3d88672f64a2616f57879836db83a4907daa486b.zip | |
x86_64 ABI: Need to use canonical types when comparing against
ASTContext types.
llvm-svn: 64533
| -rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index debf1319037..708c7171daf 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -542,7 +542,7 @@ void X86_64ABIInfo::classify(QualType Ty, Hi = SSEUp; } } else if (const ComplexType *CT = Ty->getAsComplexType()) { - QualType ET = CT->getElementType(); + QualType ET = Context.getCanonicalType(CT->getElementType()); uint64_t Size = Context.getTypeSize(Ty); if (ET->isIntegerType()) { @@ -670,8 +670,12 @@ ABIArgInfo X86_64ABIInfo::getCoerceResult(QualType Ty, if (Ty->isIntegerType() || Ty->isPointerType()) return ABIArgInfo::getDirect(); } else if (CoerceTo == llvm::Type::DoubleTy) { + // FIXME: It would probably be better to make CGFunctionInfo only + // map using canonical types than to canonize here. + QualType CTy = Context.getCanonicalType(Ty); + // Float and double end up in a single SSE reg. - if (Ty == Context.FloatTy || Ty == Context.DoubleTy) + if (CTy == Context.FloatTy || CTy == Context.DoubleTy) return ABIArgInfo::getDirect(); } |

