Introduce builtin macros to determine whether we're building a
authorDouglas Gregor <dgregor@apple.com>
Tue, 25 Sep 2012 15:44:52 +0000 (15:44 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 25 Sep 2012 15:44:52 +0000 (15:44 +0000)
commitc83de30addc1373dae0a58401aa7e04e44db40c1
treed46d159882debde6f3745ed3c86c0f9b3c32f098
parentdcaf4a3a4bf47e9c729fec918494c13a90130bf4
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
clang/include/clang/Basic/DiagnosticLexKinds.td
clang/include/clang/Lex/Preprocessor.h
clang/lib/Lex/PPMacroExpansion.cpp
clang/test/Modules/Inputs/macros.h
clang/test/Modules/macros.c