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 | 8edabd95dd4c9099fd124c5e50322730b9200d23 (patch) | |
tree | 727a1b79fcf2a5cba48d3eab5713bea078c53b4b /lib/Sema/AttributeList.cpp | |
parent | 36d558d85653315edb389677e995ec9ccdbfbf3d (diff) |
Factor out parsing and allocation of IdentifierLoc objects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189833 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/AttributeList.cpp')
-rw-r--r-- | lib/Sema/AttributeList.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Sema/AttributeList.cpp b/lib/Sema/AttributeList.cpp index dd01aef73c..451b01c2ec 100644 --- a/lib/Sema/AttributeList.cpp +++ b/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) |