aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo.bagnara@gmail.com>2011-03-05 18:21:20 +0000
committerAbramo Bagnara <abramo.bagnara@gmail.com>2011-03-05 18:21:20 +0000
commit6784304db526cde59046d613c4175ce2caf93e44 (patch)
tree1baa1ef071f1fd1fa37958b1453aa7bac6423355 /lib/AST/Decl.cpp
parentc494f77363f057dd8619fec4e885c4f80e3d1b66 (diff)
Fixed LabelDecl source range and cleaned creation code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127094 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index cc33d84c94..d72dc22a94 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -2207,9 +2207,15 @@ TranslationUnitDecl *TranslationUnitDecl::Create(ASTContext &C) {
}
LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC,
- SourceLocation L, IdentifierInfo *II,
- bool isGnuLocal) {
- return new (C) LabelDecl(DC, L, II, 0, isGnuLocal);
+ SourceLocation IdentL, IdentifierInfo *II) {
+ return new (C) LabelDecl(DC, IdentL, II, 0, IdentL);
+}
+
+LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC,
+ SourceLocation IdentL, IdentifierInfo *II,
+ SourceLocation GnuLabelL) {
+ assert(GnuLabelL != IdentL && "Use this only for GNU local labels");
+ return new (C) LabelDecl(DC, IdentL, II, 0, GnuLabelL);
}