[modules] Stop trying to fake up a linear MacroDirective history.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 29 Apr 2015 23:20:19 +0000 (23:20 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 29 Apr 2015 23:20:19 +0000 (23:20 +0000)
commit20e883e59b4dc30d70552f14af40987db9338bb7
tree9d2b93090e92a4da4b0158d8ed4ac246d83a3d86
parentbf0a42ac09f45b05345f4f1eba0bd20500681575
[modules] Stop trying to fake up a linear MacroDirective history.

Modules builds fundamentally have a non-linear macro history. In the interest
of better source fidelity, represent the macro definition information
faithfully: we have a linear macro directive history within each module, and at
any point we have a unique "latest" local macro directive and a collection of
visible imported directives. This also removes the attendent complexity of
attempting to create a correct MacroDirective history (which we got wrong
in the general case).

No functionality change intended.

llvm-svn: 236176
31 files changed:
clang/include/clang/AST/NSAPI.h
clang/include/clang/Basic/IdentifierTable.h
clang/include/clang/Lex/HeaderSearch.h
clang/include/clang/Lex/Preprocessor.h
clang/include/clang/Serialization/ASTReader.h
clang/lib/ARCMigrate/ObjCMT.cpp
clang/lib/ARCMigrate/TransAPIUses.cpp
clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp
clang/lib/ARCMigrate/TransUnusedInitDelegate.cpp
clang/lib/ARCMigrate/Transforms.cpp
clang/lib/ARCMigrate/Transforms.h
clang/lib/AST/NSAPI.cpp
clang/lib/Frontend/CompilerInstance.cpp
clang/lib/Frontend/PrintPreprocessedOutput.cpp
clang/lib/Lex/HeaderSearch.cpp
clang/lib/Lex/MacroArgs.cpp
clang/lib/Lex/PPDirectives.cpp
clang/lib/Lex/PPExpressions.cpp
clang/lib/Lex/PPLexerChange.cpp
clang/lib/Lex/PPMacroExpansion.cpp
clang/lib/Lex/Pragma.cpp
clang/lib/Lex/Preprocessor.cpp
clang/lib/Sema/SemaCodeComplete.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaFixItUtils.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/test/Index/complete-macros.c
clang/test/Modules/macros.c
clang/tools/libclang/CIndex.cpp