summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-10-03 19:56:56 +0000
committerAnders Carlsson <andersca@mac.com>2009-10-03 19:56:56 +0000
commitd5931cd2b742169c2edf39466571c967ba2a0f3b (patch)
tree16fd37aab5a0c34bd750ed2dd772da513947369b /clang/lib
parent2ee3c011d9cafa05bea8ed360a094aca342dc913 (diff)
downloadbcm5719-llvm-d5931cd2b742169c2edf39466571c967ba2a0f3b.tar.gz
bcm5719-llvm-d5931cd2b742169c2edf39466571c967ba2a0f3b.zip
Pass the canonical method decl to GetVtableIndex. Fixes PR5120.
llvm-svn: 83272
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGExprAgg.cpp2
-rw-r--r--clang/lib/CodeGen/CGExprConstant.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp
index 1dd97d6a228..82ec4fd0b7b 100644
--- a/clang/lib/CodeGen/CGExprAgg.cpp
+++ b/clang/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 {
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index a742355f74d..0fd765235c9 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/lib/CodeGen/CGExprConstant.cpp
@@ -413,7 +413,7 @@ public:
// Get the function pointer (or index if this is a virtual function).
if (MD->isVirtual()) {
- uint64_t Index = CGM.GetVtableIndex(MD);
+ uint64_t Index = CGM.GetVtableIndex(MD->getCanonicalDecl());
Values[0] = llvm::ConstantInt::get(PtrDiffTy, Index + 1);
} else {
OpenPOWER on IntegriCloud