From b135f0f2d893121ed2cc46d4d6c5bd5ab87d872f Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Mon, 2 Jul 2012 21:05:30 +0000 Subject: When we're looking for redeclarations which might provide a definition in CodeGen, make sure we examine all the redeclarations. PR13252. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159586 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 25053b91a4..ef20cf4556 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1111,6 +1111,7 @@ CodeGenModule::GetOrCreateLLVMFunction(StringRef MangledName, } else if (getLangOpts().CPlusPlus && D.getDecl()) { // Look for a declaration that's lexically in a record. const FunctionDecl *FD = cast(D.getDecl()); + FD = FD->getMostRecentDecl(); do { if (isa(FD->getLexicalDeclContext())) { if (FD->isImplicit() && !ForVTable) { -- cgit v1.2.3-70-g09d2