> +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
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits