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 /lib | |
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 'lib')
-rw-r--r-- | lib/Frontend/PrintPreprocessedOutput.cpp | 2 | ||||
-rw-r--r-- | lib/Lex/PPMacroExpansion.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Frontend/PrintPreprocessedOutput.cpp b/lib/Frontend/PrintPreprocessedOutput.cpp index 02da71bbbe..cc8d935b52 100644 --- a/lib/Frontend/PrintPreprocessedOutput.cpp +++ b/lib/Frontend/PrintPreprocessedOutput.cpp @@ -565,7 +565,7 @@ static void PrintPreprocessedTokens(Preprocessor &PP, Token &Tok, } } -typedef std::pair<IdentifierInfo*, MacroInfo*> id_macro_pair; +typedef std::pair<const IdentifierInfo *, MacroInfo *> id_macro_pair; static int MacroIDCompare(const void* a, const void* b) { const id_macro_pair *LHS = static_cast<const id_macro_pair*>(a); const id_macro_pair *RHS = static_cast<const id_macro_pair*>(b); diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp index eb08977ee6..c626b4d561 100644 --- a/lib/Lex/PPMacroExpansion.cpp +++ b/lib/Lex/PPMacroExpansion.cpp @@ -32,7 +32,7 @@ #include <ctime> using namespace clang; -MacroInfo *Preprocessor::getMacroInfoHistory(IdentifierInfo *II) const { +MacroInfo *Preprocessor::getMacroInfoHistory(const IdentifierInfo *II) const { assert(II->hadMacroDefinition() && "Identifier has not been not a macro!"); macro_iterator Pos = Macros.find(II); |