diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-07-02 21:05:30 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-07-02 21:05:30 +0000 |
commit | b135f0f2d893121ed2cc46d4d6c5bd5ab87d872f (patch) | |
tree | 9efd45a8addf24674c9455014201b8a7efd5a3f6 /lib/CodeGen/CodeGenModule.cpp | |
parent | 24364151180895f90018b6e373e51c0082ecff35 (diff) |
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
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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<FunctionDecl>(D.getDecl()); + FD = FD->getMostRecentDecl(); do { if (isa<CXXRecordDecl>(FD->getLexicalDeclContext())) { if (FD->isImplicit() && !ForVTable) { |