[cfe-commits] r64533 - /cfe/trunk/lib/CodeGen/CGCall.cpp
Daniel Dunbar
daniel at zuster.org
Fri Feb 13 18:45:45 PST 2009
Author: ddunbar
Date: Fri Feb 13 20:45:45 2009
New Revision: 64533
URL: http://llvm.org/viewvc/llvm-project?rev=64533&view=rev
Log:
x86_64 ABI: Need to use canonical types when comparing against
ASTContext types.
Modified:
cfe/trunk/lib/CodeGen/CGCall.cpp
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=64533&r1=64532&r2=64533&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Fri Feb 13 20:45:45 2009
@@ -542,7 +542,7 @@
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 @@
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();
}
More information about the cfe-commits
mailing list