]> granicus.if.org Git - clang/commit
[modules] Substantially improve handling of #undef:
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 25 Jul 2014 04:40:03 +0000 (04:40 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 25 Jul 2014 04:40:03 +0000 (04:40 +0000)
commit1297b772fdbddc972ce8cc27689e072d87ff2cdd
tree51da61f0dec44ed18fdcb70d3285ac9357c9c0b9
parenta04b2e4a7523e15bba17d1b0ff08b45e9539b1ca
[modules] Substantially improve handling of #undef:

 * Track override set across module load and save
 * Track originating module to allow proper re-export of #undef
 * Make override set properly transitive when it picks up a #undef

This fixes nearly all of the remaining macro issues with self-host.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213922 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/clang/Lex/MacroInfo.h
include/clang/Lex/Preprocessor.h
include/clang/Serialization/ASTReader.h
lib/Lex/PPDirectives.cpp
lib/Lex/Pragma.cpp
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTWriter.cpp
test/Modules/macro-reexport/c1.h
test/Modules/macro-reexport/d1.h
test/Modules/macro-reexport/e1.h [new file with mode: 0644]
test/Modules/macro-reexport/e2.h [new file with mode: 0644]
test/Modules/macro-reexport/f1.h [new file with mode: 0644]
test/Modules/macro-reexport/macro-reexport.cpp
test/Modules/macro-reexport/module.modulemap