[cfe-commits] r56015 - in /cfe/trunk/lib/Sema: IdentifierResolver.cpp IdentifierResolver.h Sema.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Tue Sep 9 14:32:02 PDT 2008
Author: akirtzidis
Date: Tue Sep 9 16:32:02 2008
New Revision: 56015
URL: http://llvm.org/viewvc/llvm-project?rev=56015&view=rev
Log:
Add a LangOptions member to IdentifierResolver.
Make Sema pass the LangOptions to IdentifierResolver's constructor.
Modified:
cfe/trunk/lib/Sema/IdentifierResolver.cpp
cfe/trunk/lib/Sema/IdentifierResolver.h
cfe/trunk/lib/Sema/Sema.cpp
Modified: cfe/trunk/lib/Sema/IdentifierResolver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/IdentifierResolver.cpp?rev=56015&r1=56014&r2=56015&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/IdentifierResolver.cpp (original)
+++ cfe/trunk/lib/Sema/IdentifierResolver.cpp Tue Sep 9 16:32:02 2008
@@ -134,7 +134,9 @@
// IdentifierResolver Implementation
//===----------------------------------------------------------------------===//
-IdentifierResolver::IdentifierResolver() : IdDeclInfos(new IdDeclInfoMap) {}
+IdentifierResolver::IdentifierResolver(const LangOptions &langOpt)
+ : LangOpt(langOpt), IdDeclInfos(new IdDeclInfoMap) {
+}
IdentifierResolver::~IdentifierResolver() {
delete IdDeclInfos;
}
Modified: cfe/trunk/lib/Sema/IdentifierResolver.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/IdentifierResolver.h?rev=56015&r1=56014&r2=56015&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/IdentifierResolver.h (original)
+++ cfe/trunk/lib/Sema/IdentifierResolver.h Tue Sep 9 16:32:02 2008
@@ -221,10 +221,12 @@
/// 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;
Modified: cfe/trunk/lib/Sema/Sema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.cpp?rev=56015&r1=56014&r2=56015&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.cpp (original)
+++ cfe/trunk/lib/Sema/Sema.cpp Tue Sep 9 16:32:02 2008
@@ -81,7 +81,8 @@
}
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.
More information about the cfe-commits
mailing list