The OpenD Programming Language

assumeUsed

When applied to a global symbol, the compiler, assembler, and linker are required to treat the symbol as if there is a reference to the symbol that it cannot see (which is why they have to be named). For example, it prevents the deletion by the linker of an unreferenced symbol.

This attribute corresponds to “attribute((used))” in GNU C.

immutable
auto assumeUsed = _assumeUsed();

Examples

import ldc.attributes;

@assumeUsed int dont_remove;

Meta