OMNI_FORCE_SYMBOL_LINK
Defined in omni/extras/ForceLink.h
-
OMNI_FORCE_SYMBOL_LINK(symbol_, tag_)
Helper to force a symbol to be linked.
Remark
This is used to ensure an unused symbol is linked into a module. This is done by tricking the linker into thinking the symbol is not discardable because its address is being passed to a function in another module. This is useful for example to ensure symbols that are meant purely for debugger use are not discarded from the module. Similarly, it can be used on symbols that are only meant to anchor C++ object initializers but are unreferenced otherwise.
- Parameters
symbol_ – [in] The symbol that must be linked to the calling module. This must be a valid symbol name including any required namespaces given the calling location.
tag_ – [in] A single token name to give to the symbol that forces the linking. This is used purely for debugging purposes to give an identifiable name to the symbol that is used to force linking of
symbol_
. This must be a valid C++ single token name (ie: only contains [A-Za-z0-9_] and must not start with a number).
- Returns
No return value.