aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-02-18 01:27:55 +0000
committerChris Lattner <sabre@nondot.org>2011-02-18 01:27:55 +0000
commit337e550218128e7d922c09bb354fbc71de90c568 (patch)
treead1699cd2931e9dcb944ffe6ee620db7727c8ccc /lib/Sema/SemaStmt.cpp
parent380ebecb32993bf0426e25519eb78d7816b74b12 (diff)
Switch labels over to using normal name lookup, instead of their
own weird little DenseMap. Hey look, we now emit unused label warnings deterministically, amazing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp37
1 files changed, 2 insertions, 35 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index f31fbe2406..ba50824c1b 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -48,9 +48,8 @@ StmtResult Sema::ActOnNullStmt(SourceLocation SemiLoc, bool LeadingEmptyMacro) {
return Owned(new (Context) NullStmt(SemiLoc, LeadingEmptyMacro));
}
-StmtResult Sema::ActOnDeclStmt(DeclGroupPtrTy dg,
- SourceLocation StartLoc,
- SourceLocation EndLoc) {
+StmtResult Sema::ActOnDeclStmt(DeclGroupPtrTy dg, SourceLocation StartLoc,
+ SourceLocation EndLoc) {
DeclGroupRef DG = dg.getAsVal<DeclGroupRef>();
// If we have an invalid decl, just return an error.
@@ -232,25 +231,6 @@ Sema::ActOnDefaultStmt(SourceLocation DefaultLoc, SourceLocation ColonLoc,
}
StmtResult
-Sema::ActOnLabelStmt(SourceLocation IdentLoc, IdentifierInfo *II,
- SourceLocation ColonLoc, Stmt *SubStmt,
- AttributeList *Attr) {
- // Look up the record for this label identifier.
- LabelDecl *&TheDecl = getCurFunction()->LabelMap[II];
-
- // If not forward referenced or defined already, create the backing decl.
- if (TheDecl == 0)
- TheDecl = LabelDecl::Create(Context, CurContext, IdentLoc, II);
-
- assert(TheDecl->getIdentifier() == II && "Label mismatch!");
-
- if (Attr)
- ProcessDeclAttributeList(CurScope, TheDecl, Attr);
-
- return ActOnLabelStmt(IdentLoc, TheDecl, ColonLoc, SubStmt);
-}
-
-StmtResult
Sema::ActOnLabelStmt(SourceLocation IdentLoc, LabelDecl *TheDecl,
SourceLocation ColonLoc, Stmt *SubStmt) {
@@ -1023,19 +1003,6 @@ Sema::ActOnObjCForCollectionStmt(SourceLocation ForLoc,
ForLoc, RParenLoc));
}
-StmtResult
-Sema::ActOnGotoStmt(SourceLocation GotoLoc, SourceLocation LabelLoc,
- IdentifierInfo *LabelII) {
- // Look up the record for this label identifier.
- LabelDecl *&TheDecl = getCurFunction()->LabelMap[LabelII];
-
- // If we haven't seen this label yet, create a forward reference.
- if (TheDecl == 0)
- TheDecl = LabelDecl::Create(Context, CurContext, LabelLoc, LabelII);
-
- return ActOnGotoStmt(GotoLoc, LabelLoc, TheDecl);
-}
-
StmtResult Sema::ActOnGotoStmt(SourceLocation GotoLoc,
SourceLocation LabelLoc,
LabelDecl *TheDecl) {