diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-09-18 13:00:17 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-09-18 13:00:17 +0000 |
commit | 38c9b1765c56406e97510889b465b7885ccb59f3 (patch) | |
tree | e3374b06db5b5104548a1ec2399024297e433135 /lib/CodeGen/CGDebugInfo.cpp | |
parent | ae79222014a7a90a2c2d4a04e67deac0012a0461 (diff) |
do not rely on the implicit-dereference semantics of dyn_cast_or_null
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114281 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 24542fd5b8..bf5f9746da 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -61,7 +61,7 @@ llvm::DIDescriptor CGDebugInfo::getContextDescriptor(const Decl *Context, llvm::DenseMap<const Decl *, llvm::WeakVH>::iterator I = RegionMap.find(Context); if (I != RegionMap.end()) - return llvm::DIDescriptor(dyn_cast_or_null<llvm::MDNode>(I->second)); + return llvm::DIDescriptor(dyn_cast_or_null<llvm::MDNode>(&*I->second)); // Check namespace. if (const NamespaceDecl *NSDecl = dyn_cast<NamespaceDecl>(Context)) @@ -1478,7 +1478,7 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, QualType FnType, llvm::DenseMap<const FunctionDecl *, llvm::WeakVH>::iterator FI = SPCache.find(FD); if (FI != SPCache.end()) { - llvm::DIDescriptor SP(dyn_cast_or_null<llvm::MDNode>(FI->second)); + llvm::DIDescriptor SP(dyn_cast_or_null<llvm::MDNode>(&*FI->second)); if (SP.isSubprogram() && llvm::DISubprogram(SP).isDefinition()) { llvm::MDNode *SPN = SP; RegionStack.push_back(SPN); |