diff options
| author | Eric Christopher <echristo@apple.com> | 2011-11-17 23:45:00 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@apple.com> | 2011-11-17 23:45:00 +0000 |
| commit | 459532e1d578e738df00e5e1c2bdd9af6139e6ce (patch) | |
| tree | 86416568b0cb8c981af1c07d34ba387da9b2fac2 /clang/lib/CodeGen/CGDebugInfo.cpp | |
| parent | 107e8ec30da1b726d3ade6484ee08a45a55366da (diff) | |
| download | bcm5719-llvm-459532e1d578e738df00e5e1c2bdd9af6139e6ce.tar.gz bcm5719-llvm-459532e1d578e738df00e5e1c2bdd9af6139e6ce.zip | |
Use the canonical decl to index so that we can really find it later.
Fixes rdar://10433202
llvm-svn: 144938
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 7a99d897c1d..efffd2ca4c2 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -851,7 +851,7 @@ CGDebugInfo::CreateCXXMemberFunction(const CXXMethodDecl *Method, Virtuality, VIndex, ContainingType, Flags, CGM.getLangOptions().Optimize); - SPCache[Method] = llvm::WeakVH(SP); + SPCache[Method->getCanonicalDecl()] = llvm::WeakVH(SP); return SP; } @@ -1690,7 +1690,7 @@ llvm::DISubprogram CGDebugInfo::getFunctionDeclaration(const Decl *D) { getContextDescriptor(cast<Decl>(D->getDeclContext())); llvm::DenseMap<const FunctionDecl *, llvm::WeakVH>::iterator - MI = SPCache.find(FD); + MI = SPCache.find(FD->getCanonicalDecl()); if (MI != SPCache.end()) { llvm::DISubprogram SP(dyn_cast_or_null<llvm::MDNode>(&*MI->second)); if (SP.isSubprogram() && !llvm::DISubprogram(SP).isDefinition()) @@ -1701,7 +1701,7 @@ llvm::DISubprogram CGDebugInfo::getFunctionDeclaration(const Decl *D) { E = FD->redecls_end(); I != E; ++I) { const FunctionDecl *NextFD = *I; llvm::DenseMap<const FunctionDecl *, llvm::WeakVH>::iterator - MI = SPCache.find(NextFD); + MI = SPCache.find(NextFD->getCanonicalDecl()); if (MI != SPCache.end()) { llvm::DISubprogram SP(dyn_cast_or_null<llvm::MDNode>(&*MI->second)); if (SP.isSubprogram() && !llvm::DISubprogram(SP).isDefinition()) @@ -1759,7 +1759,7 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, QualType FnType, if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) { // If there is a DISubprogram for this function available then use it. llvm::DenseMap<const FunctionDecl *, llvm::WeakVH>::iterator - FI = SPCache.find(FD); + FI = SPCache.find(FD->getCanonicalDecl()); if (FI != SPCache.end()) { llvm::DIDescriptor SP(dyn_cast_or_null<llvm::MDNode>(&*FI->second)); if (SP.isSubprogram() && llvm::DISubprogram(SP).isDefinition()) { |

