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 | a9e1d1cd1f7fded49016609d8cbc4d5579d7e60a (patch) | |
tree | c747cf9cd538bd868d89d454507160601e3f311c /lib/CodeGen/CGCXX.cpp | |
parent | 0a5cfd86dec28c0a3bc28742da8a19d5f63581be (diff) |
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78851 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGCXX.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index b65c6b32db..80781ad934 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/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; |