aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-11 07:00:53 +0000
committerChris Lattner <sabre@nondot.org>2008-04-11 07:00:53 +0000
commit7f925cc1071117ebe3191db33bbdfd706af297e9 (patch)
treec013e6e8a1beec7434a336c79420958f8d0cfa41 /lib/Sema/Sema.cpp
parent8808f0020fd0e36dc5d537275c6dfa7654a69f3b (diff)
Switch sema to maintaining its own scope chain information for variable
shadowing, instead of threading it through the AST. This patch contributed by Argiris Kirtzidis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49520 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r--lib/Sema/Sema.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index 8c9bceae21..a0d4ff7995 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -48,14 +48,14 @@ void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) {
// Add the built-in ObjC types.
t = cast<TypedefType>(Context.getObjCIdType().getTypePtr());
- t->getDecl()->getIdentifier()->setFETokenInfo(t->getDecl());
+ IdResolver.AddDecl(t->getDecl(), S);
TUScope->AddDecl(t->getDecl());
t = cast<TypedefType>(Context.getObjCClassType().getTypePtr());
- t->getDecl()->getIdentifier()->setFETokenInfo(t->getDecl());
+ IdResolver.AddDecl(t->getDecl(), S);
TUScope->AddDecl(t->getDecl());
ObjCInterfaceType *it = cast<ObjCInterfaceType>(Context.getObjCProtoType());
ObjCInterfaceDecl *IDecl = it->getDecl();
- IDecl->getIdentifier()->setFETokenInfo(IDecl);
+ IdResolver.AddDecl(IDecl, S);
TUScope->AddDecl(IDecl);
// Synthesize "typedef struct objc_selector *SEL;"
@@ -63,7 +63,7 @@ void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) {
SourceLocation(),
&Context.Idents.get("objc_selector"),
0);
- SelTag->getIdentifier()->setFETokenInfo(SelTag);
+ IdResolver.AddDecl(SelTag, S);
TUScope->AddDecl(SelTag);
QualType SelT = Context.getPointerType(Context.getTagDeclType(SelTag));
@@ -71,7 +71,7 @@ void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) {
SourceLocation(),
&Context.Idents.get("SEL"),
SelT, 0);
- SelTypedef->getIdentifier()->setFETokenInfo(SelTypedef);
+ IdResolver.AddDecl(SelTypedef, S);
TUScope->AddDecl(SelTypedef);
Context.setObjCSelType(SelTypedef);
}