CPreproc::IfDirectiveContextFinder
Find the '#if' case surrounding a given node.
Synopsis
Declared in <src/midend/programTransformation/astOutlining/IfDirectiveContextFinder.hh>
class IfDirectiveContextFinder
: public IfDirectiveExtractor
Base Classes
Name |
Description |
Traversal to extract '#if' directives. |
Member Functions
Name |
Description |
|
Constructor |
|
|
|
Private Data Members
Description
Given a target node, this traversal extracts the full program's '#if' directive structure and determines which '#if' case surrounds the top and bottom portion of the target node.
For example, suppose a target SgBasicBlock is situated in the source code as follows:
// ... #elif CONDITION_1 // ... { // ... #elif CONDITION_2 // ... } // ...
Then, this traversal permits the caller to determine that '#elif CONDITION_1' guards the top of the block, and '#elif CONDITION_2' guards the bottom of the block.
Created with MrDocs