aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-18 20:01:55 +0000
committerChris Lattner <sabre@nondot.org>2009-04-18 20:01:55 +0000
commitea29a3a0d6948c4a51a261d19ec1a585d2a9c779 (patch)
tree3cfbecbe69e2f6791678916917fad8555fc4a21e /lib/Sema/SemaExpr.cpp
parenta9768b72bb5ea061c9f10d6aa51b3be3241f3ec2 (diff)
refactor some code, adding a new getLabelMap() accessor method
so that clients can't poke the function-local one when they really want the current block label. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69463 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 20a150fad6..d8e57f928d 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -4447,8 +4447,7 @@ Sema::OwningExprResult Sema::ActOnAddrLabel(SourceLocation OpLoc,
SourceLocation LabLoc,
IdentifierInfo *LabelII) {
// 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. It
// will be validated and/or cleaned up in ActOnFinishFunctionBody.