summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseExpr.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
commitebb5c6c7171f059e82029277491a01b0cddc5e96 (patch)
tree48201a06f7cc1cd16a336ef2adda3a2b73a9a663 /clang/lib/Parse/ParseExpr.cpp
parentf401d69c858df5e1f6ee47ab5d79079a1b92af6d (diff)
downloadbcm5719-llvm-ebb5c6c7171f059e82029277491a01b0cddc5e96.tar.gz
bcm5719-llvm-ebb5c6c7171f059e82029277491a01b0cddc5e96.zip
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. llvm-svn: 125813
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
-rw-r--r--clang/lib/Parse/ParseExpr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index 7a6ec5923c8..84d77300eb2 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -795,8 +795,9 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression,
return ExprError(Diag(Tok, diag::err_expected_ident));
Diag(AmpAmpLoc, diag::ext_gnu_address_of_label);
- Res = Actions.ActOnAddrLabel(AmpAmpLoc, Tok.getLocation(),
- Tok.getIdentifierInfo());
+ LabelDecl *LD = Actions.LookupOrCreateLabel(Tok.getIdentifierInfo(),
+ Tok.getLocation());
+ Res = Actions.ActOnAddrLabel(AmpAmpLoc, Tok.getLocation(), LD);
ConsumeToken();
return move(Res);
}
OpenPOWER on IntegriCloud