[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)
commitdaa69e00f5c49893844def565a67f75d7b77a6e3
tree84e28d0f95e59f71c351091689f89988a7d07d06
parentbf32f773ccd4f200228259ef32249ad0bc7838a6
[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.

llvm-svn: 213922
14 files changed:
clang/include/clang/Lex/MacroInfo.h
clang/include/clang/Lex/Preprocessor.h
clang/include/clang/Serialization/ASTReader.h
clang/lib/Lex/PPDirectives.cpp
clang/lib/Lex/Pragma.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/test/Modules/macro-reexport/c1.h
clang/test/Modules/macro-reexport/d1.h
clang/test/Modules/macro-reexport/e1.h [new file with mode: 0644]
clang/test/Modules/macro-reexport/e2.h [new file with mode: 0644]
clang/test/Modules/macro-reexport/f1.h [new file with mode: 0644]
clang/test/Modules/macro-reexport/macro-reexport.cpp
clang/test/Modules/macro-reexport/module.modulemap