[Templight] Template Instantiation Observer

Description

[Templight] Template Instantiation Observer

This patch adds a base-class called TemplateInstantiationObserver which gets
notified whenever a template instantiation is entered or exited during
semantic analysis. This is a base class used to implement the template
profiling and debugging tool called
Templight (https://github.com/mikael-s-persson/templight).

The patch also makes a few more changes:

  • ActiveTemplateInstantiation class is moved out of the Sema class (so it can be used with inclusion of Sema.h).
  • CreateFrontendAction function in front-end utilities is given external linkage (not longer a hidden static function).
  • TemplateInstObserverChain data member added to Sema class to hold the list of template-inst observers.
  • Notifications to the template-inst observer are added at the key places where templates are instantiated.

Patch by: Abel Sinkovics!

Differential Revision: https://reviews.llvm.org/D5767

Details

Committed
xazaxFeb 10 2018, 6:04 AM
Differential Revision
D5767: Template Instantiation Observer + a few other templight-related changes
Parents
rL324807: [XRay] Rename Buffer.Buffer to Buffer.Data
Branches
Unknown
Tags
Unknown