diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-14 00:36:42 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-14 00:36:42 +0000 |
commit | b3958476b21702a15f64f09d2862506d03dffe7b (patch) | |
tree | 3e77f14363d604a0fa074d5416bbaae8f21d2684 /include/clang/Lex/Preprocessor.h | |
parent | 0446f51e1c0e16bc9e3f1311967e31ac6dc40bab (diff) |
Constify argument of Preprocessor::getMacroInfoHistory and propagate to
callers, removing unneeded const_cast
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r-- | include/clang/Lex/Preprocessor.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index 8457cc5ad6..1789e81b0a 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -307,7 +307,7 @@ class Preprocessor : public RefCountedBase<Preprocessor> { /// Macros - For each IdentifierInfo that was associated with a macro, we /// keep a mapping to the history of all macro definitions and #undefs in /// the reverse order (the latest one is in the head of the list). - llvm::DenseMap<IdentifierInfo*, MacroInfo*> Macros; + llvm::DenseMap<const IdentifierInfo*, MacroInfo*> Macros; friend class ASTReader; /// \brief Macros that we want to warn because they are not used at the end @@ -520,7 +520,7 @@ public: /// representing the most recent macro definition. One can iterate over all /// previous macro definitions from it. This method should only be called for /// identifiers that hadMacroDefinition(). - MacroInfo *getMacroInfoHistory(IdentifierInfo *II) const; + MacroInfo *getMacroInfoHistory(const IdentifierInfo *II) const; /// \brief Specify a macro for this identifier. void setMacroInfo(IdentifierInfo *II, MacroInfo *MI); @@ -537,7 +537,7 @@ public: /// history table. Currently defined macros have /// IdentifierInfo::hasMacroDefinition() set and an empty /// MacroInfo::getUndefLoc() at the head of the list. - typedef llvm::DenseMap<IdentifierInfo*, + typedef llvm::DenseMap<const IdentifierInfo *, MacroInfo*>::const_iterator macro_iterator; macro_iterator macro_begin(bool IncludeExternalMacros = true) const; macro_iterator macro_end(bool IncludeExternalMacros = true) const; |