diff options
author | Anders Carlsson <andersca@mac.com> | 2009-10-03 19:56:56 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-10-03 19:56:56 +0000 |
commit | 719aa44de4067c3910d02ab6a0fd0977d9f03261 (patch) | |
tree | 173831086827571d164363dbd4593314b04622e8 /lib/CodeGen/CGExprAgg.cpp | |
parent | 375c31c4673f83f925de221752cf801c2fbbb246 (diff) |
Pass the canonical method decl to GetVtableIndex. Fixes PR5120.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83272 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r-- | lib/CodeGen/CGExprAgg.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp index 1dd97d6a22..82ec4fd0b7 100644 --- a/lib/CodeGen/CGExprAgg.cpp +++ b/lib/CodeGen/CGExprAgg.cpp @@ -298,7 +298,7 @@ void AggExprEmitter::VisitUnaryAddrOf(const UnaryOperator *E) { llvm::Value *FuncPtr; if (MD->isVirtual()) { - uint64_t Index = CGF.CGM.GetVtableIndex(MD); + uint64_t Index = CGF.CGM.GetVtableIndex(MD->getCanonicalDecl()); FuncPtr = llvm::ConstantInt::get(PtrDiffTy, Index + 1); } else { |