diff options
| author | Chris Lattner <sabre@nondot.org> | 2011-07-10 00:18:59 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2011-07-10 00:18:59 +0000 |
| commit | 8806e32f162e3af2c22b600d7d4abdcca5bf7cfd (patch) | |
| tree | 48630569e47697696ae4e86f7028b08adac8b346 /clang/lib/CodeGen/CGVTables.cpp | |
| parent | 7161661863c55bc383cb3803958d372ecf0a9980 (diff) | |
| download | llvm-8806e32f162e3af2c22b600d7d4abdcca5bf7cfd.zip llvm-8806e32f162e3af2c22b600d7d4abdcca5bf7cfd.tar.gz llvm-8806e32f162e3af2c22b600d7d4abdcca5bf7cfd.tar.bz2 | |
Rename CGT::VerifyFuncTypeComplete to isFuncTypeConvertible since
it is a predicate, not an action. Change the return type to be a bool,
not the incomplete member. Enhace it to detect the recursive compilation
case, allowing us to compile Eli's testcase on llvmdev:
struct T {
struct T (*p)(void);
} t;
into:
%struct.T = type { {}* }
@t = common global %struct.T zeroinitializer, align 8
llvm-svn: 134853
Diffstat (limited to 'clang/lib/CodeGen/CGVTables.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGVTables.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp index e439b5f..c161b79 100644 --- a/clang/lib/CodeGen/CGVTables.cpp +++ b/clang/lib/CodeGen/CGVTables.cpp @@ -2937,7 +2937,8 @@ void CodeGenVTables::MaybeEmitThunkAvailableExternally(GlobalDecl GD, // We can't emit thunks for member functions with incomplete types. const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl()); - if (CGM.getTypes().VerifyFuncTypeComplete(MD->getType().getTypePtr())) + if (!CGM.getTypes().isFuncTypeConvertible( + cast<FunctionType>(MD->getType().getTypePtr()))) return; EmitThunk(GD, Thunk, /*UseAvailableExternallyLinkage=*/true); |
