summaryrefslogtreecommitdiffstats
path: root/lib/Sema/AttributeList.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-09-03 18:01:40 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-09-03 18:01:40 +0000
commit8edabd95dd4c9099fd124c5e50322730b9200d23 (patch)
tree727a1b79fcf2a5cba48d3eab5713bea078c53b4b /lib/Sema/AttributeList.cpp
parent36d558d85653315edb389677e995ec9ccdbfbf3d (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.cpp8
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)