summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-01-14 00:36:42 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-01-14 00:36:42 +0000
commit049a4ffcb89d80a6424df60cd780dc4877c2a2b2 (patch)
tree8c48a4086c7e81fefbab1925bb85f2840d373f52 /clang/lib
parent97e3df087d64e5a062628bb91760dcd114f7a84b (diff)
downloadbcm5719-llvm-049a4ffcb89d80a6424df60cd780dc4877c2a2b2.tar.gz
bcm5719-llvm-049a4ffcb89d80a6424df60cd780dc4877c2a2b2.zip
Constify argument of Preprocessor::getMacroInfoHistory and propagate to
callers, removing unneeded const_cast llvm-svn: 172372
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Frontend/PrintPreprocessedOutput.cpp2
-rw-r--r--clang/lib/Lex/PPMacroExpansion.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
index 02da71bbbe8..cc8d935b52f 100644
--- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/clang/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/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp
index eb08977ee67..c626b4d561a 100644
--- a/clang/lib/Lex/PPMacroExpansion.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud