29.10.2014 Views

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Compiler</strong> Coding Practices<br />

5.28 Inline functions and debugging<br />

The debug view generated <strong>for</strong> use of inline functions is generally good. However, it is<br />

sometimes useful to avoid inlining functions because in some situations, debugging is clearer if<br />

<strong>the</strong>y are not inlined. You can enable and disable <strong>the</strong> inlining of functions using <strong>the</strong> --no_inline,<br />

--inline, --autoinline and --no_autoinline command-line options.<br />

The debug view can also be adversely affected by retaining both inline and out-of-line copies of<br />

a function when out-of-line copies are not required. Functions that are never called from outside<br />

a module can be declared as static functions to avoid an unnecessarily complicated debug view.<br />

5.28.1 See also<br />

Concepts<br />

• Automatic function inlining and static functions on page 5-32.<br />

Reference<br />

<strong>Compiler</strong> Reference:<br />

• --autoinline, --no_autoinline on page 3-14<br />

• --<strong>for</strong>ceinline on page 3-40<br />

• --inline, --no_inline on page 3-53<br />

• __inline on page 5-7.<br />

Linker Reference:<br />

• --inline, --no_inline on page 2-64.<br />

<strong>ARM</strong> DUI 0375C Copyright © 2007-2008, 2011 <strong>ARM</strong>. All rights reserved. 5-40<br />

ID061811<br />

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!