13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C++ LanguageThe export_info file consists of a series of lines of the <strong>for</strong>minclude=xorsys_include=xwhere x is a path name to be placed on the include search path.The directories are searched in the orderin which they are encountered in the export_info file.The file can also contain comments, which beginwith a "#", and blank lines. Spaces are ignored but tabs are not currently permitted. For example:# The include directories to be used <strong>for</strong> the xyz libraryinclude = /disk1/xyz/includesys_include = /disk2/abc/includeinclude=/disk3/jkl/includeThe include search path specified <strong>for</strong> a client program is ignored by the C++ compiler when it processesthe source in the export library, except when no export_info file is provided. Command line macrodefinitions specified <strong>for</strong> a client program are also ignored by the C++ compiler when processing a sourcefile from the export library; the command line macros specified when the corresponding .et file wasproduced do apply. All other compilation options (other than the include search path and command linemacro definitions) used when recompiling the exported templates will be used to compile the clientprogram.When a library is installed on a new system, it is likely that the export_info file will need to be adaptedto reflect the location of the required headers on that system.2.6. Inlining FunctionsThe C++ compiler supports a minimal <strong>for</strong>m of function inlining. When the C++ compiler encounters a callof a function declared inline it can replace the call with the body of the function with the parametersreplaced by the corresponding arguments. When a function call occurs as a statement, the statementsof the function body are inserted in place of the call. When the function call occurs within an expression,the body of the function is rewritten as one large expression and that expression is inserted in the properplace in the containing expression. It is not always possible to do this sort of inlining: there are certainconstructs (e.g. loops and inline assembly) that cannot be rendered in expression <strong>for</strong>m. Even when inliningis done at the statement level, there are certain constructs that are not practical to inline. Calls that cannotbe inlined are left in their original call <strong>for</strong>m, and an out-of-line copy of the function is used. When enabled,a remark is issued.When the C++ compiler decides not to inline a function, the keyword inline is passed to the generatedC file. This allows <strong>for</strong> the C compiler to decide again whether to inline a function or not.A function is disqualified <strong>for</strong> inlining immediately if any of the following are true:• The function has local static variables.• The function has local constants.71

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!