diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-04-29 23:20:19 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-04-29 23:20:19 +0000 |
commit | 20e883e59b4dc30d70552f14af40987db9338bb7 (patch) | |
tree | 9d2b93090e92a4da4b0158d8ed4ac246d83a3d86 /clang/lib/Serialization/ASTReaderDecl.cpp | |
parent | bf0a42ac09f45b05345f4f1eba0bd20500681575 (diff) | |
download | bcm5719-llvm-20e883e59b4dc30d70552f14af40987db9338bb7.tar.gz bcm5719-llvm-20e883e59b4dc30d70552f14af40987db9338bb7.zip |
[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
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReaderDecl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index 5e911b41b7c..4ff81d8d92b 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -474,7 +474,7 @@ void ASTDeclReader::VisitDecl(Decl *D) { // Note that this declaration was hidden because its owning module is // not yet visible. - Reader.HiddenNamesMap[Owner].HiddenDecls.push_back(D); + Reader.HiddenNamesMap[Owner].push_back(D); } } } @@ -1402,8 +1402,8 @@ void ASTDeclReader::MergeDefinitionData( else { auto SubmoduleID = MergeDD.Definition->getOwningModuleID(); assert(SubmoduleID && "hidden definition in no module"); - Reader.HiddenNamesMap[Reader.getSubmodule(SubmoduleID)] - .HiddenDecls.push_back(DD.Definition); + Reader.HiddenNamesMap[Reader.getSubmodule(SubmoduleID)].push_back( + DD.Definition); } } } @@ -3816,7 +3816,7 @@ void ASTDeclReader::UpdateDecl(Decl *D, ModuleFile &ModuleFile, if (Owner && Owner->NameVisibility != Module::AllVisible) { // If Owner is made visible at some later point, make this declaration // visible too. - Reader.HiddenNamesMap[Owner].HiddenDecls.push_back(D); + Reader.HiddenNamesMap[Owner].push_back(D); } else { // The declaration is now visible. D->Hidden = false; |