diff options
author | Anders Carlsson <andersca@mac.com> | 2009-11-27 20:47:55 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-11-27 20:47:55 +0000 |
commit | d6b07fb9ca2c3207773de1d8e305f99076598a2e (patch) | |
tree | 818e885b5fbc77c2b5a07c52e837ff7b56c793fd /lib/CodeGen/CGCXX.cpp | |
parent | 83d5a2a7d5f933cfdba756e76b6c5cc2f61ac37e (diff) |
Don't build the entire vtable when all we want is the index of a virtual method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90017 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGCXX.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index a848b1269b..9cd72fe215 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/lib/CodeGen/CGCXX.cpp @@ -1055,7 +1055,7 @@ CodeGenFunction::GetVirtualCXXBaseClassOffset(llvm::Value *This, return VBaseOffset; } -static llvm::Value *BuildVirtualCall(CodeGenFunction &CGF, int64_t VtableIndex, +static llvm::Value *BuildVirtualCall(CodeGenFunction &CGF, uint64_t VtableIndex, llvm::Value *This, const llvm::Type *Ty) { Ty = Ty->getPointerTo()->getPointerTo()->getPointerTo(); @@ -1071,7 +1071,7 @@ llvm::Value * CodeGenFunction::BuildVirtualCall(const CXXMethodDecl *MD, llvm::Value *This, const llvm::Type *Ty) { MD = MD->getCanonicalDecl(); - int64_t VtableIndex = CGM.getVtableInfo().getMethodVtableIndex(MD); + uint64_t VtableIndex = CGM.getVtableInfo().getMethodVtableIndex(MD); return ::BuildVirtualCall(*this, VtableIndex, This, Ty); } @@ -1080,7 +1080,7 @@ llvm::Value * CodeGenFunction::BuildVirtualCall(const CXXDestructorDecl *DD, CXXDtorType Type, llvm::Value *&This, const llvm::Type *Ty) { DD = cast<CXXDestructorDecl>(DD->getCanonicalDecl()); - int64_t VtableIndex = + uint64_t VtableIndex = CGM.getVtableInfo().getMethodVtableIndex(GlobalDecl(DD, Type)); return ::BuildVirtualCall(*this, VtableIndex, This, Ty); |