[llvm-branch-commits] [cfe-branch] r98310 - in /cfe/branches/release_27: ./ lib/CodeGen/TargetInfo.cpp test/CodeGen/varargs.c
Tanya Lattner
tonic at nondot.org
Thu Mar 11 16:05:05 PST 2010
Author: tbrethou
Date: Thu Mar 11 18:05:05 2010
New Revision: 98310
URL: http://llvm.org/viewvc/llvm-project?rev=98310&view=rev
Log:
Merge 98264 from mainline.
fix PR6433, crash on va_arg of typedef.
Added:
cfe/branches/release_27/test/CodeGen/varargs.c
- copied unchanged from r98264, cfe/trunk/test/CodeGen/varargs.c
Modified:
cfe/branches/release_27/ (props changed)
cfe/branches/release_27/lib/CodeGen/TargetInfo.cpp
Propchange: cfe/branches/release_27/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 11 18:05:05 2010
@@ -1 +1 @@
-/cfe/trunk:98192
+/cfe/trunk:98192,98264
Modified: cfe/branches/release_27/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_27/lib/CodeGen/TargetInfo.cpp?rev=98310&r1=98309&r2=98310&view=diff
==============================================================================
--- cfe/branches/release_27/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/branches/release_27/lib/CodeGen/TargetInfo.cpp Thu Mar 11 18:05:05 2010
@@ -268,16 +268,15 @@
ABIArgInfo DefaultABIInfo::classifyArgumentType(QualType Ty,
ASTContext &Context,
llvm::LLVMContext &VMContext) const {
- if (CodeGenFunction::hasAggregateLLVMType(Ty)) {
+ if (CodeGenFunction::hasAggregateLLVMType(Ty))
return ABIArgInfo::getIndirect(0);
- } else {
- // Treat an enum type as its underlying type.
- if (const EnumType *EnumTy = Ty->getAs<EnumType>())
- Ty = EnumTy->getDecl()->getIntegerType();
+
+ // Treat an enum type as its underlying type.
+ if (const EnumType *EnumTy = Ty->getAs<EnumType>())
+ Ty = EnumTy->getDecl()->getIntegerType();
- return (Ty->isPromotableIntegerType() ?
- ABIArgInfo::getExtend() : ABIArgInfo::getDirect());
- }
+ return (Ty->isPromotableIntegerType() ?
+ ABIArgInfo::getExtend() : ABIArgInfo::getDirect());
}
/// X86_32ABIInfo - The X86-32 ABI information.
@@ -1367,6 +1366,8 @@
// i8* reg_save_area;
// };
unsigned neededInt, neededSSE;
+
+ Ty = CGF.getContext().getCanonicalType(Ty);
ABIArgInfo AI = classifyArgumentType(Ty, CGF.getContext(), VMContext,
neededInt, neededSSE);
More information about the llvm-branch-commits
mailing list