SourceManager& getSourceManager() { return SourceMgr; }
llvm::MallocAllocator &getAllocator() { return Allocator; }
+ void Deallocate(void *Ptr) { Allocator.Deallocate(Ptr); }
+
const LangOptions& getLangOptions() const { return LangOpts; }
FullSourceLoc getFullLoc(SourceLocation Loc) const {
FieldDecl *Field,
bool OutermostType = false,
bool EncodingProperty = false) const;
-
+
};
} // end namespace clang
//===----------------------------------------------------------------------===//
TranslationUnitDecl *TranslationUnitDecl::Create(ASTContext &C) {
- void *Mem = C.getAllocator().Allocate<TranslationUnitDecl>();
- return new (Mem) TranslationUnitDecl();
+ return new (C) TranslationUnitDecl();
}
NamespaceDecl *NamespaceDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L, IdentifierInfo *Id) {
- void *Mem = C.getAllocator().Allocate<NamespaceDecl>();
- return new (Mem) NamespaceDecl(DC, L, Id);
+ return new (C) NamespaceDecl(DC, L, Id);
}
void NamespaceDecl::Destroy(ASTContext& C) {
// together. They are all top-level Decls.
this->~NamespaceDecl();
- C.getAllocator().Deallocate((void *)this);
+ C.Deallocate((void *)this);
}
ImplicitParamDecl *ImplicitParamDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L, IdentifierInfo *Id, QualType T) {
- void *Mem = C.getAllocator().Allocate<ImplicitParamDecl>();
- return new (Mem) ImplicitParamDecl(ImplicitParam, DC, L, Id, T);
+ return new (C) ImplicitParamDecl(ImplicitParam, DC, L, Id, T);
}
ParmVarDecl *ParmVarDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L, IdentifierInfo *Id,
QualType T, StorageClass S,
Expr *DefArg) {
- void *Mem = C.getAllocator().Allocate<ParmVarDecl>();
- return new (Mem) ParmVarDecl(ParmVar, DC, L, Id, T, S, DefArg);
+ return new (C) ParmVarDecl(ParmVar, DC, L, Id, T, S, DefArg);
}
QualType ParmVarDecl::getOriginalType() const {
SourceLocation L, IdentifierInfo *Id,
QualType T, QualType OT, StorageClass S,
Expr *DefArg) {
- void *Mem = C.getAllocator().Allocate<ParmVarWithOriginalTypeDecl>();
- return new (Mem) ParmVarWithOriginalTypeDecl(DC, L, Id, T, OT, S, DefArg);
+ return new (C) ParmVarWithOriginalTypeDecl(DC, L, Id, T, OT, S, DefArg);
}
FunctionDecl *FunctionDecl::Create(ASTContext &C, DeclContext *DC,
DeclarationName N, QualType T,
StorageClass S, bool isInline,
SourceLocation TypeSpecStartLoc) {
- void *Mem = C.getAllocator().Allocate<FunctionDecl>();
- return new (Mem) FunctionDecl(Function, DC, L, N, T, S, isInline,
+ return new (C) FunctionDecl(Function, DC, L, N, T, S, isInline,
TypeSpecStartLoc);
}
BlockDecl *BlockDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L) {
- void *Mem = C.getAllocator().Allocate<BlockDecl>();
- return new (Mem) BlockDecl(DC, L);
+ return new (C) BlockDecl(DC, L);
}
FieldDecl *FieldDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L,
IdentifierInfo *Id, QualType T, Expr *BW,
bool Mutable) {
- void *Mem = C.getAllocator().Allocate<FieldDecl>();
- return new (Mem) FieldDecl(Decl::Field, DC, L, Id, T, BW, Mutable);
+ return new (C) FieldDecl(Decl::Field, DC, L, Id, T, BW, Mutable);
}
bool FieldDecl::isAnonymousStructOrUnion() const {
SourceLocation L,
IdentifierInfo *Id, QualType T,
Expr *E, const llvm::APSInt &V) {
- void *Mem = C.getAllocator().Allocate<EnumConstantDecl>();
- return new (Mem) EnumConstantDecl(CD, L, Id, T, E, V);
+ return new (C) EnumConstantDecl(CD, L, Id, T, E, V);
}
void EnumConstantDecl::Destroy(ASTContext& C) {
TypedefDecl *TypedefDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L,
IdentifierInfo *Id, QualType T) {
- void *Mem = C.getAllocator().Allocate<TypedefDecl>();
- return new (Mem) TypedefDecl(DC, L, Id, T);
+ return new (C) TypedefDecl(DC, L, Id, T);
}
EnumDecl *EnumDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L,
FileScopeAsmDecl *FileScopeAsmDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L,
StringLiteral *Str) {
- void *Mem = C.getAllocator().Allocate<FileScopeAsmDecl>();
- return new (Mem) FileScopeAsmDecl(DC, L, Str);
+ return new (C) FileScopeAsmDecl(DC, L, Str);
}
//===----------------------------------------------------------------------===//
VarDecl *VarDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L,
IdentifierInfo *Id, QualType T, StorageClass S,
SourceLocation TypeSpecStartLoc) {
- void *Mem = C.getAllocator().Allocate<VarDecl>();
- return new (Mem) VarDecl(Var, DC, L, Id, T, S, TypeSpecStartLoc);
+ return new (C) VarDecl(Var, DC, L, Id, T, S, TypeSpecStartLoc);
}
void VarDecl::Destroy(ASTContext& C) {
this->~VarDecl();
- C.getAllocator().Deallocate((void *)this);
+ C.Deallocate((void *)this);
}
VarDecl::~VarDecl() {
for (param_iterator I=param_begin(), E=param_end(); I!=E; ++I)
(*I)->Destroy(C);
- C.getAllocator().Deallocate(ParamInfo);
+ C.Deallocate(ParamInfo);
Decl::Destroy(C);
}
SourceLocation L, IdentifierInfo *Id,
RecordDecl* PrevDecl) {
- void *Mem = C.getAllocator().Allocate<RecordDecl>();
- RecordDecl* R = new (Mem) RecordDecl(Record, TK, DC, L, Id);
+ RecordDecl* R = new (C) RecordDecl(Record, TK, DC, L, Id);
C.getTypeDeclType(R, PrevDecl);
return R;
}
}
this->~Decl();
- C.getAllocator().Deallocate((void *)this);
+ C.Deallocate((void *)this);
#endif
}
TemplateTypeParmDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L, IdentifierInfo *Id,
bool Typename) {
- void *Mem = C.getAllocator().Allocate<TemplateTypeParmDecl>();
- return new (Mem) TemplateTypeParmDecl(DC, L, Id, Typename);
+ return new (C) TemplateTypeParmDecl(DC, L, Id, Typename);
}
NonTypeTemplateParmDecl *
NonTypeTemplateParmDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L, IdentifierInfo *Id,
QualType T, SourceLocation TypeSpecStartLoc) {
- void *Mem = C.getAllocator().Allocate<NonTypeTemplateParmDecl>();
- return new (Mem) NonTypeTemplateParmDecl(DC, L, Id, T, TypeSpecStartLoc);
+ return new (C) NonTypeTemplateParmDecl(DC, L, Id, T, TypeSpecStartLoc);
}
TemplateParameterList::TemplateParameterList(Decl **Params, unsigned NumParams)
TemplateParameterList *
TemplateParameterList::Create(ASTContext &C, Decl **Params,
unsigned NumParams) {
+ // FIXME: how do I pass in Size to ASTContext::new?
unsigned Size = sizeof(TemplateParameterList) + sizeof(Decl *) * NumParams;
unsigned Align = llvm::AlignOf<TemplateParameterList>::Alignment;
void *Mem = C.getAllocator().Allocate(Size, Align);
CXXRecordDecl *CXXRecordDecl::Create(ASTContext &C, TagKind TK, DeclContext *DC,
SourceLocation L, IdentifierInfo *Id,
CXXRecordDecl* PrevDecl) {
- void *Mem = C.getAllocator().Allocate<CXXRecordDecl>();
- CXXRecordDecl* R = new (Mem) CXXRecordDecl(TK, DC, L, Id);
+ CXXRecordDecl* R = new (C) CXXRecordDecl(TK, DC, L, Id);
C.getTypeDeclType(R, PrevDecl);
return R;
}
CXXMethodDecl::Create(ASTContext &C, CXXRecordDecl *RD,
SourceLocation L, DeclarationName N,
QualType T, bool isStatic, bool isInline) {
- void *Mem = C.getAllocator().Allocate<CXXMethodDecl>();
- return new (Mem) CXXMethodDecl(CXXMethod, RD, L, N, T, isStatic, isInline);
+ return new (C) CXXMethodDecl(CXXMethod, RD, L, N, T, isStatic, isInline);
}
QualType CXXMethodDecl::getThisType(ASTContext &C) const {
bool isInline, bool isImplicitlyDeclared) {
assert(N.getNameKind() == DeclarationName::CXXConstructorName &&
"Name must refer to a constructor");
- void *Mem = C.getAllocator().Allocate<CXXConstructorDecl>();
- return new (Mem) CXXConstructorDecl(RD, L, N, T, isExplicit, isInline,
+ return new (C) CXXConstructorDecl(RD, L, N, T, isExplicit, isInline,
isImplicitlyDeclared);
}
bool isImplicitlyDeclared) {
assert(N.getNameKind() == DeclarationName::CXXDestructorName &&
"Name must refer to a destructor");
- void *Mem = C.getAllocator().Allocate<CXXDestructorDecl>();
- return new (Mem) CXXDestructorDecl(RD, L, N, T, isInline,
- isImplicitlyDeclared);
+ return new (C) CXXDestructorDecl(RD, L, N, T, isInline,
+ isImplicitlyDeclared);
}
CXXConversionDecl *
QualType T, bool isInline, bool isExplicit) {
assert(N.getNameKind() == DeclarationName::CXXConversionFunctionName &&
"Name must refer to a conversion function");
- void *Mem = C.getAllocator().Allocate<CXXConversionDecl>();
- return new (Mem) CXXConversionDecl(RD, L, N, T, isInline, isExplicit);
+ return new (C) CXXConversionDecl(RD, L, N, T, isInline, isExplicit);
}
CXXClassVarDecl *CXXClassVarDecl::Create(ASTContext &C, CXXRecordDecl *RD,
SourceLocation L, IdentifierInfo *Id,
QualType T) {
- void *Mem = C.getAllocator().Allocate<CXXClassVarDecl>();
- return new (Mem) CXXClassVarDecl(RD, L, Id, T);
+ return new (C) CXXClassVarDecl(RD, L, Id, T);
}
OverloadedFunctionDecl *
OverloadedFunctionDecl::Create(ASTContext &C, DeclContext *DC,
DeclarationName N) {
- void *Mem = C.getAllocator().Allocate<OverloadedFunctionDecl>();
- return new (Mem) OverloadedFunctionDecl(DC, N);
+ return new (C) OverloadedFunctionDecl(DC, N);
}
LinkageSpecDecl *LinkageSpecDecl::Create(ASTContext &C,
DeclContext *DC,
SourceLocation L,
LanguageIDs Lang, bool Braces) {
- void *Mem = C.getAllocator().Allocate<LinkageSpecDecl>();
- return new (Mem) LinkageSpecDecl(DC, L, Lang, Braces);
+ return new (C) LinkageSpecDecl(DC, L, Lang, Braces);
}
Decls[i]->Destroy(C);
this->~DeclGroup();
- C.getAllocator().Deallocate((void*) this);
+ C.Deallocate((void*) this);
}
DeclGroupOwningRef::~DeclGroupOwningRef() {
bool isVariadic,
bool isSynthesized,
ImplementationControl impControl) {
- void *Mem = C.getAllocator().Allocate<ObjCMethodDecl>();
- return new (Mem) ObjCMethodDecl(beginLoc, endLoc,
+ return new (C) ObjCMethodDecl(beginLoc, endLoc,
SelInfo, T, contextDecl,
isInstance,
isVariadic, isSynthesized, impControl);
IdentifierInfo *Id,
SourceLocation ClassLoc,
bool ForwardDecl, bool isInternal){
- void *Mem = C.getAllocator().Allocate<ObjCInterfaceDecl>();
- return new (Mem) ObjCInterfaceDecl(DC, atLoc, Id, ClassLoc, ForwardDecl,
+ return new (C) ObjCInterfaceDecl(DC, atLoc, Id, ClassLoc, ForwardDecl,
isInternal);
}
ObjCIvarDecl *ObjCIvarDecl::Create(ASTContext &C, SourceLocation L,
IdentifierInfo *Id, QualType T,
AccessControl ac, Expr *BW) {
- void *Mem = C.getAllocator().Allocate<ObjCIvarDecl>();
- return new (Mem) ObjCIvarDecl(L, Id, T, ac, BW);
+ return new (C) ObjCIvarDecl(L, Id, T, ac, BW);
}
ObjCAtDefsFieldDecl
*ObjCAtDefsFieldDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L,
IdentifierInfo *Id, QualType T, Expr *BW) {
- void *Mem = C.getAllocator().Allocate<ObjCAtDefsFieldDecl>();
- return new (Mem) ObjCAtDefsFieldDecl(DC, L, Id, T, BW);
+ return new (C) ObjCAtDefsFieldDecl(DC, L, Id, T, BW);
}
void ObjCAtDefsFieldDecl::Destroy(ASTContext& C) {
this->~ObjCAtDefsFieldDecl();
- C.getAllocator().Deallocate((void *)this);
+ C.Deallocate((void *)this);
}
ObjCProtocolDecl *ObjCProtocolDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L,
IdentifierInfo *Id) {
- void *Mem = C.getAllocator().Allocate<ObjCProtocolDecl>();
- return new (Mem) ObjCProtocolDecl(DC, L, Id);
+ return new (C) ObjCProtocolDecl(DC, L, Id);
}
ObjCProtocolDecl::~ObjCProtocolDecl() {
ObjCClassDecl *ObjCClassDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L,
ObjCInterfaceDecl **Elts, unsigned nElts) {
- void *Mem = C.getAllocator().Allocate<ObjCClassDecl>();
- return new (Mem) ObjCClassDecl(DC, L, Elts, nElts);
+ return new (C) ObjCClassDecl(DC, L, Elts, nElts);
}
ObjCClassDecl::~ObjCClassDecl() {
ObjCForwardProtocolDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L,
ObjCProtocolDecl **Elts, unsigned NumElts) {
- void *Mem = C.getAllocator().Allocate<ObjCForwardProtocolDecl>();
- return new (Mem) ObjCForwardProtocolDecl(DC, L, Elts, NumElts);
+ return new (C) ObjCForwardProtocolDecl(DC, L, Elts, NumElts);
}
ObjCForwardProtocolDecl::~ObjCForwardProtocolDecl() {
ObjCCategoryDecl *ObjCCategoryDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L,
IdentifierInfo *Id) {
- void *Mem = C.getAllocator().Allocate<ObjCCategoryDecl>();
- return new (Mem) ObjCCategoryDecl(DC, L, Id);
+ return new (C) ObjCCategoryDecl(DC, L, Id);
}
ObjCCategoryImplDecl *
ObjCCategoryImplDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L,IdentifierInfo *Id,
ObjCInterfaceDecl *ClassInterface) {
- void *Mem = C.getAllocator().Allocate<ObjCCategoryImplDecl>();
- return new (Mem) ObjCCategoryImplDecl(DC, L, Id, ClassInterface);
+ return new (C) ObjCCategoryImplDecl(DC, L, Id, ClassInterface);
}
ObjCImplementationDecl *
SourceLocation L,
ObjCInterfaceDecl *ClassInterface,
ObjCInterfaceDecl *SuperDecl) {
- void *Mem = C.getAllocator().Allocate<ObjCImplementationDecl>();
- return new (Mem) ObjCImplementationDecl(DC, L, ClassInterface, SuperDecl);
+ return new (C) ObjCImplementationDecl(DC, L, ClassInterface, SuperDecl);
}
ObjCCompatibleAliasDecl *
SourceLocation L,
IdentifierInfo *Id,
ObjCInterfaceDecl* AliasedClass) {
- void *Mem = C.getAllocator().Allocate<ObjCCompatibleAliasDecl>();
- return new (Mem) ObjCCompatibleAliasDecl(DC, L, Id, AliasedClass);
+ return new (C) ObjCCompatibleAliasDecl(DC, L, Id, AliasedClass);
}
ObjCPropertyDecl *ObjCPropertyDecl::Create(ASTContext &C, DeclContext *DC,
IdentifierInfo *Id,
QualType T,
PropertyControl propControl) {
- void *Mem = C.getAllocator().Allocate<ObjCPropertyDecl>();
- return new (Mem) ObjCPropertyDecl(DC, L, Id, T);
+ return new (C) ObjCPropertyDecl(DC, L, Id, T);
}
//===----------------------------------------------------------------------===//
ObjCPropertyDecl *property,
Kind PK,
ObjCIvarDecl *ivar) {
- void *Mem = C.getAllocator().Allocate<ObjCPropertyImplDecl>();
- return new (Mem) ObjCPropertyImplDecl(DC, atLoc, L, property, PK, ivar);
+ return new (C) ObjCPropertyImplDecl(DC, atLoc, L, property, PK, ivar);
}
TranslationUnitDecl* TranslationUnitDecl::CreateImpl(Deserializer& D,
ASTContext& C) {
- void *Mem = C.getAllocator().Allocate<TranslationUnitDecl>();
- TranslationUnitDecl* decl = new (Mem) TranslationUnitDecl();
-
- return decl;
+ return new (C) TranslationUnitDecl();
}
//===----------------------------------------------------------------------===//
}
NamespaceDecl* NamespaceDecl::CreateImpl(Deserializer& D, ASTContext& C) {
- void *Mem = C.getAllocator().Allocate<NamespaceDecl>();
- NamespaceDecl* decl = new (Mem) NamespaceDecl(0, SourceLocation(), 0);
+ NamespaceDecl* decl = new (C) NamespaceDecl(0, SourceLocation(), 0);
decl->NamedDecl::ReadInRec(D, C);
decl->LBracLoc = SourceLocation::ReadVal(D);
//===----------------------------------------------------------------------===//
VarDecl* VarDecl::CreateImpl(Deserializer& D, ASTContext& C) {
- void *Mem = C.getAllocator().Allocate<VarDecl>();
VarDecl* decl =
- new (Mem) VarDecl(Var, 0, SourceLocation(), NULL, QualType(), None);
+ new (C) VarDecl(Var, 0, SourceLocation(), NULL, QualType(), None);
decl->VarDecl::ReadImpl(D, C);
return decl;
}
ParmVarDecl* ParmVarDecl::CreateImpl(Deserializer& D, ASTContext& C) {
- void *Mem = C.getAllocator().Allocate<ParmVarDecl>();
- ParmVarDecl* decl = new (Mem)
+ ParmVarDecl* decl = new (C)
ParmVarDecl(ParmVar,
0, SourceLocation(), NULL, QualType(), None, NULL);
ParmVarWithOriginalTypeDecl* ParmVarWithOriginalTypeDecl::CreateImpl(
Deserializer& D, ASTContext& C) {
- void *Mem = C.getAllocator().Allocate<ParmVarWithOriginalTypeDecl>();
- ParmVarWithOriginalTypeDecl* decl = new (Mem)
+ ParmVarWithOriginalTypeDecl* decl = new (C)
ParmVarWithOriginalTypeDecl(0, SourceLocation(), NULL, QualType(),
QualType(), None, NULL);
}
EnumDecl* EnumDecl::CreateImpl(Deserializer& D, ASTContext& C) {
- void *Mem = C.getAllocator().Allocate<EnumDecl>();
- EnumDecl* decl = new (Mem) EnumDecl(0, SourceLocation(), NULL);
+ EnumDecl* decl = new (C) EnumDecl(0, SourceLocation(), NULL);
decl->NamedDecl::ReadInRec(D, C);
decl->setDefinition(D.ReadBool());
llvm::APSInt val(1);
D.Read(val);
- void *Mem = C.getAllocator().Allocate<EnumConstantDecl>();
- EnumConstantDecl* decl = new (Mem)
+ EnumConstantDecl* decl = new (C)
EnumConstantDecl(0, SourceLocation(), NULL, QualType(), NULL, val);
decl->ValueDecl::ReadInRec(D, C);
}
FieldDecl* FieldDecl::CreateImpl(Deserializer& D, ASTContext& C) {
- void *Mem = C.getAllocator().Allocate<FieldDecl>();
- FieldDecl* decl = new (Mem) FieldDecl(Field, 0, SourceLocation(), NULL,
+ FieldDecl* decl = new (C) FieldDecl(Field, 0, SourceLocation(), NULL,
QualType(), 0, false);
decl->Mutable = D.ReadBool();
decl->DeclType.ReadBackpatch(D);
StorageClass SClass = static_cast<StorageClass>(D.ReadInt());
bool IsInline = D.ReadBool();
- void *Mem = C.getAllocator().Allocate<FunctionDecl>();
- FunctionDecl* decl = new (Mem)
+ FunctionDecl* decl = new (C)
FunctionDecl(Function, 0, SourceLocation(), DeclarationName(),
QualType(), SClass, IsInline);
OverloadedFunctionDecl *
OverloadedFunctionDecl::CreateImpl(Deserializer& D, ASTContext& C) {
- void *Mem = C.getAllocator().Allocate<OverloadedFunctionDecl>();
- OverloadedFunctionDecl* decl = new (Mem)
+ OverloadedFunctionDecl* decl = new (C)
OverloadedFunctionDecl(0, DeclarationName());
decl->NamedDecl::ReadInRec(D, C);
RecordDecl* RecordDecl::CreateImpl(Deserializer& D, ASTContext& C) {
TagKind TK = TagKind(D.ReadInt());
- void *Mem = C.getAllocator().Allocate<RecordDecl>();
- RecordDecl* decl = new (Mem) RecordDecl(Record, TK, 0, SourceLocation(), NULL);
+ RecordDecl* decl = new (C) RecordDecl(Record, TK, 0, SourceLocation(), NULL);
decl->NamedDecl::ReadInRec(D, C);
decl->setDefinition(D.ReadBool());
TypedefDecl* TypedefDecl::CreateImpl(Deserializer& D, ASTContext& C) {
QualType T = QualType::ReadVal(D);
- void *Mem = C.getAllocator().Allocate<TypedefDecl>();
- TypedefDecl* decl = new (Mem) TypedefDecl(0, SourceLocation(), NULL, T);
+ TypedefDecl* decl = new (C) TypedefDecl(0, SourceLocation(), NULL, T);
decl->NamedDecl::ReadInRec(D, C);
TemplateTypeParmDecl *
TemplateTypeParmDecl::CreateImpl(Deserializer& D, ASTContext& C) {
bool Typename = D.ReadBool();
- void *Mem = C.getAllocator().Allocate<TemplateTypeParmDecl>();
TemplateTypeParmDecl *decl
- = new (Mem) TemplateTypeParmDecl(0, SourceLocation(), NULL, Typename);
+ = new (C) TemplateTypeParmDecl(0, SourceLocation(), NULL, Typename);
decl->NamedDecl::ReadInRec(D, C);
return decl;
}
}
FileScopeAsmDecl* FileScopeAsmDecl::CreateImpl(Deserializer& D, ASTContext& C) {
- void *Mem = C.getAllocator().Allocate<FileScopeAsmDecl>();
- FileScopeAsmDecl* decl = new (Mem) FileScopeAsmDecl(0, SourceLocation(), 0);
+ FileScopeAsmDecl* decl = new (C) FileScopeAsmDecl(0, SourceLocation(), 0);
decl->AsmString = cast<StringLiteral>(D.ReadOwnedPtr<Expr>(C));
// D.ReadOwnedPtr(D.ReadOwnedPtr<StringLiteral>())<#T * * Ptr#>, <#bool AutoRegister#>)(decl->AsmString);
void Type::Destroy(ASTContext& C) {
this->~Type();
- C.getAllocator().Deallocate(this);
+ C.Deallocate(this);
}
void VariableArrayType::Destroy(ASTContext& C) {
SizeExpr->Destroy(C);
this->~VariableArrayType();
- C.getAllocator().Deallocate(this);
+ C.Deallocate(this);
}
void DependentSizedArrayType::Destroy(ASTContext& C) {
SizeExpr->Destroy(C);
this->~DependentSizedArrayType();
- C.getAllocator().Deallocate(this);
+ C.Deallocate(this);
}
/// getArrayElementTypeNoTypeQual - If this is an array type, return the