diff options
author | Craig Topper <craig.topper@gmail.com> | 2013-08-19 03:11:34 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2013-08-19 03:11:34 +0000 |
commit | e691fce6e4b51fe1f8a4175ada157223fed539f6 (patch) | |
tree | ba4601035f5bd917cdfa8437b61e6775cfefa01c | |
parent | af71402e7b2b9238cc237b7b14026d3bb26671c1 (diff) | |
download | bcm5719-llvm-e691fce6e4b51fe1f8a4175ada157223fed539f6.tar.gz bcm5719-llvm-e691fce6e4b51fe1f8a4175ada157223fed539f6.zip |
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.
llvm-svn: 188648
-rw-r--r-- | clang/include/clang/AST/Stmt.h | 4 | ||||
-rw-r--r-- | clang/lib/AST/Stmt.cpp | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h index bc5dabb5ac9..a968149a298 100644 --- a/clang/include/clang/AST/Stmt.h +++ b/clang/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/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp index a80bd87d216..9b271c81acd 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/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; } |