aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index a34fc2410e..a5b188696a 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -152,7 +152,7 @@ Sema::ActOnLabelStmt(SourceLocation IdentLoc, IdentifierInfo *II,
SourceLocation ColonLoc, StmtArg subStmt) {
Stmt *SubStmt = static_cast<Stmt*>(subStmt.release());
// Look up the record for this label identifier.
- LabelStmt *&LabelDecl = CurBlock ? CurBlock->LabelMap[II] : LabelMap[II];
+ LabelStmt *&LabelDecl = getLabelMap()[II];
// If not forward referenced or defined already, just create a new LabelStmt.
if (LabelDecl == 0)
@@ -656,8 +656,7 @@ Sema::ActOnGotoStmt(SourceLocation GotoLoc, SourceLocation LabelLoc,
return StmtError(Diag(GotoLoc, diag::err_goto_in_block));
// Look up the record for this label identifier.
- LabelStmt *&LabelDecl = CurBlock ? CurBlock->LabelMap[LabelII] :
- LabelMap[LabelII];
+ LabelStmt *&LabelDecl = getLabelMap()[LabelII];
// If we haven't seen this label yet, create a forward reference.
if (LabelDecl == 0)