summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-08-19 03:11:34 +0000
committerCraig Topper <craig.topper@gmail.com>2013-08-19 03:11:34 +0000
commit536bcedb8e6fea6458789f99f0ef554ce65514cc (patch)
tree1194b8a98bd87c867505f93bc23a61afc2298958
parent2f6a73c08b22393e1aa2800587b9bdd0870aad52 (diff)
downloadclang-536bcedb8e6fea6458789f99f0ef554ce65514cc.tar.gz
Make the version of Stmt::operator new that takes ASTContext* call the ASTContext& version in Stmt inline instead of having two out of line functions that both call to the global versions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188648 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/Stmt.h4
-rw-r--r--lib/AST/Stmt.cpp5
2 files changed, 3 insertions, 6 deletions
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h
index bc5dabb5ac..a968149a29 100644
--- a/include/clang/AST/Stmt.h
+++ b/include/clang/AST/Stmt.h
@@ -316,7 +316,9 @@ public:
unsigned alignment = 8);
void* operator new(size_t bytes, const ASTContext* C,
- unsigned alignment = 8);
+ unsigned alignment = 8) {
+ return operator new(bytes, *C, alignment);
+ }
void* operator new(size_t bytes, void* mem) throw() {
return mem;
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index a80bd87d21..9b271c81ac 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -54,11 +54,6 @@ void *Stmt::operator new(size_t bytes, const ASTContext& C,
return ::operator new(bytes, C, alignment);
}
-void *Stmt::operator new(size_t bytes, const ASTContext* C,
- unsigned alignment) {
- return ::operator new(bytes, *C, alignment);
-}
-
const char *Stmt::getStmtClassName() const {
return getStmtInfoTableEntry((StmtClass) StmtBits.sClass).Name;
}