TargetCodeFragment
An abstract base class for all fragments of the original code (except header includes) that need to be copied to our generated source code. More...
#include <TargetCodeFragment.h>
Inherited by TargetCodeDecl, TargetCodeRegion
Public Types
Name | |
---|---|
enum | TargetCodeFragmentKind { TCFK_TargetCodeFragment, TCFK_TargetCodeRegion, TCFK_TargetCodeDecl} Enum for LLVMs RTTI. |
Public Functions
Name | |
---|---|
TargetCodeFragmentKind | getKind() const Accessor for LLVMs RTTI. |
TargetCodeFragment(clang::ASTContext & Context, TargetCodeFragmentKind Kind) | |
virtual | ~TargetCodeFragment() =0 Destroy the Target Code Fragment:: Target Code Fragment object. |
virtual std::string | PrintPretty() =0 Tries to use Clang's PrettyPrinter when possible (this is currently only for target regions). |
virtual clang::SourceRange | getRealRange() =0 Get the source range of the fragment. |
virtual clang::SourceRange | getInnerRange() Gets the 'inner' source range. |
virtual clang::SourceRange | getSpellingRange() =0 Get the spelling source range. |
clang::OpenMPDirectiveKind | getTargetCodeKind() Accessor to TargetCodeKind. |
const clang::LangOptions & | GetLangOpts() Accessor to lang opts of the current context. |
clang::PrintingPolicy | getPP() |
bool | classof(const TargetCodeFragment * TCF) |
Public Attributes
Name | |
---|---|
bool | NeedsSemicolon Does the source code generation need to add a semicolon to this fragment. |
clang::OpenMPDirectiveKind | TargetCodeKind What kind of code are we copying. |
bool | HasExtraBraces |
Protected Attributes
Name | |
---|---|
const TargetCodeFragmentKind | Kind Variable for LLVMs RTTI. |
clang::ASTContext & | Context |
clang::PrintingPolicy | PP |
Detailed Description
1 |
|
An abstract base class for all fragments of the original code (except header includes) that need to be copied to our generated source code.
This includes target regions as well as functions, global variables and types used by target regions (as far as we can detect that) as well as functions and variables that are flagged with the 'omp declare target' pragma.
Public Types Documentation
enum TargetCodeFragmentKind
Enumerator | Value | Description |
---|---|---|
TCFK_TargetCodeFragment | ||
TCFK_TargetCodeRegion | ||
TCFK_TargetCodeDecl |
Enum for LLVMs RTTI.
Public Functions Documentation
function getKind
1 |
|
Accessor for LLVMs RTTI.
function TargetCodeFragment
1 2 3 4 |
|
function ~TargetCodeFragment
1 |
|
Destroy the Target Code Fragment:: Target Code Fragment object.
function PrintPretty
1 |
|
Tries to use Clang's PrettyPrinter when possible (this is currently only for target regions).
Reimplemented by: TargetCodeRegion::PrintPretty, TargetCodeDecl::PrintPretty
function getRealRange
1 |
|
Get the source range of the fragment.
Reimplemented by: TargetCodeRegion::getRealRange, TargetCodeDecl::getRealRange
function getInnerRange
1 |
|
Gets the 'inner' source range.
Reimplemented by: TargetCodeRegion::getInnerRange
This can differ for target regions from the source range.
function getSpellingRange
1 |
|
Get the spelling source range.
Reimplemented by: TargetCodeRegion::getSpellingRange, TargetCodeDecl::getSpellingRange
That is the range without macro expansions.
function getTargetCodeKind
1 |
|
Accessor to TargetCodeKind.
function GetLangOpts
1 |
|
Accessor to lang opts of the current context.
function getPP
1 |
|
function classof
1 2 3 |
|
Public Attributes Documentation
variable NeedsSemicolon
1 |
|
Does the source code generation need to add a semicolon to this fragment.
variable TargetCodeKind
1 |
|
What kind of code are we copying.
TODO: this can create problems with non annotated function?
variable HasExtraBraces
1 |
|
Protected Attributes Documentation
variable Kind
1 |
|
Variable for LLVMs RTTI.
variable Context
1 |
|
variable PP
1 |
|