LLVM  8.0.1
Static Public Member Functions | List of all members
llvm::AnalysisInfoMixin< DerivedT > Struct Template Reference

A CRTP mix-in that provides informational APIs needed for analysis passes. More...

#include "llvm/IR/PassManager.h"

Inheritance diagram for llvm::AnalysisInfoMixin< DerivedT >:
Inheritance graph
[legend]
Collaboration diagram for llvm::AnalysisInfoMixin< DerivedT >:
Collaboration graph
[legend]

Static Public Member Functions

static AnalysisKeyID ()
 Returns an opaque, unique ID for this analysis type. More...
 
- Static Public Member Functions inherited from llvm::PassInfoMixin< DerivedT >
static StringRef name ()
 Gets the name of the pass we are mixed into. More...
 

Detailed Description

template<typename DerivedT>
struct llvm::AnalysisInfoMixin< DerivedT >

A CRTP mix-in that provides informational APIs needed for analysis passes.

This provides some boilerplate for types that are analysis passes. It automatically mixes in PassInfoMixin.

Definition at line 383 of file PassManager.h.

Member Function Documentation

◆ ID()

template<typename DerivedT>
static AnalysisKey* llvm::AnalysisInfoMixin< DerivedT >::ID ( )
inlinestatic

Returns an opaque, unique ID for this analysis type.

This ID is a pointer type that is guaranteed to be 8-byte aligned and thus suitable for use in sets, maps, and other data structures that use the low bits of pointers.

Note that this requires the derived type provide a static AnalysisKey member called Key.

FIXME: The only reason the mixin type itself can't declare the Key value is that some compilers cannot correctly unique a templated static variable so it has the same addresses in each instantiation. The only currently known platform with this limitation is Windows DLL builds, specifically building each part of LLVM as a DLL. If we ever remove that build configuration, this mixin can provide the static key as well.

Definition at line 399 of file PassManager.h.


The documentation for this struct was generated from the following file: