r181393 - Debug Info: Using declarations/DW_TAG_imported_declaration of variables, types, and functions.
Eric Christopher
echristo at gmail.com
Wed May 8 13:07:21 PDT 2013
> +llvm::DIDescriptor CGDebugInfo::getDeclarationOrDefinition(const Decl *D) {
> + if (const TypeDecl *RD = dyn_cast<TypeDecl>(D))
> + return CreatePointeeType(QualType(RD->getTypeForDecl(), 0), llvm::DIFile());
CreatePointeeType?
> + llvm::DenseMap<const Decl *, llvm::WeakVH>::iterator I =
> + DeclCache.find(D->getCanonicalDecl());
> + if (I == DeclCache.end())
> + return llvm::DIDescriptor();
> + llvm::Value *V = I->second;
> + return llvm::DIDescriptor(dyn_cast_or_null<llvm::MDNode>(V));
This block could use a comment, actually if you could comment the decl
cache stuff in general that would be better.
-eric
More information about the cfe-commits
mailing list