r206039 - [PGO] Change MapRegionCounters to be a RecursiveASTVisitor.

Duncan P. N. Exon Smith dexonsmith at apple.com
Fri Apr 11 11:00:13 PDT 2014


On Apr 11, 2014, at 10:16, Bob Wilson <bob.wilson at apple.com> wrote:

> +    // Do not traverse the BlockDecl inside a BlockExpr since each BlockDecl
> +    // is handled as a separate function.
> +    bool TraverseBlockExpr(BlockExpr *block) { return true; }
> +
> +    bool VisitDecl(const Decl *D) {
> +      switch (D->getKind()) {
> +      default:
> +        break;
> +      case Decl::Function:
> +      case Decl::CXXMethod:
> +      case Decl::CXXConstructor:
> +      case Decl::CXXDestructor:
> +      case Decl::CXXConversion:
> +      case Decl::ObjCMethod:
> +      case Decl::Block:
> +        CounterMap[D->getBody()] = NextCounter++;
> +        break;
> +      }
> +      return true;
>     }

[Sorry this is broken up.]

This doesn't look like a new problem, but why aren't we looking at
FunctionTemplateDecls?



More information about the cfe-commits mailing list