LLVM API Documentation
Go to the source code of this file.
Namespaces | |
| namespace | llvm |
Classes | |
| struct | llvm::IncludeFile |
| Class to ensure linking of corresponding object file. More... | |
Defines | |
| #define | FORCE_DEFINING_FILE_TO_BE_LINKED(name) |
| #define | DEFINING_FILE_FOR(name) namespace llvm { const char name ## LinkVar = 0; } |
| #define DEFINING_FILE_FOR | ( | name | ) | namespace llvm { const char name ## LinkVar = 0; } |
This macro is the counterpart to FORCE_DEFINING_FILE_TO_BE_LINKED. It should be used in a .cpp file to define the name referenced in a header file that will cause linkage of the .cpp file. It should only be used at extern level.
Definition at line 50 of file IncludeFile.h.
| #define FORCE_DEFINING_FILE_TO_BE_LINKED | ( | name | ) |
Value:
namespace llvm { \ extern const char name ## LinkVar; \ static const IncludeFile name ## LinkObj ( &name ## LinkVar ); \ }
For example, foo.h would use:
FORCE_DEFINING_FILE_TO_BE_LINKED(foo)
And, foo.cp would use:
DEFINING_FILE_FOR(foo)
Definition at line 40 of file IncludeFile.h.