diff options
| author | Mike Stump <mrs@apple.com> | 2009-08-12 22:34:12 +0000 |
|---|---|---|
| committer | Mike Stump <mrs@apple.com> | 2009-08-12 22:34:12 +0000 |
| commit | dc94d3fd27842d775a11ce8d9d9cf2dd0825085c (patch) | |
| tree | c52ac9cb2c6203019c7385bd735df455cff631db /clang/lib/CodeGen/CGCXX.cpp | |
| parent | ea3a402ae7bf53cb5f4ae238b4912406c242e939 (diff) | |
| download | bcm5719-llvm-dc94d3fd27842d775a11ce8d9d9cf2dd0825085c.tar.gz bcm5719-llvm-dc94d3fd27842d775a11ce8d9d9cf2dd0825085c.zip | |
Refactor.
llvm-svn: 78851
Diffstat (limited to 'clang/lib/CodeGen/CGCXX.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGCXX.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp index b65c6b32db7..80781ad934d 100644 --- a/clang/lib/CodeGen/CGCXX.cpp +++ b/clang/lib/CodeGen/CGCXX.cpp @@ -699,7 +699,10 @@ void CodeGenFunction::GenerateVtableForBase(const CXXRecordDecl *RD, methods.push_back(rtti); } - if (!isPrimary && RD) + if (!isPrimary) { + if (!RD) + return; + for (meth_iter mi = RD->method_begin(), me = RD->method_end(); mi != me; ++mi) { if (mi->isVirtual()) { @@ -708,8 +711,8 @@ void CodeGenFunction::GenerateVtableForBase(const CXXRecordDecl *RD, methods.push_back(m); } } - if (!isPrimary) return; + } // And add the virtuals for the class to the primary vtable. for (meth_iter mi = Class->method_begin(), me = Class->method_end(); mi != me; |

