Files
clang-p2996/clang/test/Modules/Inputs/macros.h
Douglas Gregor c83de30add Introduce builtin macros to determine whether we're building a
specific module (__building_module(modulename)) and to get the name of
the current module as an identifier (__MODULE__). 

Used to help headers behave differently when they're being included as
part of building a module. Oh, the irony.

llvm-svn: 164605
2012-09-25 15:44:52 +00:00

20 lines
330 B
C

#define MODULE
#define INTEGER(X) int
#define FLOAT float
#define DOUBLE double
#__public_macro INTEGER
#__private_macro FLOAT
#__private_macro MODULE
int (INTEGER);
#if !__building_module(macros)
# error Can't include this header without building the 'macros' module.
#endif
#ifdef __MODULE__
extern int __MODULE__;
#endif