Fix handling of the regparm attribute in the presence of classes with copy
constructors.
When I first moved regparm support to TargetInfo.cpp I tried to isolate it
in classifyArgumentTypeWithReg, but it is actually a lot easier to flip the
code around and check for regparm at the end of the decision tree.
Without this refactoring classifyArgumentTypeWithReg would have to duplicate
the logic about when to use non-byval indirect arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166266 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/ABIInfo.h b/lib/CodeGen/ABIInfo.h
index fb5eadb..1dd1d19 100644
--- a/lib/CodeGen/ABIInfo.h
+++ b/lib/CodeGen/ABIInfo.h
@@ -88,7 +88,7 @@
llvm::Type *Padding = 0) {
return ABIArgInfo(Direct, T, Offset, false, false, false, Padding);
}
- static ABIArgInfo getDirectInReg(llvm::Type *T) {
+ static ABIArgInfo getDirectInReg(llvm::Type *T = 0) {
return ABIArgInfo(Direct, T, 0, false, false, true, 0);
}
static ABIArgInfo getExtend(llvm::Type *T = 0) {