map
Description
Converts all references to an identifier to another, externally defined identifier.
- name1
- The name used in the source code. For C, name1 can
represent a data object or function with external linkage. For C++, name1 can
represent a data object, a non-overloaded or overloaded function,
or overloaded operator, with external linkage. If the name to be mapped
is not in the global namespace, it must be fully qualified.
name1 should be declared in the same compilation unit in which it is referenced, but should not be defined in any other compilation unit. name1 must not be used in another #pragma map directive anywhere in the program.
- arg_list
- The list of arguments for the overloaded function or operator function designated by name1. If name1 designates an overloaded function, the function must be parenthesized and must include its argument list if it exists. If name1 designates a non-overloaded function, only name1 is required, and the parentheses and argument list are optional.
- name2
- The name that appears in the object code. If name2 exceeds
65535 bytes in length, a message is issued and the pragma is ignored.
name2 can be declared or defined in the same compilation unit in which name1 is referenced. name2 must not be the same as that used in another #pragma map directive in the same compilation unit.
Notes on Usage
The #pragma map directive can appear anywhere in the program.
In order for a function to be actually mapped, the map target function (name2) must have a definition available at link time.
If name2 specifies a function name that uses C++ linkage, then name2 must be specified using its mangled name. For example,
int foo(int, int);
#pragma map(foo, "bar__FiT1")
int main( )
{
return foo(4,5);
}
int bar(int a, int b)
{
return a+b;
} 