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/tools | |
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/tools')
-rw-r--r-- | clang/tools/libclang/CIndex.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 5a7a9cf3f69..aa5b8b0318c 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -7144,7 +7144,7 @@ MacroInfo *cxindex::getMacroInfo(const IdentifierInfo &II, ASTUnit *Unit = cxtu::getASTUnit(TU); Preprocessor &PP = Unit->getPreprocessor(); - MacroDirective *MD = PP.getMacroDirectiveHistory(&II); + MacroDirective *MD = PP.getLocalMacroDirectiveHistory(&II); if (MD) { for (MacroDirective::DefInfo Def = MD->getDefinition(); Def; Def = Def.getPreviousDefinition()) { @@ -7201,7 +7201,7 @@ MacroDefinition *cxindex::checkForMacroInMacroDefinition(const MacroInfo *MI, if (std::find(MI->arg_begin(), MI->arg_end(), &II) != MI->arg_end()) return nullptr; - MacroDirective *InnerMD = PP.getMacroDirectiveHistory(&II); + MacroDirective *InnerMD = PP.getLocalMacroDirectiveHistory(&II); if (!InnerMD) return nullptr; |