diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-09-03 18:01:40 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-09-03 18:01:40 +0000 |
| commit | feefaf5724407451beee32ec044074e1441c554d (patch) | |
| tree | 75fb45caf204d647527ab41fd8183b762ea2df9e /clang/lib/Sema | |
| parent | b225be2729558a7b8d45b61056473c13ed2fd9aa (diff) | |
| download | bcm5719-llvm-feefaf5724407451beee32ec044074e1441c554d.tar.gz bcm5719-llvm-feefaf5724407451beee32ec044074e1441c554d.zip | |
Factor out parsing and allocation of IdentifierLoc objects.
llvm-svn: 189833
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/AttributeList.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Sema/AttributeList.cpp b/clang/lib/Sema/AttributeList.cpp index dd01aef73cb..451b01c2ec1 100644 --- a/clang/lib/Sema/AttributeList.cpp +++ b/clang/lib/Sema/AttributeList.cpp @@ -19,6 +19,14 @@ #include "llvm/ADT/StringSwitch.h" using namespace clang; +IdentifierLoc *IdentifierLoc::create(ASTContext &Ctx, SourceLocation Loc, + IdentifierInfo *Ident) { + IdentifierLoc *Result = new (Ctx) IdentifierLoc; + Result->Loc = Loc; + Result->Ident = Ident; + return Result; +} + size_t AttributeList::allocated_size() const { if (IsAvailability) return AttributeFactory::AvailabilityAllocSize; else if (IsTypeTagForDatatype) |

