aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 73cee3c10d..f8fa620c4b 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -515,27 +515,11 @@ CodeGenTypes::GetFunctionType(const CGFunctionInfo &FI, bool IsVariadic) {
return llvm::FunctionType::get(ResultType, ArgTys, IsVariadic);
}
-static bool HasIncompleteReturnTypeOrArgumentTypes(const FunctionProtoType *T) {
- if (const TagType *TT = T->getResultType()->getAs<TagType>()) {
- if (!TT->getDecl()->isDefinition())
- return true;
- }
-
- for (unsigned i = 0, e = T->getNumArgs(); i != e; ++i) {
- if (const TagType *TT = T->getArgType(i)->getAs<TagType>()) {
- if (!TT->getDecl()->isDefinition())
- return true;
- }
- }
-
- return false;
-}
-
const llvm::Type *
CodeGenTypes::GetFunctionTypeForVTable(const CXXMethodDecl *MD) {
const FunctionProtoType *FPT = MD->getType()->getAs<FunctionProtoType>();
- if (!HasIncompleteReturnTypeOrArgumentTypes(FPT))
+ if (!VerifyFuncTypeComplete(FPT))
return GetFunctionType(getFunctionInfo(MD), FPT->isVariadic());
return llvm::OpaqueType::get(getLLVMContext());