summaryrefslogtreecommitdiffstats
path: root/clang/AST/Decl.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-15 21:24:04 +0000
committerChris Lattner <sabre@nondot.org>2008-03-15 21:24:04 +0000
commit5072bae7098c80fb725199ddf16cacb42a059e59 (patch)
tree03e51a38dee3d38790757778c58a210aa5a96bf4 /clang/AST/Decl.cpp
parent4b08ca8f2e16e7fea0840bc83cb207aa53c5cfd2 (diff)
downloadbcm5719-llvm-5072bae7098c80fb725199ddf16cacb42a059e59.tar.gz
bcm5719-llvm-5072bae7098c80fb725199ddf16cacb42a059e59.zip
Switch over functiondecl. This makes it obvious that the ASTContext
argument to Create should be first, not last. llvm-svn: 48397
Diffstat (limited to 'clang/AST/Decl.cpp')
-rw-r--r--clang/AST/Decl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/AST/Decl.cpp b/clang/AST/Decl.cpp
index a171589f135..8487efb8449 100644
--- a/clang/AST/Decl.cpp
+++ b/clang/AST/Decl.cpp
@@ -227,6 +227,15 @@ ParmVarDecl *ParmVarDecl::Create(SourceLocation L, IdentifierInfo *Id,
return new (Mem) ParmVarDecl(L, Id, T, S, PrevDecl);
}
+FunctionDecl *FunctionDecl::Create(ASTContext &C, SourceLocation L,
+ IdentifierInfo *Id, QualType T,
+ StorageClass S, bool isInline,
+ ScopedDecl *PrevDecl) {
+ void *Mem = C.getAllocator().Allocate<FunctionDecl>();
+ return new (Mem) FunctionDecl(L, Id, T, S, isInline, PrevDecl);
+}
+
+
EnumConstantDecl *EnumConstantDecl::Create(SourceLocation L, IdentifierInfo *Id,
QualType T, Expr *E,
const llvm::APSInt &V,
OpenPOWER on IntegriCloud