summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-02-20 00:54:57 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-02-20 00:54:57 +0000
commit09c9e811de7696df87535d8a1d3e6c83e5316ee8 (patch)
tree0ff56079768b1ff1cdf038bf7892d36e5817197b /clang/lib/CodeGen/CodeGenModule.cpp
parentcab3dfb65042d4abd552d14246e2778ffb66b02d (diff)
downloadbcm5719-llvm-09c9e811de7696df87535d8a1d3e6c83e5316ee8.tar.gz
bcm5719-llvm-09c9e811de7696df87535d8a1d3e6c83e5316ee8.zip
[preprocessor] Split the MacroInfo class into two separate concepts, MacroInfo class
for the data specific to a macro definition (e.g. what the tokens are), and MacroDirective class which encapsulates the changes to the "macro namespace" (e.g. the location where the macro name became active, the location where it was undefined, etc.) (A MacroDirective always points to a MacroInfo object.) Usually a macro definition (MacroInfo) is where a macro name becomes active (MacroDirective) but splitting the concepts allows us to better model the effect of modules to the macro namespace (also as a bonus it allows better modeling of push_macro/pop_macro #pragmas). Modules can have their own macro history, separate from the local (current translation unit) macro history; MacroDirectives will be used to model the macro history (changes to macro namespace). For example, if "@import A;" imports macro FOO, there will be a new local MacroDirective created to indicate that "FOO" became active at the import location. Module "A" itself will contain another MacroDirective in its macro history (at the point of the definition of FOO) and both MacroDirectives will point to the same MacroInfo object. Introducing the separation of macro concepts is the first part towards better modeling of module macros. llvm-svn: 175585
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud