Skip to content

SageInterface::insertHeader

insertHeader overloads

Synopses

Declared in <SageIII/sageInterface/sageInterface.h>

Insert a new header right before stmt, if there are existing headers attached to stmt, insert it as the last or first header as specified by asLastHeader

[[visibility]]
void
insertHeader(
    SgStatement* stmt,
    PreprocessingInfo* newheader,
    bool asLastHeader);

Insert #include "filename" or #include <filename> (system header) into the global scope containing the current scope, right after other #include XXX.

[[visibility]]
PreprocessingInfo*
insertHeader(
    std::string const& filename,
    PreprocessingInfo::RelativePositionType position = PreprocessingInfo::after,
    bool isSystemHeader = false,
    SgScopeStatement* scope = NULL);

Insert #include "filename" or #include <filename> (system header) onto the global scope of a source file, add to be the last #include .. by default among existing headers, Or as the first header. Recommended for use.

[[visibility]]
PreprocessingInfo*
insertHeader(
    SgSourceFile* source_file,
    std::string const& header_file_name,
    bool isSystemHeader,
    bool asLastHeader);

Insert #include "filename" or #include <filename> (system header) onto the global scope of a source file

[[visibility]]
PreprocessingInfo*
insertHeader(
    SgSourceFile* source_file,
    std::string const& header_file_name,
    bool isSystemHeader = false,
    PreprocessingInfo::RelativePositionType position = PreprocessingInfo::before);

Created with MrDocs