Skip to content

DiscoverFunctionsInDeclVisitor

Traverses (parts of) the AST to find DeclRefExpr that refer to functions that need to be present for that part of the AST to compile correctly. More...

#include <Visitors.h>

Inherits from clang::RecursiveASTVisitor< DiscoverFunctionsInDeclVisitor >

Public Functions

Name
DiscoverFunctionsInDeclVisitor(FunctionDeclResolver & Functions)
Construct a new Discover Functions In Decl Visitor:: Discover Functions In Decl Visitor object.
bool VisitExpr(clang::Expr * E)
Visit function for Expressions.

Public Attributes

Name
pad0

Private Attributes

Name
std::function< void(clang::FunctionDecl *)> OnEachFuncRef

Detailed Description

1
class DiscoverFunctionsInDeclVisitor;

Traverses (parts of) the AST to find DeclRefExpr that refer to functions that need to be present for that part of the AST to compile correctly.

This way functions declared and defined in the same compilation unit do not need to be annotated by the 'omp declare target' pragma. The Visitor is not only used to search through target regions, but also through the found functions themselves and through functions that are annotated with the 'omp declare target' pragma, to find all necessary dependencies recursively.

Public Functions Documentation

function DiscoverFunctionsInDeclVisitor

1
2
3
DiscoverFunctionsInDeclVisitor(
    FunctionDeclResolver & Functions
)

Construct a new Discover Functions In Decl Visitor:: Discover Functions In Decl Visitor object.

Parameters:

  • Functions

function VisitExpr

1
2
3
bool VisitExpr(
    clang::Expr * E
)

Visit function for Expressions.

Parameters:

  • E Given expression

Expression Visitor in DiscoverFunctionsInDeclVisitor

Public Attributes Documentation

variable pad0

1
__pad0__;

Private Attributes Documentation

variable OnEachFuncRef

1
std::function< void(clang::FunctionDecl *)> OnEachFuncRef;

Last update: 2021-11-24
Back to top