forked from OSchip/llvm-project
Add a LangOptions member to IdentifierResolver.
Make Sema pass the LangOptions to IdentifierResolver's constructor. llvm-svn: 56015
This commit is contained in:
parent
5b144d5cc4
commit
f4b92e6924
|
@ -134,7 +134,9 @@ void IdentifierResolver::IdDeclInfo::RemoveDecl(NamedDecl *D) {
|
|||
// IdentifierResolver Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
IdentifierResolver::IdentifierResolver() : IdDeclInfos(new IdDeclInfoMap) {}
|
||||
IdentifierResolver::IdentifierResolver(const LangOptions &langOpt)
|
||||
: LangOpt(langOpt), IdDeclInfos(new IdDeclInfoMap) {
|
||||
}
|
||||
IdentifierResolver::~IdentifierResolver() {
|
||||
delete IdDeclInfos;
|
||||
}
|
||||
|
|
|
@ -221,10 +221,12 @@ public:
|
|||
/// The decl must already be part of the decl chain.
|
||||
void RemoveDecl(NamedDecl *D);
|
||||
|
||||
IdentifierResolver();
|
||||
explicit IdentifierResolver(const LangOptions &LangOpt);
|
||||
~IdentifierResolver();
|
||||
|
||||
private:
|
||||
const LangOptions &LangOpt;
|
||||
|
||||
class IdDeclInfoMap;
|
||||
IdDeclInfoMap *IdDeclInfos;
|
||||
|
||||
|
|
|
@ -81,7 +81,8 @@ void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) {
|
|||
}
|
||||
|
||||
Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer)
|
||||
: PP(pp), Context(ctxt), Consumer(consumer), CurContext(0), CurBlock(0) {
|
||||
: PP(pp), Context(ctxt), Consumer(consumer), CurContext(0), CurBlock(0),
|
||||
IdResolver(pp.getLangOptions()) {
|
||||
|
||||
// Get IdentifierInfo objects for known functions for which we
|
||||
// do extra checking.
|
||||
|
|
Loading…
Reference in New Issue