diff --git lib/CodeGen/CGCall.cpp lib/CodeGen/CGCall.cpp
index cb4ccb2..3dbd670 100644
--- lib/CodeGen/CGCall.cpp
+++ lib/CodeGen/CGCall.cpp
@@ -84,14 +84,16 @@ CodeGenTypes::arrangeFunctionType(CanQual<FunctionNoProtoType> FTNP) {
 /// stored.
 static const CGFunctionInfo &arrangeFunctionType(CodeGenTypes &CGT,
                                   SmallVectorImpl<CanQualType> &argTypes,
-                                             CanQual<FunctionProtoType> FTP) {
+                                             CanQual<FunctionProtoType> FTP,
+                                             const FunctionType::ExtInfo &ext_info,
+                                             bool isInstance) {
   RequiredArgs required = RequiredArgs::forPrototypePlus(FTP, argTypes.size());
   // FIXME: Kill copy.
   for (unsigned i = 0, e = FTP->getNumArgs(); i != e; ++i)
     argTypes.push_back(FTP->getArgType(i));
   CanQualType resultType = FTP->getResultType().getUnqualifiedType();
   return CGT.arrangeFunctionType(resultType, argTypes,
-                                 FTP->getExtInfo(), required);
+                                 ext_info, required, isInstance);
 }
 
 /// Arrange the argument and result information for a value of the
@@ -99,7 +101,7 @@ static const CGFunctionInfo &arrangeFunctionType(CodeGenTypes &CGT,
 const CGFunctionInfo &
 CodeGenTypes::arrangeFunctionType(CanQual<FunctionProtoType> FTP) {
   SmallVector<CanQualType, 16> argTypes;
-  return ::arrangeFunctionType(*this, argTypes, FTP);
+  return ::arrangeFunctionType(*this, argTypes, FTP, FTP->getExtInfo(), false);
 }
 
 static CallingConv getCallingConventionForDecl(const Decl *D) {
@@ -135,7 +137,8 @@ CodeGenTypes::arrangeCXXMethodType(const CXXRecordDecl *RD,
   argTypes.push_back(GetThisType(Context, RD));
 
   return ::arrangeFunctionType(*this, argTypes,
-              FTP->getCanonicalTypeUnqualified().getAs<FunctionProtoType>());
+              FTP->getCanonicalTypeUnqualified().getAs<FunctionProtoType>(),
+              FTP->getExtInfo(), true);
 }
 
 /// Arrange the argument and result information for a declaration or
@@ -147,13 +150,11 @@ CodeGenTypes::arrangeCXXMethodDeclaration(const CXXMethodDecl *MD) {
   assert(!isa<CXXConstructorDecl>(MD) && "wrong method for contructors!");
   assert(!isa<CXXDestructorDecl>(MD) && "wrong method for destructors!");
 
-  CanQual<FunctionProtoType> prototype = GetFormalType(MD);
-
   if (MD->isInstance()) {
-    // The abstract case is perfectly fine.
-    return arrangeCXXMethodType(MD->getParent(), prototype.getTypePtr());
+    return arrangeCXXMethodType(MD->getParent(), MD->getType()->castAs<FunctionProtoType>());
   }
 
+  CanQual<FunctionProtoType> prototype = GetFormalType(MD);
   return arrangeFunctionType(prototype);
 }
 
@@ -176,7 +177,7 @@ CodeGenTypes::arrangeCXXConstructorDeclaration(const CXXConstructorDecl *D,
   for (unsigned i = 0, e = FTP->getNumArgs(); i != e; ++i)
     argTypes.push_back(FTP->getArgType(i));
 
-  return arrangeFunctionType(resultType, argTypes, FTP->getExtInfo(), required);
+  return arrangeFunctionType(resultType, argTypes, FTP->getExtInfo(), required, true);
 }
 
 /// Arrange the argument and result information for a declaration,
@@ -195,7 +196,7 @@ CodeGenTypes::arrangeCXXDestructor(const CXXDestructorDecl *D,
   assert(FTP->getNumArgs() == 0 && "dtor with formal parameters");
 
   return arrangeFunctionType(resultType, argTypes, FTP->getExtInfo(),
-                             RequiredArgs::All);
+                             RequiredArgs::All, true);
 }
 
 /// Arrange the argument and result information for the declaration or
@@ -342,7 +343,7 @@ const CGFunctionInfo &
 CodeGenTypes::arrangeFunctionType(CanQualType resultType,
                                   ArrayRef<CanQualType> argTypes,
                                   const FunctionType::ExtInfo &info,
-                                  RequiredArgs required) {
+                                  RequiredArgs required, bool isInstance) {
 #ifndef NDEBUG
   for (ArrayRef<CanQualType>::const_iterator
          I = argTypes.begin(), E = argTypes.end(); I != E; ++I)
diff --git lib/CodeGen/CodeGenTypes.h lib/CodeGen/CodeGenTypes.h
index ba2b3ae..283cb17 100644
--- lib/CodeGen/CodeGenTypes.h
+++ lib/CodeGen/CodeGenTypes.h
@@ -205,10 +205,12 @@ public:
   /// This is the "core" routine to which all the others defer.
   ///
   /// \param argTypes - must all actually be canonical as params
+  /// \param isInstance - true iff the function is a class instance method
+  //  or ctor/dtor.
   const CGFunctionInfo &arrangeFunctionType(CanQualType returnType,
                                             ArrayRef<CanQualType> argTypes,
                                             const FunctionType::ExtInfo &info,
-                                            RequiredArgs args);
+                                            RequiredArgs args, bool isInstance = false);
 
   /// \brief Compute a new LLVM record layout object for the given record.
   CGRecordLayout *ComputeRecordLayout(const RecordDecl *D,
