Skip to content

SageInterface::instrumentEndOfFunction

Instrument(Add a statement, often a function call) into a function right before the return points, handle multiple return statements (with duplicated statement s) and return expressions with side effects. Return the number of statements inserted. Useful when adding a runtime library call to terminate the runtime system right before the end of a program (e.g., OpenMP). Return with complex expressions with side effects are rewritten using an additional assignment statement.

Synopsis

Declared in <SageIII/sageInterface/sageInterface.h>

[[visibility]]
int
instrumentEndOfFunction(
    SgFunctionDeclaration* func,
    SgStatement* s);

Parameters

Name

Description

func

This class represents the concept of a function declaration statement.

s

This class represents the notion of a statement.

Created with MrDocs