Skip to content

CPreproc::IfDirectiveExtractor

Traversal to extract '#if' directives.

Synopsis

Declared in <src/midend/programTransformation/astOutlining/IfDirectiveExtractor.hh>

Base Classes

Name

Description

ASTtools::PrePostTraversal

Member Functions

Name

Description

IfDirectiveExtractor [constructor]

Construct from Ifs_t

visitBottomUp [virtual]

visitTopDown [virtual]

Protected Member Functions

Private Member Functions

Name

Description

addCase

Adds the given directive/node to the current '#if' case.

handleCase

Updates the tree structure for a newly encountered 'info' directive.

newIf

Creates a new '#if' directive.

validateNonEmptyStack

If the stack is empty, aborts with a message.

visit

Visits a node, either on the top‐down or bottom‐up visit.

Private Static Member Functions

Name

Description

checkLastCaseNotEndif

Asserts that we are not trying to add a case to a terminated '#if'.

Private Data Members

Name

Description

ifs_

Collection of all top‐level '#if' directives processed.

pending_

Stack of partially complete '#if' directives.

Derived Classes

Name

Description

IfDirectiveContextFinder

Find the '#if' case surrounding a given node.

Created with MrDocs