aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/clang/Lex/Preprocessor.h6
-rw-r--r--include/clang/Sema/CodeCompleteConsumer.h5
2 files changed, 6 insertions, 5 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;
diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h
index 2eb9170369..2a8da3260a 100644
--- a/include/clang/Sema/CodeCompleteConsumer.h
+++ b/include/clang/Sema/CodeCompleteConsumer.h
@@ -661,7 +661,7 @@ public:
CodeCompletionString *Pattern;
/// \brief When Kind == RK_Macro, the identifier that refers to a macro.
- IdentifierInfo *Macro;
+ const IdentifierInfo *Macro;
};
/// \brief The priority of this particular code-completion result.
@@ -728,7 +728,8 @@ public:
}
/// \brief Build a result that refers to a macro.
- CodeCompletionResult(IdentifierInfo *Macro, unsigned Priority = CCP_Macro)
+ CodeCompletionResult(const IdentifierInfo *Macro,
+ unsigned Priority = CCP_Macro)
: Declaration(0), Macro(Macro), Priority(Priority), StartParameter(0),
Kind(RK_Macro), CursorKind(CXCursor_MacroDefinition),
Availability(CXAvailability_Available), Hidden(false),