mirror of
https://github.com/intel/llvm.git
synced 2026-02-02 10:08:59 +08:00
Add a LangOptions member to IdentifierResolver.
Make Sema pass the LangOptions to IdentifierResolver's constructor. llvm-svn: 56015
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user